#define JVET_R0210_NUMTILESINSLICE_SIGNALLING 1 // JVET-R0210 section 3.3: Don't signal NumTilesInSlice syntax element when numTilesInPic - slice_address is 1.
#define JVET_R0210_NUMTILESINSLICE_SIGNALLING 1 // JVET-R0210 section 3.3: Don't signal NumTilesInSlice syntax element when numTilesInPic - slice_address is 1.
CHECK(aps->getTemporalId()>pSlice->getTLayer(),"TemporalId shall be less than or equal to the TemporalId of the coded slice NAL unit");
CHECK(aps->getTemporalId()>pSlice->getTLayer(),"TemporalId shall be less than or equal to the TemporalId of the coded slice NAL unit");
//ToDO: APS NAL unit containing the APS RBSP shall have nuh_layer_id either equal to the nuh_layer_id of a coded slice NAL unit that referrs it, or equal to the nuh_layer_id of a direct dependent layer of the layer containing a coded slice NAL unit that referrs it.
//ToDO: APS NAL unit containing the APS RBSP shall have nuh_layer_id either equal to the nuh_layer_id of a coded slice NAL unit that referrs it, or equal to the nuh_layer_id of a direct dependent layer of the layer containing a coded slice NAL unit that referrs it.
#if JVET_R0232_CCALF_APS_CONSTRAINT
CHECK(((sps->getCCALFEnabledFlag()==false)&&(aps->getCcAlfAPSParam().newCcAlfFilter[0]||aps->getCcAlfAPSParam().newCcAlfFilter[1])),"When sps_ccalf_enabled_flag is 0, the values of alf_cc_cb_filter_signal_flag and alf_cc_cr_filter_signal_flag shall be equal to 0");
CHECK(((sps->getCCALFEnabledFlag()==false)&&(aps->getCcAlfAPSParam().newCcAlfFilter[0]||aps->getCcAlfAPSParam().newCcAlfFilter[1])),"When sps_ccalf_enabled_flag is 0, the values of alf_cc_cb_filter_signal_flag and alf_cc_cr_filter_signal_flag shall be equal to 0");
CHECK(aps->getTemporalId()>pSlice->getTLayer(),"TemporalId shall be less than or equal to the TemporalId of the coded slice NAL unit");
CHECK(aps->getTemporalId()>pSlice->getTLayer(),"TemporalId shall be less than or equal to the TemporalId of the coded slice NAL unit");
//ToDO: APS NAL unit containing the APS RBSP shall have nuh_layer_id either equal to the nuh_layer_id of a coded slice NAL unit that referrs it, or equal to the nuh_layer_id of a direct dependent layer of the layer containing a coded slice NAL unit that referrs it.
//ToDO: APS NAL unit containing the APS RBSP shall have nuh_layer_id either equal to the nuh_layer_id of a coded slice NAL unit that referrs it, or equal to the nuh_layer_id of a direct dependent layer of the layer containing a coded slice NAL unit that referrs it.
#if JVET_R0232_CCALF_APS_CONSTRAINT
CHECK(((sps->getCCALFEnabledFlag()==false)&&(aps->getCcAlfAPSParam().newCcAlfFilter[0]||aps->getCcAlfAPSParam().newCcAlfFilter[1])),"When sps_ccalf_enabled_flag is 0, the values of alf_cc_cb_filter_signal_flag and alf_cc_cr_filter_signal_flag shall be equal to 0");
CHECK(((sps->getCCALFEnabledFlag()==false)&&(aps->getCcAlfAPSParam().newCcAlfFilter[0]||aps->getCcAlfAPSParam().newCcAlfFilter[1])),"When sps_ccalf_enabled_flag is 0, the values of alf_cc_cb_filter_signal_flag and alf_cc_cr_filter_signal_flag shall be equal to 0");