[x265] [PATCH 2 of 2] move buffer outside parenthesis

Min Chen chenm003 at 163.com
Fri Mar 28 02:15:07 CET 2014


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1395969295 25200
# Node ID 8e3a829337751c3fd9bc8e407873c09200fce91a
# Parent  c36f82263eae3f2953f2eb2bdc386077af2ae3cd
move buffer outside parenthesis

diff -r c36f82263eae -r 8e3a82933775 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Mar 27 18:14:40 2014 -0700
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Thu Mar 27 18:14:55 2014 -0700
@@ -1515,6 +1515,11 @@
             // 33 Angle modes once
             ALIGN_VAR_32(pixel, buf_trans[32 * 32]);
             ALIGN_VAR_32(pixel, tmp[33 * 32 * 32]);
+            ALIGN_VAR_32(pixel, bufScale[32 * 32]);
+            pixel _above[4 * 32 + 1];
+            pixel _left[4 * 32 + 1];
+            pixel *aboveScale  = _above + 2 * 32;
+            pixel *leftScale   = _left + 2 * 32;
             int scaleSize = puSize;
             int scaleStride = stride;
             int costShift = 0;
@@ -1522,16 +1527,11 @@
             if (puSize > 32)
             {
                 // origin is 64x64, we scale to 32x32 and setup required parameters
-                ALIGN_VAR_32(pixel, bufScale[32 * 32]);
                 primitives.scale2D_64to32(bufScale, fenc, stride);
                 fenc = bufScale;
 
                 // reserve space in case primitives need to store data in above
                 // or left buffers
-                pixel _above[4 * 32 + 1];
-                pixel _left[4 * 32 + 1];
-                pixel *aboveScale  = _above + 2 * 32;
-                pixel *leftScale   = _left + 2 * 32;
                 aboveScale[0] = leftScale[0] = above[0];
                 primitives.scale1D_128to64(aboveScale + 1, above + 1, 0);
                 primitives.scale1D_128to64(leftScale + 1, left + 1, 0);



More information about the x265-devel mailing list