[x265] [PATCH REVIEW] Generating weighted full-pels in compressCTURows
Steve Borho
steve at borho.org
Fri Sep 27 18:49:42 CEST 2013
On Fri, Sep 27, 2013 at 11:30 AM, Jean-Baptiste Kempf <jb at videolan.org>wrote:
> On 27 Sep, shazeb at multicorewareinc.com wrote :
> > - X265_FREE(fpelPlane);
> > + X265_FREE(fpelPlane - m_startPad);
>
> Is this always allowed?
>
It's not robust, this if statement also needs to verify refPlane is not
NULL applyWeight() also needs to check for earlier malloc failure and
early-out.
Also this line is unsafe:
fpelPlane = (pixel*)X265_MALLOC(pixel, padwidth * padheight) + m_startPad;
It needs to be two steps:
fpelPlane = (pixel*)X265_MALLOC(pixel, padwidth * padheight);
if (fpelPlan) fpelPlane += m_startPad;
--
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130927/be1a59cb/attachment.html>
More information about the x265-devel
mailing list