Commit 017756ab authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'fix-400' into 'master'

fix #400: fix firstNZPos derivation

See merge request jvet/VVCSoftware_VTM!755
parents 7729ede8 74b040f0
...@@ -3809,6 +3809,7 @@ void CABACReader::residual_coding_subblock( CoeffCodingContext& cctx, TCoeff* co ...@@ -3809,6 +3809,7 @@ void CABACReader::residual_coding_subblock( CoeffCodingContext& cctx, TCoeff* co
{ {
int blkPos = cctx.blockPos( scanPos ); int blkPos = cctx.blockPos( scanPos );
sigBlkPos[ numNonZero++ ] = blkPos; sigBlkPos[ numNonZero++ ] = blkPos;
firstNZPos = nextSigPos;
lastNZPos = std::max<int>( lastNZPos, scanPos ); lastNZPos = std::max<int>( lastNZPos, scanPos );
coeff[blkPos] = tcoeff; coeff[blkPos] = tcoeff;
} }
......
...@@ -3627,6 +3627,7 @@ void CABACWriter::residual_coding_subblock( CoeffCodingContext& cctx, const TCoe ...@@ -3627,6 +3627,7 @@ void CABACWriter::residual_coding_subblock( CoeffCodingContext& cctx, const TCoe
if( absLevel ) if( absLevel )
{ {
numNonZero++; numNonZero++;
firstNZPos = nextSigPos;
lastNZPos = std::max<int>( lastNZPos, scanPos ); lastNZPos = std::max<int>( lastNZPos, scanPos );
signPattern <<= 1; signPattern <<= 1;
if( Coeff < 0 ) signPattern++; if( Coeff < 0 ) signPattern++;
......
Supports Markdown
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