[x265] [PATCH] lookahead: fix reference initialization for intra prediction

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Thu Oct 24 11:19:08 CEST 2013


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1382606208 -19800
# Node ID 99f839dfc36d5681d1cb3479fad3523cd467224a
# Parent  0cb0692d6c69dbf6c5b49c51f6f528e29674baa9
lookahead: fix reference initialization for intra prediction

buffer size of pAbove/pLeft is height+1+width = 2*cusize+1

diff -r 0cb0692d6c69 -r 99f839dfc36d source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Wed Oct 23 20:09:33 2013 +0800
+++ b/source/encoder/slicetype.cpp	Thu Oct 24 14:46:48 2013 +0530
@@ -444,10 +444,10 @@
         // filtering with [1 2 1]
         // assume getUseStrongIntraSmoothing() is disabled
         pAbove1[0] = pAbove0[0];
-        pAbove1[2 * cuSize - 1] = pAbove0[2 * cuSize - 1];
+        pAbove1[2 * cuSize] = pAbove0[2 * cuSize];
         pLeft1[0] = pLeft0[0];
-        pLeft1[2 * cuSize - 1] = pLeft0[2 * cuSize - 1];
-        for (int i = 1; i < 2 * cuSize - 1; i++)
+        pLeft1[2 * cuSize] = pLeft0[2 * cuSize];
+        for (int i = 1; i < 2 * cuSize; i++)
         {
             pAbove1[i] = (pAbove0[i - 1] + 2 * pAbove0[i] + pAbove0[i + 1] + 2) >> 2;
             pLeft1[i] = (pLeft0[i - 1] + 2 * pLeft0[i] + pLeft0[i + 1] + 2) >> 2;


More information about the x265-devel mailing list