[x265] [PATCH] Fix bug in PCM mode
Min Chen
chenm003 at 163.com
Wed Sep 4 13:43:18 CEST 2013
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1378293777 -28800
# Node ID 16ea05a9c83144fb5bfc14fab5ad6968d190a549
# Parent 5f0f2466345f15af45f0fd7f36050257dd125643
Fix bug in PCM mode
diff -r 5f0f2466345f -r 16ea05a9c831 source/encoder/framefilter.cpp
--- a/source/encoder/framefilter.cpp Wed Sep 04 16:27:32 2013 +0530
+++ b/source/encoder/framefilter.cpp Wed Sep 04 19:22:57 2013 +0800
@@ -213,7 +213,7 @@
{
for (UInt col = 0; col < numCols; col++)
{
- const uint32_t cuAddr = lineStartCUAddr + col;
+ const uint32_t cuAddr = lineStartCUAddr - numCols + col;
TComDataCU* cu = m_pic->getCU(cuAddr);
xPCMCURestoration(cu, 0, 0);
@@ -282,6 +282,19 @@
m_sao.processSaoUnitRow(saoParam->saoLcuParam[2], row, 2);
}
+ // TODO: this code is NOT VERIFY because TransformSkip and PCM mode have some bugs, they always not active!
+ bool bPCMFilter = (m_pic->getSlice()->getSPS()->getUsePCM() && m_pic->getSlice()->getSPS()->getPCMFilterDisableFlag()) ? true : false;
+ if (bPCMFilter || m_pic->getSlice()->getPPS()->getTransquantBypassEnableFlag())
+ {
+ for (UInt col = 0; col < numCols; col++)
+ {
+ const uint32_t cuAddr = lineStartCUAddr + col;
+ TComDataCU* cu = m_pic->getCU(cuAddr);
+
+ xPCMCURestoration(cu, 0, 0);
+ }
+ }
+
m_completionEvent.trigger();
// TODO: Remove when we confirm below code is right
More information about the x265-devel
mailing list