Skip to content
Snippets Groups Projects
Commit d9023147 authored by Shunsuke Iwamura's avatar Shunsuke Iwamura
Browse files

JVET-R0130: Bugfix for tC derivation used in chroma deblocking filter.

parent 0e95c917
No related branches found
No related tags found
No related merge requests found
......@@ -1305,7 +1305,12 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
const int iIndexTC = Clip3<int>(0, MAX_QP + DEFAULT_INTRA_TC_OFFSET, iQP + DEFAULT_INTRA_TC_OFFSET * (bS[chromaIdx] - 1) + (tcOffsetDiv2[chromaIdx] << 1));
#if JVET_R0130_TC_DERIVATION_BUGFIX
const int roundOffset = 1 << (sps.getBitDepth(CHANNEL_TYPE_CHROMA) - 1);
const int iTc = sps.getBitDepth(CHANNEL_TYPE_CHROMA) < 10 ? ((sm_tcTable[iIndexTC] + roundOffset) >> (10 - sps.getBitDepth(CHANNEL_TYPE_CHROMA))) : ((sm_tcTable[iIndexTC]) << (sps.getBitDepth(CHANNEL_TYPE_CHROMA) - 10));
#else
const int iTc = sps.getBitDepth(CHANNEL_TYPE_CHROMA) < 10 ? ((sm_tcTable[iIndexTC] + 2) >> (10 - sps.getBitDepth(CHANNEL_TYPE_CHROMA))) : ((sm_tcTable[iIndexTC]) << (sps.getBitDepth(CHANNEL_TYPE_CHROMA) - 10));
#endif
bool useLongFilter = false;
if (largeBoundary)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment