[x265] [PATCH 3 of 4] Check against numRows in applyweight

Steve Borho steve at borho.org
Tue Oct 8 21:18:24 CEST 2013


On Tue, Oct 8, 2013 at 6:41 AM, <shazeb at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
> # Date 1381231599 -19800
> #      Tue Oct 08 16:56:39 2013 +0530
> # Node ID 18a5d7c3464d1a3fa98afa95a0fe7a8894bcd3d2
> # Parent  70e6c0cd3f961f89b53106da3da7a28aaaddd63b
> Check against numRows in applyweight
>
> applyWeight() processes rows a 'refLag' number of rows in advance as
> compared to the current iteration in compressCTURows()
>
> diff -r 70e6c0cd3f96 -r 18a5d7c3464d source/common/reference.cpp
> --- a/source/common/reference.cpp       Tue Oct 08 16:52:07 2013 +0530
> +++ b/source/common/reference.cpp       Tue Oct 08 16:56:39 2013 +0530
> @@ -91,6 +91,10 @@
>
>  void MotionReference::applyWeight(TComPic* ref, int rows, int numRows)
>  {
> +    if(rows >= numRows)

white-space

> +    {
> +        return;
> +    }
>

I think a better check would be:

    rows = X265_MIN(rows, numRows-1);
    if (m_numWeightedRows >= rows)
        return;

Queued as such


>      TComPicYuv* pic = ref->getPicYuvRec();
>

is this pic any different from m_reconPic?


>      int marginX = pic->m_lumaMarginX;
>      int marginY = pic->m_lumaMarginY;
>

-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131008/73fed483/attachment.html>


More information about the x265-devel mailing list