[x265] [PATCH 3 of 3] reduce pointer operators on I400

Min Chen chenm003 at 163.com
Tue Dec 22 02:49:10 CET 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1450728715 21600
# Node ID 3e9e45fd692d79806e53d69c2ed7a20b3e24e671
# Parent  d8c3eded1440670bde63e2fb5bec0e80ff6e2d67
reduce pointer operators on I400
---
 source/encoder/framefilter.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -r d8c3eded1440 -r 3e9e45fd692d source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp	Mon Dec 21 13:46:28 2015 -0600
+++ b/source/encoder/framefilter.cpp	Mon Dec 21 14:11:55 2015 -0600
@@ -507,7 +507,7 @@
     const intptr_t stride = reconPic->m_stride;
     const intptr_t strideC = reconPic->m_strideC;
     pixel *pixY = reconPic->getLumaAddr(lineStartCUAddr);
-    // // MUST BE check I400 since m_picOrg uninitialize in that case
+    // MUST BE check I400 since m_picOrg uninitialize in that case
     pixel *pixU = (m_param->internalCsp != X265_CSP_I400) ? reconPic->getCbAddr(lineStartCUAddr) : NULL;
     pixel *pixV = (m_param->internalCsp != X265_CSP_I400) ? reconPic->getCrAddr(lineStartCUAddr) : NULL;
     int copySizeY = realW;
@@ -560,13 +560,14 @@
     if (row == FrameFilter::ParallelFilter::numRows - 1)
     {
         pixY += (realH - 1) * stride;
-        pixU += ((realH >> vChromaShift) - 1) * strideC;
-        pixV += ((realH >> vChromaShift) - 1) * strideC;
         for (uint32_t y = 0; y < lumaMarginY; y++)
             memcpy(pixY + (y + 1) * stride, pixY, copySizeY * sizeof(pixel));
 
         if (m_param->internalCsp != X265_CSP_I400)
         {
+            pixU += ((realH >> vChromaShift) - 1) * strideC;
+            pixV += ((realH >> vChromaShift) - 1) * strideC;
+
             for (uint32_t y = 0; y < chromaMarginY; y++)
             {
                 memcpy(pixU + (y + 1) * strideC, pixU, copySizeC * sizeof(pixel));



More information about the x265-devel mailing list