Commit 2974da24 authored by Xiang Li's avatar Xiang Li

Merge branch 'nanh/VVCSoftware_VTM-JVET-O0247'

parents 76e3aee8 3d1f9672
Pipeline #1873 passed with stage
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#include <assert.h> #include <assert.h>
#include <cassert> #include <cassert>
#define JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL 1 // JVET-O0247: not signal APS index when number APS is 2
#define JVET_O0288_UNIFY_ALF_SLICE_TYPE_REMOVAL 1 // JVET-O0288: remove slice type dependency in ALF #define JVET_O0288_UNIFY_ALF_SLICE_TYPE_REMOVAL 1 // JVET-O0288: remove slice type dependency in ALF
#define JVET_O0064_SIMP_ALF_CLIP_CODING 1 // JVET-O0047/O0058/O0064/O0067/O0290/O0301/O0430: use FLC for alf clipping indices, always signal alf clipping indices #define JVET_O0064_SIMP_ALF_CLIP_CODING 1 // JVET-O0047/O0058/O0064/O0067/O0290/O0301/O0430: use FLC for alf clipping indices, always signal alf clipping indices
......
...@@ -233,7 +233,14 @@ void CABACReader::readAlfCtuFilterIndex(CodingStructure& cs, unsigned ctuRsAddr) ...@@ -233,7 +233,14 @@ void CABACReader::readAlfCtuFilterIndex(CodingStructure& cs, unsigned ctuRsAddr)
unsigned usePrevFilt = m_BinDecoder.decodeBin(Ctx::AlfUseTemporalFilt()); unsigned usePrevFilt = m_BinDecoder.decodeBin(Ctx::AlfUseTemporalFilt());
if (usePrevFilt) if (usePrevFilt)
{ {
xReadTruncBinCode(filtIndex, numAvailableFiltSets - (NUM_FIXED_FILTER_SETS + 1)); #if JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL
if (numAps > 2)
{
#endif
xReadTruncBinCode(filtIndex, numAvailableFiltSets - (NUM_FIXED_FILTER_SETS + 1));
#if JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL
}
#endif
filtIndex += (unsigned)(NUM_FIXED_FILTER_SETS + 1); filtIndex += (unsigned)(NUM_FIXED_FILTER_SETS + 1);
} }
else else
......
...@@ -3183,10 +3183,18 @@ void CABACWriter::codeAlfCtuFilterIndex(CodingStructure& cs, uint32_t ctuRsAddr, ...@@ -3183,10 +3183,18 @@ void CABACWriter::codeAlfCtuFilterIndex(CodingStructure& cs, uint32_t ctuRsAddr,
{ {
int useTemporalFilt = (filterSetIdx > NUM_FIXED_FILTER_SETS) ? 1 : 0; int useTemporalFilt = (filterSetIdx > NUM_FIXED_FILTER_SETS) ? 1 : 0;
m_BinEncoder.encodeBin(useTemporalFilt, Ctx::AlfUseTemporalFilt()); m_BinEncoder.encodeBin(useTemporalFilt, Ctx::AlfUseTemporalFilt());
if (useTemporalFilt) if (useTemporalFilt)
{ {
CHECK((filterSetIdx - (NUM_FIXED_FILTER_SETS + 1)) >= (numAvailableFiltSets - (NUM_FIXED_FILTER_SETS + 1)), "temporal non-latest set"); CHECK((filterSetIdx - (NUM_FIXED_FILTER_SETS + 1)) >= (numAvailableFiltSets - (NUM_FIXED_FILTER_SETS + 1)), "temporal non-latest set");
xWriteTruncBinCode(filterSetIdx - (NUM_FIXED_FILTER_SETS + 1), numAvailableFiltSets - (NUM_FIXED_FILTER_SETS + 1)); #if JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL
if (numAps > 2)
{
#endif
xWriteTruncBinCode(filterSetIdx - (NUM_FIXED_FILTER_SETS + 1), numAvailableFiltSets - (NUM_FIXED_FILTER_SETS + 1));
#if JVET_O0247_ALF_CTB_CODING_REDUNDANCY_REMOVAL
}
#endif
} }
else else
{ {
......
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