Skip to content
Snippets Groups Projects
Commit 3beebb98 authored by Heiko Schwarz's avatar Heiko Schwarz
Browse files

fix for sign data hiding

The change fixes the problem of encoder/decoder mismatches by removing
a no longer correct condition for sign hiding in Quant::quant(..).
parent ae666432
Branches signHideFix
No related tags found
No related merge requests found
Pipeline #1626 passed
......@@ -717,7 +717,7 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
{
const SPS &sps = *tu.cs->sps;
const CompArea &rect = tu.blocks[compID];
#if HEVC_USE_SCALING_LISTS || HEVC_USE_SIGN_HIDING
#if HEVC_USE_SCALING_LISTS
const uint32_t uiWidth = rect.width;
const uint32_t uiHeight = rect.height;
#endif
......@@ -813,7 +813,7 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
piQCoef.buf[uiBlockPos] = Clip3<TCoeff>( entropyCodingMinimum, entropyCodingMaximum, quantisedCoefficient );
} // for n
#if HEVC_USE_SIGN_HIDING
if( cctx.signHiding() && uiWidth>=4 && uiHeight>=4 )
if( cctx.signHiding() )
{
if(uiAbsSum >= 2) //this prevents TUs with only one coefficient of value 1 from being tested
{
......
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