[x265] [PATCH 10 of 24] sao: change left column copy logic, move copy code outside of processSaoCu()
Min Chen
chenm003 at 163.com
Tue Dec 8 00:54:47 CET 2015
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1449511574 21600
# Node ID c85a460a38fee52477971c492602ab0fa0d19fb2
# Parent 63809496ca0caa713f09fed495520f13006833cb
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 63809496ca0c -r c85a460a38fe source/encoder/sao.cpp
--- a/source/encoder/sao.cpp Mon Dec 07 12:06:10 2015 -0600
+++ b/source/encoder/sao.cpp Mon Dec 07 12:06:14 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