[x265] [PATCH 2 of 2] sao: avoid reduce copy by check next cu status

Min Chen chenm003 at 163.com
Thu Feb 4 06:29:51 CET 2016


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1454563781 -28800
# Node ID 33724cfd90827f3534ce26fbd7797946e2219208
# Parent  ad8ebeffdda44378dd93b787215a937a26be980e
sao: avoid reduce copy by check next cu status
---
 source/encoder/sao.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r ad8ebeffdda4 -r 33724cfd9082 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp	Thu Feb 04 13:29:38 2016 +0800
+++ b/source/encoder/sao.cpp	Thu Feb 04 13:29:41 2016 +0800
@@ -630,7 +630,7 @@
         bool mergeLeftFlag = ctuParam[addr].mergeMode == SAO_MERGE_LEFT;
         int typeIdx = ctuParam[addr].typeIdx;
 
-        if (idxX != (m_numCuInWidth - 1))
+        if ((idxX != (m_numCuInWidth - 1)) & (ctuParam[addr + 1].typeIdx >= 0))
         {
             rec = reconPic->getPlaneAddr(plane, addr);
             for (int i = 0; i < ctuHeight + 1; i++)



More information about the x265-devel mailing list