[x265] [PATCH] aq: bug fix.extend border of TComPic::m_origPicYuv to a multiple of 16
Steve Borho
steve at borho.org
Fri Nov 8 08:01:24 CET 2013
On Thu, Nov 7, 2013 at 10:50 PM, Aarthi Priya Thirumalai <
aarthi at multicorewareinc.com> wrote:
>
> On Nov 7, 2013 11:24 PM, "Steve Borho" <steve at borho.org> wrote:
> >
> >
> >
> >
> > On Thu, Nov 7, 2013 at 5:17 AM, Aarthi Thirumalai <
> aarthi at multicorewareinc.com> wrote:
> >>
> >> # HG changeset patch
> >> # User Aarthi Thirumalai
> >> # Date 1383823017 -19800
> >> # Thu Nov 07 16:46:57 2013 +0530
> >> # Node ID 0823d243b4e2f9eee6323a9750eeb811bccbad77
> >> # Parent 85002898f5b4308547af6ce464bbdff5f360fa13
> >> aq: bug fix.extend border of TComPic::m_origPicYuv to a multiple of 16
> >>
> >> diff -r 85002898f5b4 -r 0823d243b4e2
> source/Lib/TLibCommon/TComPicYuv.cpp
> >> --- a/source/Lib/TLibCommon/TComPicYuv.cpp Thu Nov 07 14:31:05
> 2013 +0530
> >> +++ b/source/Lib/TLibCommon/TComPicYuv.cpp Thu Nov 07 16:46:57
> 2013 +0530
> >> @@ -345,6 +345,10 @@
> >> /* width and height - without padsize */
> >> int width = m_picWidth - 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;
> >
> >
> > if the row width was 17, padx would already be 3 in order to pad out to
> the nearest multiple of 4. You would be doing: padx += 15, which would
> result in a pad of 18, which is more than what you bargained for. I
> believe the += should just be =. Also, Gopu just added a new else {}
> clause this is missed here, so I've hoisted this operation higher in the
> file.
> >
> >>when row width is 17, padx is already 3 and m_picWidth would be 20 at
> this stage. So padx += 12 not 15..
yes, you're correct. Fortunately this only needs to be fixed in one place;
can you send a patch for it?
--
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131108/c90eb2e9/attachment.html>
More information about the x265-devel
mailing list