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

Steve Borho steve at borho.org
Mon Feb 9 18:37:52 CET 2015


On 02/09, chen wrote:
> we will access m_tmpU1[-1], so we need modify initialize pointer with +1 offset

Pushed to stable with pointer +1 adjustments

> 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);

> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel


-- 
Steve Borho


More information about the x265-devel mailing list