[x265] [PATCH 10 of 15] sao: change left column copy logic, move copy code outside of processSaoCu()
Min Chen
chenm003 at 163.com
Wed Dec 2 18:28:33 CET 2015
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1449076368 21600
# Node ID 82f6a10f44b88400f0f875025b9e8b6caff3acd3
# Parent 9f0c22a2e067f1035fedb636ed505f8539908bfd
sao: change left column copy logic, move copy code outside of processSaoCu()
---
source/encoder/sao.cpp | 37 +++++++++++++------------------------
1 files changed, 13 insertions(+), 24 deletions(-)
diff -r 9f0c22a2e067 -r 82f6a10f44b8 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp Wed Dec 02 11:12:45 2015 -0600
+++ b/source/encoder/sao.cpp Wed Dec 02 11:12:48 2015 -0600
@@ -307,17 +307,8 @@
memset(_upBuff1 + MAX_CU_SIZE, 0, 2 * sizeof(int8_t)); /* avoid valgrind uninit warnings */
- {
- const pixel* recR = &rec[ctuWidth - 1];
- for (int i = 0; i < ctuHeight + 1; i++)
- {
- m_tmpL2[i] = *recR;
- recR += stride;
- }
-
- tmpL = m_tmpL1;
- tmpU = &(m_tmpU[plane][lpelx]);
- }
+ tmpL = m_tmpL1;
+ tmpU = &(m_tmpU[plane][lpelx]);
switch (typeIdx)
{
@@ -593,9 +584,6 @@
}
default: break;
}
-
-// if (iSaoType!=SAO_BO_0 || iSaoType!=SAO_BO_1)
- std::swap(m_tmpL1, m_tmpL2);
}
/* Process SAO all units */
@@ -630,6 +618,16 @@
bool mergeLeftFlag = ctuParam[addr].mergeMode == SAO_MERGE_LEFT;
int typeIdx = ctuParam[addr].typeIdx;
+ if (idxX != (m_numCuInWidth - 1))
+ {
+ rec = reconPic->getPlaneAddr(plane, addr);
+ for (int i = 0; i < ctuHeight + 1; i++)
+ {
+ m_tmpL2[i] = rec[ctuWidth - 1];
+ rec += stride;
+ }
+ }
+
if (typeIdx >= 0)
{
if (!mergeLeftFlag)
@@ -654,16 +652,7 @@
}
processSaoCu(addr, typeIdx, plane);
}
- else if (idxX != (m_numCuInWidth - 1))
- {
- rec = reconPic->getPlaneAddr(plane, addr);
-
- for (int i = 0; i < ctuHeight + 1; i++)
- {
- m_tmpL1[i] = rec[ctuWidth - 1];
- rec += stride;
- }
- }
+ std::swap(m_tmpL1, m_tmpL2);
}
}
More information about the x265-devel
mailing list