[x265] [PATCH 1 of 2] fix xGetIntraBitsQTChroma() for 4:2:2 [CHANGES OUTPUT 4:2:2 with tskip]
Satoshi Nakagawa
nakagawa424 at oki.com
Tue Jun 24 08:49:45 CEST 2014
# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1403592115 -32400
# Tue Jun 24 15:41:55 2014 +0900
# Node ID 3af58371c5ff95fc838db106610423f2c0ee8265
# Parent 18f936182df50cc5126d1707cd7c2b5fef289ccb
fix xGetIntraBitsQTChroma() for 4:2:2 [CHANGES OUTPUT 4:2:2 with tskip]
diff -r 18f936182df5 -r 3af58371c5ff source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp Mon Jun 23 17:03:49 2014 -0700
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp Tue Jun 24 15:41:55 2014 +0900
@@ -2116,7 +2116,7 @@
uint32_t numSig = primitives.count_nonzero(coeff, trSize * trSize);
#if CHECKED_BUILD || _DEBUG
- X265_CHECK(numSig > 0, "cbf check fail");
+ X265_CHECK(numSig > 0, "cbf check fail\n");
#endif
bool beValid;
diff -r 18f936182df5 -r 3af58371c5ff source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp Mon Jun 23 17:03:49 2014 -0700
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp Tue Jun 24 15:41:55 2014 +0900
@@ -254,7 +254,8 @@
trDepth--;
uint32_t qpdiv = cu->getPic()->getNumPartInCU() >> ((cu->getDepth(0) + trDepth) << 1);
bool bFirstQ = ((absPartIdx & (qpdiv - 1)) == 0);
- if (!bFirstQ)
+ bool bSecondQ = (chFmt == CHROMA_422 && splitIntoSubTUs) ? ((absPartIdx & (qpdiv - 1)) == 2) : false;
+ if ((!bFirstQ) && (!bSecondQ))
{
return;
}
@@ -1222,7 +1223,7 @@
}
else
{
- uint32_t bitsTmp = xGetIntraBitsQTChroma(cu, trDepth, absPartIdxC, chromaId, splitIntoSubTUs);
+ uint32_t bitsTmp = singleCbfCTmp ? xGetIntraBitsQTChroma(cu, trDepth, absPartIdxC, chromaId, splitIntoSubTUs) : 0;
if (m_rdCost->psyRdEnabled())
{
uint32_t zorder = cu->getZorderIdxInCU() + absPartIdxC;
More information about the x265-devel
mailing list