[x265] [PATCH] SAO: avoid access beyond bounds

chen chenm003 at 163.com
Mon Feb 9 15:26:20 CET 2015


we will access m_tmpU1[-1], so we need modify initialize pointer with +1 offset
At 2015-02-09 19:39:23,praveen at multicorewareinc.com wrote:
># HG changeset patch
># User Praveen Tiwari
># Date 1423481955 -19800
># Node ID 61f2083a51de7f604a00c053ab60ba6a9f70b708
># Parent  b6f36b277234d7f402d67986dab969e7bc655646
>SAO: avoid access beyond bounds
>
>diff -r b6f36b277234 -r 61f2083a51de source/encoder/sao.cpp
>--- a/source/encoder/sao.cpp	Fri Feb 06 21:57:45 2015 -0600
>+++ b/source/encoder/sao.cpp	Mon Feb 09 17:09:15 2015 +0530
>@@ -113,8 +113,8 @@
> 
>     for (int i = 0; i < 3; i++)
>     {
>-        CHECKED_MALLOC(m_tmpU1[i], pixel, m_param->sourceWidth);
>-        CHECKED_MALLOC(m_tmpU2[i], pixel, m_param->sourceWidth);
>+        CHECKED_MALLOC(m_tmpU1[i], pixel, m_param->sourceWidth + 2); // +2 for SAO asm code to avoid access beyond bounds
>+        CHECKED_MALLOC(m_tmpU2[i], pixel, m_param->sourceWidth + 2);
>     }
> 
>     CHECKED_MALLOC(m_count, PerClass, NUM_PLANE);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150209/643fb4f2/attachment.html>


More information about the x265-devel mailing list