Skip to content
Snippets Groups Projects
Commit 4a4a57f3 authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'P0135' into 'master'

JVET-P0135: add constraint on vps_direct_dependency_flag[ i ][ j ]

See merge request !1202
parents 284d74a4 88f25440
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_P0135_VPS_DIRECT_DEPEN_FLAG_CONSRAINT 1 // JVET-P0135: add constraint on vps_direct_dependency_flag[ i ][ j ], when vps_independent_layer_flag[ i ] is equal to 0
#define JVET_P1024_SINGLE_SLICE_PER_SUBPIC_FLAG 1 // JVET-P1024: single_slice_per_subpic_flag in the PPS
#define JVET_P1038_ALF_PAD_RASTER_SLICE 1 // JVET-P1038, handle ALF padding in raster scan slice
......
......@@ -2244,6 +2244,9 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
READ_FLAG(uiCode, "vps_independent_layer_flag"); pcVPS->setIndependentLayerFlag(i, uiCode);
if (!pcVPS->getIndependentLayerFlag(i))
{
#if JVET_P0135_VPS_DIRECT_DEPEN_FLAG_CONSRAINT
uint16_t sumUiCode = 0;
#endif
for (int j = 0, k = 0; j < i; j++)
{
READ_FLAG(uiCode, "vps_direct_dependency_flag"); pcVPS->setDirectRefLayerFlag(i, j, uiCode);
......@@ -2251,8 +2254,14 @@ void HLSyntaxReader::parseVPS(VPS* pcVPS)
{
pcVPS->setInterLayerRefIdc( i, j, k );
pcVPS->setDirectRefLayerIdx( i, k++, j );
#if JVET_P0135_VPS_DIRECT_DEPEN_FLAG_CONSRAINT
sumUiCode++;
#endif
}
}
#if JVET_P0135_VPS_DIRECT_DEPEN_FLAG_CONSRAINT
CHECK(sumUiCode == 0, "There has to be at least one value of j such that the value of vps_direct_dependency_flag[ i ][ j ] is equal to 1,when vps_independent_layer_flag[ i ] is equal to 0 ");
#endif
}
}
}
......
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