Commit c936cc58 authored by Chen-Yen Lai's avatar Chen-Yen Lai
Browse files

updated to the latest version

parent 8dd20977
Pipeline #3935 passed with stage
in 8 minutes and 38 seconds
......@@ -50,6 +50,7 @@
#include <assert.h>
#include <cassert>
#define JVET_Q0169_SUBPIC_LEN_CONFORM 1 // JVET-Q0169: add bitstream conformance check on subpic length
#define JVET_Q0504_PLT_NON444 1 // JVET-Q0504: enable palette mode for non 444 color format
#define JVET_Q0089_SLICE_LOSSLESS_CODING_CHROMA_BDPCM 1 // JVET-Q0089: RRC slice-level switch for lossless coding and one SPS flag for luma and chroma BDPCM.
......
......@@ -455,6 +455,9 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS, ParameterSetManager *parameterSetMana
READ_UVLC( uiCode, "pps_subpic_id_len_minus1" ); pcPPS->setSubPicIdLen( uiCode + 1 );
CHECK( uiCode > 15, "Invalid pps_subpic_id_len_minus1 signalled");
#if JVET_Q0169_SUBPIC_LEN_CONFORM
CHECK((1 << pcPPS->getSubPicIdLen()) < pcPPS->getNumSubPics(), "pps_subpic_id_len exceeds valid range");
#endif
for( int picIdx = 0; picIdx < pcPPS->getNumSubPics( ); picIdx++ )
{
READ_CODE( pcPPS->getSubPicIdLen( ), uiCode, "pps_subpic_id[i]" ); pcPPS->setSubPicId( picIdx, uiCode );
......@@ -1286,6 +1289,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
{
READ_UVLC( uiCode, "sps_subpic_id_len_minus1" ); pcSPS->setSubPicIdLen( uiCode + 1 );
CHECK( uiCode > 15, "Invalid sps_subpic_id_len_minus1 signalled");
#if JVET_Q0169_SUBPIC_LEN_CONFORM
CHECK((1 << pcSPS->getSubPicIdLen()) < pcSPS->getNumSubPics(), "sps_subpic_id_len exceeds valid range");
#endif
for( int picIdx = 0; picIdx < pcSPS->getNumSubPics( ); picIdx++ )
{
READ_CODE( pcSPS->getSubPicIdLen( ), uiCode, "sps_subpic_id[i]" ); pcSPS->setSubPicId( picIdx, uiCode );
......@@ -2015,6 +2021,9 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
{
READ_UVLC( uiCode, "ph_subpic_id_len_minus1" ); picHeader->setSubPicIdLen( uiCode + 1 );
CHECK( uiCode > 15, "Invalid ph_subpic_id_len_minus1 signalled");
#if JVET_Q0169_SUBPIC_LEN_CONFORM
CHECK((1 << picHeader->getSubPicIdLen()) < sps->getNumSubPics(), "ph_subpic_id_len exceeds valid range");
#endif
for( int picIdx = 0; picIdx < sps->getNumSubPics( ); picIdx++ )
{
READ_CODE( picHeader->getSubPicIdLen( ), uiCode, "ph_subpic_id[i]" ); picHeader->setSubPicId( picIdx, uiCode );
......
......@@ -282,6 +282,9 @@ void HLSWriter::codePPS( const PPS* pcPPS, const SPS* pcSPS )
WRITE_UVLC( pcPPS->getSubPicIdLen() - 1, "pps_subpic_id_len_minus1" );
#if JVET_Q0169_SUBPIC_LEN_CONFORM
CHECK((1 << pcPPS->getSubPicIdLen()) < pcPPS->getNumSubPics(), "pps_subpic_id_len exceeds valid range");
#endif
for( int picIdx = 0; picIdx < pcPPS->getNumSubPics( ); picIdx++ )
{
WRITE_CODE( pcPPS->getSubPicId(picIdx), pcPPS->getSubPicIdLen( ), "pps_subpic_id[i]" );
......@@ -830,6 +833,9 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
if( pcSPS->getSubPicIdSignallingPresentFlag() )
{
WRITE_UVLC( pcSPS->getSubPicIdLen( ) - 1, "sps_subpic_id_len_minus1" );
#if JVET_Q0169_SUBPIC_LEN_CONFORM
CHECK((1 << pcSPS->getSubPicIdLen()) < pcSPS->getNumSubPics(), "sps_subpic_id_len exceeds valid range");
#endif
for( int picIdx = 0; picIdx < pcSPS->getNumSubPics( ); picIdx++ )
{
WRITE_CODE( pcSPS->getSubPicId(picIdx), pcSPS->getSubPicIdLen( ), "sps_subpic_id[i]" );
......@@ -1357,6 +1363,9 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader )
if( picHeader->getSubPicIdSignallingPresentFlag() )
{
WRITE_UVLC( picHeader->getSubPicIdLen() - 1, "ph_subpic_id_len_minus1" );
#if JVET_Q0169_SUBPIC_LEN_CONFORM
CHECK((1 << picHeader->getSubPicIdLen()) < sps->getNumSubPics(), "ph_subpic_id_len exceeds valid range");
#endif
for( int picIdx = 0; picIdx < sps->getNumSubPics( ); picIdx++ )
{
WRITE_CODE(picHeader->getSubPicId(picIdx), picHeader->getSubPicIdLen( ), "ph_subpic_id[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