Commit 74b040f0 authored by Remy Foray's avatar Remy Foray Committed by Frank Bossen
Browse files

fix #400: fix firstNZPos derivation

parent 7729ede8
......@@ -3809,6 +3809,7 @@ void CABACReader::residual_coding_subblock( CoeffCodingContext& cctx, TCoeff* co
{
int blkPos = cctx.blockPos( scanPos );
sigBlkPos[ numNonZero++ ] = blkPos;
firstNZPos = nextSigPos;
lastNZPos = std::max<int>( lastNZPos, scanPos );
coeff[blkPos] = tcoeff;
}
......
......@@ -3627,6 +3627,7 @@ void CABACWriter::residual_coding_subblock( CoeffCodingContext& cctx, const TCoe
if( absLevel )
{
numNonZero++;
firstNZPos = nextSigPos;
lastNZPos = std::max<int>( lastNZPos, scanPos );
signPattern <<= 1;
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