Commit 63bac246 authored by Brian Heng's avatar Brian Heng

Fix for Ticket #235

  - Fix bugs in N0280 - Transform skip residual coding.
parent 942a475a
......@@ -165,8 +165,8 @@ void CoeffCodingContext::initSubblock( int SubsetId, bool sigGroupFlag )
unsigned sigLower = unsigned( ( CGPosY + 1 ) < m_heightInGroups ? m_sigCoeffGroupFlag[ m_subSetPos + m_widthInGroups ] : false );
m_sigGroupCtxId = Ctx::SigCoeffGroup[m_chType]( sigRight | sigLower );
#if JVET_N0280_RESIDUAL_CODING_TS
unsigned sigLeft = unsigned( int( CGPosX - 1 ) > 0 ? m_sigCoeffGroupFlag[m_subSetPos - 1 ] : false );
unsigned sigAbove = unsigned( int( CGPosY - 1 ) > 0 ? m_sigCoeffGroupFlag[m_subSetPos - m_widthInGroups] : false );
unsigned sigLeft = unsigned( CGPosX > 0 ? m_sigCoeffGroupFlag[m_subSetPos - 1 ] : false );
unsigned sigAbove = unsigned( CGPosY > 0 ? m_sigCoeffGroupFlag[m_subSetPos - m_widthInGroups] : false );
m_sigGroupCtxIdTS = Ctx::TsSigCoeffGroup( sigLeft + sigAbove );
#endif
}
......
......@@ -1776,7 +1776,7 @@ DepQuant::~DepQuant()
void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum, const QpParam &cQP, const Ctx& ctx )
{
#if JVET_N0280_RESIDUAL_CODING_TS
if( tu.cs->slice->getDepQuantEnabledFlag() && tu.mtsIdx != 1 )
if( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != 1 || !isLuma(compID)) )
#else
if( tu.cs->slice->getDepQuantEnabledFlag() )
#endif
......@@ -1792,7 +1792,7 @@ void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeff
void DepQuant::dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const ComponentID &compID, const QpParam &cQP )
{
#if JVET_N0280_RESIDUAL_CODING_TS
if( tu.cs->slice->getDepQuantEnabledFlag() && tu.mtsIdx != 1 )
if( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != 1 || !isLuma(compID)) )
#else
if( tu.cs->slice->getDepQuantEnabledFlag() )
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment