Commit 8f55daca authored by Fangdong Chen's avatar Fangdong Chen
Browse files

add sps_jccr_flag

parent f9af287c
......@@ -114,7 +114,7 @@ LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 1 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1
JCCR : 1 # JCCR: disable, 1:enable
# Fast tools
PBIntraFast : 1
ISPFast : 1
......
......@@ -130,7 +130,7 @@ LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1
JCCR : 1 # JCCR: disable, 1:enable
# Fast tools
PBIntraFast : 1
ISPFast : 1
......
......@@ -134,7 +134,7 @@ LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1
JCCR : 1 # JCCR: disable, 1:enable
# Fast tools
PBIntraFast : 1
ISPFast : 1
......
......@@ -152,7 +152,7 @@ LMCSUpdateCtrl : 0 # LMCS model update control: 0:RA, 1:AI, 2
MIP : 1
DMVR : 1
SMVD : 1
JCCR : 1 # JCCR: disable, 1:enable
# Fast tools
PBIntraFast : 1
ISPFast : 1
......
......@@ -290,6 +290,9 @@ void EncApp::xInitLibCfg()
m_cEncLib.setMMVD ( m_MMVD );
m_cEncLib.setMmvdDisNum (m_MmvdDisNum);
m_cEncLib.setRDPCM ( m_RdpcmMode );
#if JVET_O0376_SPS_JCCR_FLAG
m_cEncLib.setJCCR (m_JccrMode);
#endif
m_cEncLib.setIBCMode ( m_IBCMode );
m_cEncLib.setIBCLocalSearchRangeX ( m_IBCLocalSearchRangeX );
m_cEncLib.setIBCLocalSearchRangeY ( m_IBCLocalSearchRangeY );
......
......@@ -901,6 +901,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("DMVR", m_DMVR, false, "Decoder-side Motion Vector Refinement")
("MmvdDisNum", m_MmvdDisNum, 8, "Number of MMVD Distance Entries")
( "RDPCM", m_RdpcmMode, false, "RDPCM")
#if JVET_O0376_SPS_JCCR_FLAG
("JCCR", m_JccrMode, false, "JCCR")
#endif
( "IBC", m_IBCMode, 0u, "IBCMode (0x1:enabled, 0x0:disabled) [default: disabled]")
( "IBCLocalSearchRangeX", m_IBCLocalSearchRangeX, 128u, "Search range of IBC local search in x direction")
( "IBCLocalSearchRangeY", m_IBCLocalSearchRangeY, 128u, "Search range of IBC local search in y direction")
......@@ -2206,6 +2209,9 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara(m_DMVR, "DMVR only allowed with NEXT profile");
xConfirmPara(m_MmvdDisNum, "Number of distance MMVD entry setting only allowed with NEXT profile");
xConfirmPara(m_RdpcmMode, "RDPCM only allowed with NEXT profile");
#if JVET_O0376_SPS_JCCR_FLAG
xConfirmPara(m_JccrMode, "JCCR only allowed with NEXT profile");
#endif
// ADD_NEW_TOOL : (parameter check) add a check for next tools here
}
else
......@@ -2495,11 +2501,20 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_cbQpOffsetDualTree > 12, "Max. Chroma Cb QP Offset for dual tree is 12" );
xConfirmPara( m_crQpOffsetDualTree < -12, "Min. Chroma Cr QP Offset for dual tree is -12" );
xConfirmPara( m_crQpOffsetDualTree > 12, "Max. Chroma Cr QP Offset for dual tree is 12" );
xConfirmPara( m_cbCrQpOffset < -12, "Min. Joint Cb-Cr QP Offset is -12" );
xConfirmPara( m_cbCrQpOffset > 12, "Max. Joint Cb-Cr QP Offset is 12" );
xConfirmPara( m_cbCrQpOffsetDualTree < -12, "Min. Joint Cb-Cr QP Offset for dual tree is -12" );
xConfirmPara( m_cbCrQpOffsetDualTree > 12, "Max. Joint Cb-Cr QP Offset for dual tree is 12" );
#if JVET_O0376_SPS_JCCR_FLAG
if (m_JccrMode)
{
xConfirmPara(m_cbCrQpOffset < -12, "Min. Joint Cb-Cr QP Offset is -12");
xConfirmPara(m_cbCrQpOffset > 12, "Max. Joint Cb-Cr QP Offset is 12");
xConfirmPara(m_cbCrQpOffsetDualTree < -12, "Min. Joint Cb-Cr QP Offset for dual tree is -12");
xConfirmPara(m_cbCrQpOffsetDualTree > 12, "Max. Joint Cb-Cr QP Offset for dual tree is 12");
}
#else
xConfirmPara(m_cbCrQpOffset < -12, "Min. Joint Cb-Cr QP Offset is -12");
xConfirmPara(m_cbCrQpOffset > 12, "Max. Joint Cb-Cr QP Offset is 12");
xConfirmPara(m_cbCrQpOffsetDualTree < -12, "Min. Joint Cb-Cr QP Offset for dual tree is -12");
xConfirmPara(m_cbCrQpOffsetDualTree > 12, "Max. Joint Cb-Cr QP Offset for dual tree is 12");
#endif
xConfirmPara( m_iQPAdaptationRange <= 0, "QP Adaptation Range must be more than 0" );
if (m_iDecodingRefreshType == 2)
{
......@@ -3377,6 +3392,9 @@ void EncAppCfg::xPrintParameter()
msg(VERBOSE, "DMVR:%d ", m_DMVR);
msg(VERBOSE, "MmvdDisNum:%d ", m_MmvdDisNum);
msg(VERBOSE, "RDPCM:%d ", m_RdpcmMode );
#if JVET_O0376_SPS_JCCR_FLAG
msg(VERBOSE, "JCCR:%d ", m_JccrMode);
#endif
}
msg(VERBOSE, "IBC:%d ", m_IBCMode);
msg( VERBOSE, "HashME:%d ", m_HashME );
......
......@@ -283,6 +283,9 @@ protected:
bool m_MMVD;
int m_MmvdDisNum;
bool m_RdpcmMode;
#if JVET_O0376_SPS_JCCR_FLAG
bool m_JccrMode;
#endif
unsigned m_IBCMode;
unsigned m_IBCLocalSearchRangeX;
unsigned m_IBCLocalSearchRangeY;
......
......@@ -185,6 +185,9 @@ class ConstraintInfo
bool m_noPartitionConstraintsOverrideConstraintFlag;
bool m_noSaoConstraintFlag;
bool m_noAlfConstraintFlag;
#if JVET_O0376_SPS_JCCR_FLAG
bool m_noJccrConstraintFlag;
#endif
bool m_noPcmConstraintFlag;
bool m_noRefWraparoundConstraintFlag;
bool m_noTemporalMvpConstraintFlag;
......@@ -284,6 +287,10 @@ public:
void setNoSaoConstraintFlag(bool bVal) { m_noSaoConstraintFlag = bVal; }
bool getNoAlfConstraintFlag() const { return m_noAlfConstraintFlag; }
void setNoAlfConstraintFlag(bool bVal) { m_noAlfConstraintFlag = bVal; }
#if JVET_O0376_SPS_JCCR_FLAG
bool getNoJccrConstraintFlag() const { return m_noJccrConstraintFlag; }
void setNoJccrConstraintFlag(bool bVal) { m_noJccrConstraintFlag = bVal; }
#endif
bool getNoPcmConstraintFlag() const { return m_noPcmConstraintFlag; }
void setNoPcmConstraintFlag(bool bVal) { m_noPcmConstraintFlag = bVal; }
bool getNoRefWraparoundConstraintFlag() const { return m_noRefWraparoundConstraintFlag; }
......@@ -753,7 +760,9 @@ private:
#endif
bool m_saoEnabledFlag;
#if JVET_O0376_SPS_JCCR_FLAG
bool m_jccrEnabledFlag;
#endif
bool m_bTemporalIdNestingFlag; // temporal_id_nesting_flag
bool m_scalingListEnabledFlag;
......@@ -935,7 +944,10 @@ public:
bool getALFEnabledFlag() const { return m_alfEnabledFlag; }
void setALFEnabledFlag( bool b ) { m_alfEnabledFlag = b; }
#if JVET_O0376_SPS_JCCR_FLAG
void setJCCREnabledFlag(bool bVal) { m_jccrEnabledFlag = bVal; }
bool getJCCREnabledFlag() const { return m_jccrEnabledFlag; }
#endif
bool getSBTMVPEnabledFlag() const { return m_sbtmvpEnabledFlag; }
void setSBTMVPEnabledFlag(bool b) { m_sbtmvpEnabledFlag = b; }
......
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_O0376_SPS_JCCR_FLAG 1 // JVET-O0376: add the JCCR control flag in SPS
#define JVET_O1136_TS_BDPCM_SIGNALLING 1 // JVET-O1136: Unified syntax for JVET-O0165/O0200/O0783 on TS and BDPCM signalling
#define JVET_O0219_LFNST_TRANSFORM_SET_FOR_LMCMODE 1
......
......@@ -2628,6 +2628,13 @@ void CABACReader::cu_chroma_qp_offset( CodingUnit& cu )
#if JVET_O0105_ICT
void CABACReader::joint_cb_cr( TransformUnit& tu, const int cbfMask )
{
#if JVET_O0376_SPS_JCCR_FLAG
if (!tu.cu->slice->getSPS()->getJCCREnabledFlag())
{
return;
}
#endif
#if JVET_O0543_ICT_ICU_ONLY
if( ( CU::isIntra( *tu.cu ) && cbfMask ) || ( cbfMask == 3 ) )
#else
......
......@@ -1220,7 +1220,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
#endif
READ_FLAG( uiCode, "sps_sao_enabled_flag" ); pcSPS->setSAOEnabledFlag ( uiCode ? true : false );
READ_FLAG( uiCode, "sps_alf_enabled_flag" ); pcSPS->setALFEnabledFlag ( uiCode ? true : false );
#if JVET_O0376_SPS_JCCR_FLAG
READ_FLAG(uiCode, "sps_jccr_enabled_flag"); pcSPS->setJCCREnabledFlag(uiCode ? true : false);
#endif
READ_FLAG( uiCode, "sps_pcm_enabled_flag" ); pcSPS->setPCMEnabledFlag( uiCode ? true : false );
if( pcSPS->getPCMEnabledFlag() )
{
......@@ -2065,10 +2067,21 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
}
}
#if JVET_O0105_ICT
#if JVET_O0376_SPS_JCCR_FLAG
if (bChroma && sps->getJCCREnabledFlag())
{
READ_FLAG(uiCode, "joint_cb_cr_sign_flag"); pcSlice->setJointCbCrSignFlag(uiCode != 0);
}
else
{
pcSlice->setJointCbCrSignFlag(0);
}
#else
if (bChroma)
{
READ_FLAG( uiCode, "joint_cb_cr_sign_flag" ); pcSlice->setJointCbCrSignFlag( uiCode != 0 );
READ_FLAG(uiCode, "joint_cb_cr_sign_flag"); pcSlice->setJointCbCrSignFlag(uiCode != 0);
}
#endif
#endif
READ_SVLC( iCode, "slice_qp_delta" );
......@@ -2098,13 +2111,24 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
CHECK( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr) > 12, "Invalid chroma QP offset" );
CHECK( (pps->getQpOffset(COMPONENT_Cr) + pcSlice->getSliceChromaQpDelta(COMPONENT_Cr)) < -12, "Invalid chroma QP offset" );
CHECK( (pps->getQpOffset(COMPONENT_Cr) + pcSlice->getSliceChromaQpDelta(COMPONENT_Cr)) > 12, "Invalid chroma QP offset" );
READ_SVLC( iCode, "slice_cb_cr_qp_offset" );
pcSlice->setSliceChromaQpDelta(JOINT_CbCr, iCode );
CHECK( pcSlice->getSliceChromaQpDelta(JOINT_CbCr) < -12, "Invalid chroma QP offset" );
CHECK( pcSlice->getSliceChromaQpDelta(JOINT_CbCr) > 12, "Invalid chroma QP offset" );
CHECK( (pps->getQpOffset(JOINT_CbCr) + pcSlice->getSliceChromaQpDelta(JOINT_CbCr)) < -12, "Invalid chroma QP offset" );
CHECK( (pps->getQpOffset(JOINT_CbCr) + pcSlice->getSliceChromaQpDelta(JOINT_CbCr)) > 12, "Invalid chroma QP offset" );
#if JVET_O0376_SPS_JCCR_FLAG
if (sps->getJCCREnabledFlag())
{
READ_SVLC(iCode, "slice_cb_cr_qp_offset");
pcSlice->setSliceChromaQpDelta(JOINT_CbCr, iCode);
CHECK(pcSlice->getSliceChromaQpDelta(JOINT_CbCr) < -12, "Invalid chroma QP offset");
CHECK(pcSlice->getSliceChromaQpDelta(JOINT_CbCr) > 12, "Invalid chroma QP offset");
CHECK((pps->getQpOffset(JOINT_CbCr) + pcSlice->getSliceChromaQpDelta(JOINT_CbCr)) < -12, "Invalid chroma QP offset");
CHECK((pps->getQpOffset(JOINT_CbCr) + pcSlice->getSliceChromaQpDelta(JOINT_CbCr)) > 12, "Invalid chroma QP offset");
}
#else
READ_SVLC(iCode, "slice_cb_cr_qp_offset");
pcSlice->setSliceChromaQpDelta(JOINT_CbCr, iCode);
CHECK(pcSlice->getSliceChromaQpDelta(JOINT_CbCr) < -12, "Invalid chroma QP offset");
CHECK(pcSlice->getSliceChromaQpDelta(JOINT_CbCr) > 12, "Invalid chroma QP offset");
CHECK((pps->getQpOffset(JOINT_CbCr) + pcSlice->getSliceChromaQpDelta(JOINT_CbCr)) < -12, "Invalid chroma QP offset");
CHECK((pps->getQpOffset(JOINT_CbCr) + pcSlice->getSliceChromaQpDelta(JOINT_CbCr)) > 12, "Invalid chroma QP offset");
#endif
}
}
......@@ -2289,6 +2313,10 @@ void HLSyntaxReader::parseConstraintInfo(ConstraintInfo *cinfo)
READ_FLAG(symbol, "no_partition_constraints_override_constraint_flag"); cinfo->setNoPartitionConstraintsOverrideConstraintFlag(symbol > 0 ? true : false);
READ_FLAG(symbol, "no_sao_constraint_flag"); cinfo->setNoSaoConstraintFlag(symbol > 0 ? true : false);
READ_FLAG(symbol, "no_alf_constraint_flag"); cinfo->setNoAlfConstraintFlag(symbol > 0 ? true : false);
#if JVET_O0376_SPS_JCCR_FLAG
READ_FLAG(symbol, "no_jccr_constraint_flag"); cinfo->setNoAlfConstraintFlag(symbol > 0 ? true : false);
#endif
READ_FLAG(symbol, "no_pcm_constraint_flag"); cinfo->setNoPcmConstraintFlag(symbol > 0 ? true : false);
READ_FLAG(symbol, "no_ref_wraparound_constraint_flag"); cinfo->setNoRefWraparoundConstraintFlag(symbol > 0 ? true : false);
READ_FLAG(symbol, "no_temporal_mvp_constraint_flag"); cinfo->setNoTemporalMvpConstraintFlag(symbol > 0 ? true : false);
......
......@@ -2501,6 +2501,13 @@ void CABACWriter::cu_chroma_qp_offset( const CodingUnit& cu )
#if JVET_O0105_ICT
void CABACWriter::joint_cb_cr( const TransformUnit& tu, const int cbfMask )
{
#if JVET_O0376_SPS_JCCR_FLAG
if (!tu.cu->slice->getSPS()->getJCCREnabledFlag())
{
return;
}
#endif
CHECK( tu.jointCbCr && tu.jointCbCr != cbfMask, "wrong value of jointCbCr (" << (int)tu.jointCbCr << " vs " << (int)cbfMask << ")" );
#if JVET_O0543_ICT_ICU_ONLY
if( ( CU::isIntra( *tu.cu ) && cbfMask ) || ( cbfMask == 3 ) )
......
......@@ -299,6 +299,9 @@ protected:
bool m_MMVD;
int m_MmvdDisNum;
bool m_RdpcmMode;
#if JVET_O0376_SPS_JCCR_FLAG
bool m_JccrMode;
#endif
unsigned m_IBCMode;
unsigned m_IBCLocalSearchRangeX;
unsigned m_IBCLocalSearchRangeY;
......@@ -873,6 +876,10 @@ public:
int getMmvdDisNum () const { return m_MmvdDisNum; }
void setRDPCM ( bool b ) { m_RdpcmMode = b; }
bool getRDPCM () const { return m_RdpcmMode; }
#if JVET_O0376_SPS_JCCR_FLAG
void setJCCR (bool b) { m_JccrMode = b; }
bool getJCCR () const { return m_JccrMode; }
#endif
void setIBCMode (unsigned n) { m_IBCMode = n; }
unsigned getIBCMode () const { return m_IBCMode; }
void setIBCLocalSearchRangeX (unsigned n) { m_IBCLocalSearchRangeX = n; }
......
......@@ -2092,7 +2092,14 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
// overwrite chroma qp offset for dual tree
pcSlice->setSliceChromaQpDelta(COMPONENT_Cb, m_pcCfg->getChromaCbQpOffsetDualTree());
pcSlice->setSliceChromaQpDelta(COMPONENT_Cr, m_pcCfg->getChromaCrQpOffsetDualTree());
pcSlice->setSliceChromaQpDelta(JOINT_CbCr, m_pcCfg->getChromaCbCrQpOffsetDualTree());
#if JVET_O0376_SPS_JCCR_FLAG
if (pcSlice->getSPS()->getJCCREnabledFlag())
{
pcSlice->setSliceChromaQpDelta(JOINT_CbCr, m_pcCfg->getChromaCbCrQpOffsetDualTree());
}
#else
pcSlice->setSliceChromaQpDelta(JOINT_CbCr, m_pcCfg->getChromaCbCrQpOffsetDualTree());
#endif
m_pcSliceEncoder->setUpLambda(pcSlice, pcSlice->getLambdas()[0], pcSlice->getSliceQp());
}
if (pcSlice->getSPS()->getUseReshaper())
......
......@@ -980,7 +980,9 @@ void EncLib::xInitSPS(SPS &sps)
}
sps.setSAOEnabledFlag( m_bUseSAO );
#if JVET_O0376_SPS_JCCR_FLAG
sps.setJCCREnabledFlag(m_JccrMode);
#endif
sps.setMaxTLayers( m_maxTempLayer );
sps.setTemporalIdNestingFlag( ( m_maxTempLayer == 1 ) ? true : false );
......
......@@ -1554,7 +1554,14 @@ void EncSlice::encodeCtus( Picture* pcPic, const bool bCompressEntireSlice, cons
checkDisFracMmvd( pcPic, startCtuTsAddr, boundingCtuTsAddr );
#if JVET_O0105_ICT
setJointCbCrModes( cs, Position(0, 0), cs.area.lumaSize() );
#if JVET_O0376_SPS_JCCR_FLAG
if (pcSlice->getSPS()->getJCCREnabledFlag())
{
setJointCbCrModes(cs, Position(0, 0), cs.area.lumaSize());
}
#else
setJointCbCrModes(cs, Position(0, 0), cs.area.lumaSize());
#endif
#endif
// for every CTU in the slice segment (may terminate sooner if there is a byte limit on the slice-segment)
......
......@@ -6929,9 +6929,11 @@ void InterSearch::xEstimateInterResidualQT(CodingStructure &cs, Partitioner &par
{
const CompArea& cbArea = tu.blocks[COMPONENT_Cb];
const CompArea& crArea = tu.blocks[COMPONENT_Cr];
#if JVET_O0376_SPS_JCCR_FLAG
bool checkJointCbCr = (tu.cu->slice->getSPS()->getJCCREnabledFlag()) &&(!tu.noResidual) && (TU::getCbf(tu, COMPONENT_Cb) || TU::getCbf(tu, COMPONENT_Cr));
#else
bool checkJointCbCr = !tu.noResidual && (TU::getCbf(tu, COMPONENT_Cb) || TU::getCbf(tu, COMPONENT_Cr));
#endif
#if JVET_O0105_ICT
const int channelBitDepth = sps.getBitDepth(toChannelType(COMPONENT_Cb));
bool reshape = slice.getLmcsEnabledFlag() && m_pcReshape->getCTUFlag() && slice.getLmcsChromaResidualScaleFlag()
......
......@@ -2966,11 +2966,20 @@ ChromaCbfs IntraSearch::xRecurIntraChromaCodingQT( CodingStructure &cs, Partitio
#if JVET_O0105_ICT
bool lastIsBest = false;
std::vector<int> jointCbfMasksToTest;
if( TU::getCbf(tmpTU, COMPONENT_Cb) || TU::getCbf(tmpTU, COMPONENT_Cr) )
#if JVET_O0376_SPS_JCCR_FLAG
if (cs.sps->getJCCREnabledFlag())
{
jointCbfMasksToTest = m_pcTrQuant->selectICTCandidates( currTU, orgResiCb, orgResiCr );
if (TU::getCbf(tmpTU, COMPONENT_Cb) || TU::getCbf(tmpTU, COMPONENT_Cr))
{
jointCbfMasksToTest = m_pcTrQuant->selectICTCandidates(currTU, orgResiCb, orgResiCr);
}
}
#else
if (TU::getCbf(tmpTU, COMPONENT_Cb) || TU::getCbf(tmpTU, COMPONENT_Cr))
{
jointCbfMasksToTest = m_pcTrQuant->selectICTCandidates(currTU, orgResiCb, orgResiCr);
}
#endif
for( int cbfMask : jointCbfMasksToTest )
#else
bool checkJointCbCr = TU::getCbf(tmpTU, COMPONENT_Cb) || TU::getCbf(tmpTU, COMPONENT_Cr);
......
......@@ -813,7 +813,9 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
#endif
WRITE_FLAG( pcSPS->getSAOEnabledFlag(), "sps_sao_enabled_flag");
WRITE_FLAG( pcSPS->getALFEnabledFlag(), "sps_alf_enabled_flag" );
#if JVET_O0376_SPS_JCCR_FLAG
WRITE_FLAG(pcSPS->getJCCREnabledFlag(), "sps_jccr_enabled_flag");
#endif
WRITE_FLAG( pcSPS->getPCMEnabledFlag() ? 1 : 0, "sps_pcm_enabled_flag");
if( pcSPS->getPCMEnabledFlag() )
{
......@@ -1430,10 +1432,17 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
}
}
#if JVET_O0105_ICT
#if JVET_O0376_SPS_JCCR_FLAG
if (chromaEnabled && pcSlice->getSPS()->getJCCREnabledFlag())
{
WRITE_FLAG(pcSlice->getJointCbCrSignFlag() ? 1 : 0, "joint_cb_cr_sign_flag");
}
#else
if (chromaEnabled)
{
WRITE_FLAG( pcSlice->getJointCbCrSignFlag() ? 1 : 0, "joint_cb_cr_sign_flag" );
WRITE_FLAG(pcSlice->getJointCbCrSignFlag() ? 1 : 0, "joint_cb_cr_sign_flag");
}
#endif
#endif
int iCode = pcSlice->getSliceQp() - ( pcSlice->getPPS()->getPicInitQPMinus26() + 26 );
......@@ -1447,7 +1456,14 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
if (numberValidComponents > COMPONENT_Cr)
{
WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "slice_cr_qp_offset" );
WRITE_SVLC( pcSlice->getSliceChromaQpDelta(JOINT_CbCr), "slice_cb_cr_qp_offset" );
#if JVET_O0376_SPS_JCCR_FLAG
if (pcSlice->getSPS()->getJCCREnabledFlag())
{
WRITE_SVLC(pcSlice->getSliceChromaQpDelta(JOINT_CbCr), "slice_cb_cr_qp_offset");
}
#else
WRITE_SVLC(pcSlice->getSliceChromaQpDelta(JOINT_CbCr), "slice_cb_cr_qp_offset");
#endif
}
CHECK(numberValidComponents < COMPONENT_Cr+1, "Too many valid components");
}
......@@ -1517,6 +1533,9 @@ void HLSWriter::codeConstraintInfo ( const ConstraintInfo* cinfo )
WRITE_FLAG(cinfo->getNoPartitionConstraintsOverrideConstraintFlag() ? 1 : 0, "no_partition_constraints_override_constraint_flag");
WRITE_FLAG(cinfo->getNoSaoConstraintFlag() ? 1 : 0, "no_sao_constraint_flag");
WRITE_FLAG(cinfo->getNoAlfConstraintFlag() ? 1 : 0, "no_alf_constraint_flag");
#if JVET_O0376_SPS_JCCR_FLAG
WRITE_FLAG(cinfo->getNoJccrConstraintFlag() ? 1 : 0, "no_jccr_constraint_flag");
#endif
WRITE_FLAG(cinfo->getNoPcmConstraintFlag() ? 1 : 0, "no_pcm_constraint_flag");
WRITE_FLAG(cinfo->getNoRefWraparoundConstraintFlag() ? 1 : 0, "no_ref_wraparound_constraint_flag");
WRITE_FLAG(cinfo->getNoTemporalMvpConstraintFlag() ? 1 : 0, "no_temporal_mvp_constraint_flag");
......
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