[x265] [PATCH] aq : bug fix . extend border of TComPic::m_origPicYuv to a multiple of 16

Aarthi Priya Thirumalai aarthi at multicorewareinc.com
Thu Nov 7 06:24:28 CET 2013


On Thu, Nov 7, 2013 at 2:44 AM, Steve Borho <steve at borho.org> wrote:

>
>
>
> On Wed, Nov 6, 2013 at 4:33 AM, Aarthi Thirumalai <
> aarthi at multicorewareinc.com> wrote:
>
>> # HG changeset patch
>> # User Aarthi Thirumalai
>> # Date 1383734012 -19800
>> #      Wed Nov 06 16:03:32 2013 +0530
>> # Node ID 6b725179b61564df5b4eb497f783b193dcbda1e9
>> # Parent  21e08cf159c552ff98334c98070b9cd442aaff27
>> aq : bug fix . extend border of TComPic::m_origPicYuv to a multiple of 16
>>
>
> no space before the :
>
>
>>
>> diff -r 21e08cf159c5 -r 6b725179b615 source/Lib/TLibCommon/TComPicYuv.cpp
>> --- a/source/Lib/TLibCommon/TComPicYuv.cpp      Wed Nov 06 15:43:19 2013
>> +0530
>> +++ b/source/Lib/TLibCommon/TComPicYuv.cpp      Wed Nov 06 16:03:32 2013
>> +0530
>> @@ -431,10 +431,12 @@
>>
>
> this is only the 8bpp path, the HIGH_BIT_DEPTH path needs the same
> adjustments
>
>
>>          uint8_t *v = (uint8_t*)pic.planes[2];
>>
>>          /* width and height - without padsize */
>> -        int width = (m_picWidth * (pic.bitDepth > 8 ? 2 : 1)) - padx;
>> -        int height = m_picHeight - pady;
>> -
>> -        // copy pixels by row into encoder's buffer
>> +         int width = (m_picWidth * (pic.bitDepth > 8 ? 2 : 1)) - padx;
>> +         int height = m_picHeight - pady;
>> +         uint8_t rem = m_picWidth % 16;
>> +         padx += rem ? 16 - rem : 0;
>> +         rem = m_picHeight % 16;
>> +         pady += rem ? 16 - rem : 0;
>>
>
> white-space alignment
>
>
>>          for (int r = 0; r < height; r++)
>>          {
>>              memcpy(Y, y, width);
>> diff -r 21e08cf159c5 -r 6b725179b615 source/common/lowres.cpp
>> --- a/source/common/lowres.cpp  Wed Nov 06 15:43:19 2013 +0530
>> +++ b/source/common/lowres.cpp  Wed Nov 06 16:03:32 2013 +0530
>> @@ -150,31 +150,6 @@
>>          intraMbs[i] = 0;
>>      }
>>
>> -    int y, extWidth = (orig->getWidth() + X265_LOWRES_CU_SIZE - 1);
>> -    int srcStride = orig->getStride();
>> -    int srcHeight = orig->getHeight();
>> -    int srcWidth  = orig->getWidth();
>> -    Pel *src;
>> -    src = orig->getLumaAddr();
>> -
>> -    /* extending right margin */
>> -    if (2 * width > srcWidth)
>> -    {
>> -        for (y = 0; y < srcHeight; y++)
>> -        {
>> -            ::memset(src + srcWidth, src[srcWidth - 1], sizeof(Pel) *
>> (X265_LOWRES_CU_SIZE - 1));
>> -            src += srcStride;
>> -        }
>> -    }
>> -
>> -    /* extending bottom margin */
>> -    src = orig->getLumaAddr() + (srcHeight - 1) * srcStride;
>> -
>> -    for (y = 1; y <= 2 * lines - srcHeight; y++)
>> -    {
>> -        ::memcpy(src + y * srcStride, src, sizeof(Pel) * (extWidth));
>> -    }
>> -
>>      /* downscale and generate 4 HPEL planes for lookahead */
>>      primitives.frame_init_lowres_core(orig->getLumaAddr(),
>>                                        lowresPlane[0], lowresPlane[1],
>> lowresPlane[2], lowresPlane[3],
>>
>
> The AQ code which iterates over 16x16 blocks also needs to be updated to
> account for the last padded block in each row, and at the bottom.
>
This has already been taken care of. shall make the other changes and
resend

>
> --
> Steve
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131107/7f6d1c52/attachment-0001.html>


More information about the x265-devel mailing list