Commit b8a28645 authored by Karsten Suehring's avatar Karsten Suehring
Browse files

Merge branch 'integration_O0122_Sign_Level' into 'master'

Fixed decoder crash introduced by the combination of JVET-O0122 and JVET-O0619

See merge request jvet/VVCSoftware_VTM!734
parents bbd3400f 468b4ebb
......@@ -3310,6 +3310,12 @@ void CABACReader::residual_coding_subblockTS( CoeffCodingContext& cctx, TCoeff*
cutoffVal = 2;
for (int i = 0; i < numGtBins; i++)
{
#if JVET_O0122_TS_SIGN_LEVEL
if( tcoeff < 0)
{
tcoeff = -tcoeff;
}
#endif
if (tcoeff >= cutoffVal)
{
RExt__DECODER_DEBUG_BIT_STATISTICS_SET(ctype_gt2);
......
......@@ -3143,7 +3143,13 @@ void CABACWriter::residual_coding_subblockTS( CoeffCodingContext& cctx, const TC
#if JVET_O0619_GTX_SINGLE_PASS_TS_RESIDUAL_CODING
for (int scanPos = firstSigPos; scanPos <= minSubPos; scanPos++)
{
#if JVET_O0122_TS_SIGN_LEVEL
unsigned absLevel;
cctx.neighTS(rightPixel, belowPixel, scanPos, coeff);
absLevel = cctx.deriveModCoeff(rightPixel, belowPixel, abs(coeff[cctx.blockPos(scanPos)]), cctx.bdpcm());
#else
unsigned absLevel = abs(coeff[cctx.blockPos(scanPos)]);
#endif
cutoffVal = 2;
for (int i = 0; i < numGtBins; i++)
{
......
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