Commit dab7ce3c authored by Frederic Barbier's avatar Frederic Barbier

Align ALF syntax element trace with specification

parent 673f795b
......@@ -2530,7 +2530,7 @@ void HLSyntaxReader::alfFilter( AlfSliceParam& alfSliceParam, const bool isChrom
// derive maxGolombIdx
AlfFilterShape alfShape( isChroma ? 5 : 7 );
const int maxGolombIdx = AdaptiveLoopFilter::getMaxGolombIdx( alfShape.filterType );
READ_UVLC( code, "min_golomb_order" );
READ_UVLC( code, isChroma ? "alf_chroma_min_eg_order_minus1" : "alf_luma_min_eg_order_minus1" );
int kMin = code + 1;
static int kMinTab[MAX_NUM_ALF_COEFF];
......@@ -2539,7 +2539,7 @@ void HLSyntaxReader::alfFilter( AlfSliceParam& alfSliceParam, const bool isChrom
for( int idx = 0; idx < maxGolombIdx; idx++ )
{
READ_FLAG( code, "golomb_order_increase_flag" );
READ_FLAG( code, isChroma ? "alf_chroma_eg_order_increase_flag" : "alf_luma_eg_order_increase_flag" );
CHECK( code > 1, "Wrong golomb_order_increase_flag" );
kMinTab[idx] = kMin + code;
kMin = kMinTab[idx];
......
......@@ -1824,13 +1824,13 @@ void HLSWriter::alfFilter( const AlfSliceParam& alfSliceParam, const bool isChro
int kMin = EncAdaptiveLoopFilter::getGolombKMin( alfShape, numFilters, kMinTab, bitsCoeffScan );
// Golomb parameters
WRITE_UVLC( kMin - 1, "min_golomb_order" );
WRITE_UVLC( kMin - 1, isChroma ? "alf_chroma_min_eg_order_minus1" : "alf_luma_min_eg_order_minus1" );
for( int idx = 0; idx < maxGolombIdx; idx++ )
{
bool golombOrderIncreaseFlag = ( kMinTab[idx] != kMin ) ? true : false;
CHECK( !( kMinTab[idx] <= kMin + 1 ), "ALF Golomb parameter not consistent" );
WRITE_FLAG( golombOrderIncreaseFlag, "golomb_order_increase_flag" );
WRITE_FLAG( golombOrderIncreaseFlag, isChroma ? "alf_chroma_eg_order_increase_flag" : "alf_luma_eg_order_increase_flag" );
kMin = kMinTab[idx];
}
......
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