diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 2d133ae86f75ad6a3d8e54b25172c79f009fe48c..3cc21dcc5ccd1e79cd4e087ca4741128b6c12cbb 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1968,7 +1968,7 @@ SPS::SPS() #endif // KJS: BEGIN former SPSNext parameters , m_LargeCTU ( false ) -, m_IMV ( false ) +, m_Amvr ( false ) , m_DisableMotionCompression ( false ) , m_LMChroma ( false ) #if JVET_M0142_CCLM_COLLOCATED_CHROMA diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index df6cb19ccdebdad3f634c7593fb13ff3f309ab9d..4c12fb4d40a3ab215c43802f774c7ec33299404d 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -951,7 +951,7 @@ private: #endif // KJS: BEGIN former SPSNext parameters bool m_LargeCTU; // 5 - bool m_IMV; // 9 + bool m_Amvr; // 9 bool m_DisableMotionCompression; // 13 bool m_LMChroma; // 17 #if JVET_M0142_CCLM_COLLOCATED_CHROMA @@ -1231,8 +1231,8 @@ public: // KJS: BEGIN former SPSNext parameters void setUseLargeCTU ( bool b ) { m_LargeCTU = b; } bool getUseLargeCTU () const { return m_LargeCTU; } - void setUseIMV ( bool b ) { m_IMV = b; } - bool getUseIMV () const { return m_IMV; } + void setUseAmvr ( bool b ) { m_Amvr = b; } + bool getUseAmvr () const { return m_Amvr; } void setUseAffine ( bool b ) { m_Affine = b; } bool getUseAffine () const { return m_Affine; } void setUseAffineType ( bool b ) { m_AffineType = b; } @@ -1285,7 +1285,7 @@ public: //===== additional parameters ===== // qtbt // sub pu tmvp - void setImvMode(ImvMode m) { m_ImvMode = m; m_IMV = m != 0; } + void setImvMode(ImvMode m) { m_ImvMode = m; m_Amvr = m != 0; } ImvMode getImvMode () const { return m_ImvMode; } // multi type tree diff --git a/source/Lib/CommonLib/dtrace_blockstatistics.cpp b/source/Lib/CommonLib/dtrace_blockstatistics.cpp index 260250473360dd315ee6fc19e618c5a1217d5d8a..30b878f4462d8aff62602c16ba37af428fbd194e 100644 --- a/source/Lib/CommonLib/dtrace_blockstatistics.cpp +++ b/source/Lib/CommonLib/dtrace_blockstatistics.cpp @@ -995,7 +995,7 @@ void writeAllCodedData(const CodingStructure & cs, const UnitArea & ctuArea) DTRACE_BLOCK_AFFINETF(g_trace_ctx, D_BLOCK_STATISTICS_CODED, pu, GetBlockStatisticName(BlockStatistic::AffineMVL1), mv[0].hor, mv[0].ver, mv[1].hor, mv[1].ver, mv[2].hor, mv[2].ver); } } - if (cu.cs->sps->getUseIMV() && CU::hasSubCUNonZeroMVd(cu)) + if (cu.cs->sps->getUseAmvr() && CU::hasSubCUNonZeroMVd(cu)) { DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_CODED, cu, GetBlockStatisticName(BlockStatistic::IMVMode), cu.imv); } diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index 023d97aa6e74b69be5cc7ff26eb6e5966ed5a3a7..d35f7e84420b4d97b8fbc8424bb11fcbf361db64 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -1006,7 +1006,7 @@ void CABACReader::imv_mode( CodingUnit& cu, MergeCtx& mrgCtx ) { RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET( STATS__CABAC_BITS__OTHER ); - if( !cu.cs->sps->getUseIMV() ) + if( !cu.cs->sps->getUseAmvr() ) { return; } diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 25192a92f8b4b5fbf6af555b3bc622e61e0e2f59..b6888d83ab6d8402cdea01439bdf91cd70f6cb95 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -948,8 +948,8 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "partition_constraints_override_enabled_flag"); pcSPS->setSplitConsOverrideEnabledFlag(uiCode); READ_UVLC(uiCode, "sps_log2_diff_min_qt_min_cb_intra_tile_group_luma"); minQT[0] = 1 << (uiCode + pcSPS->getLog2MinCodingBlockSize()); READ_UVLC(uiCode, "sps_log2_diff_min_qt_min_cb_inter_tile_group"); minQT[1] = 1 << (uiCode + pcSPS->getLog2MinCodingBlockSize()); - READ_UVLC(uiCode, "sps_max_mtt_hierarchy_depth_inter_tile_group"); maxBTD[1] = uiCode; - READ_UVLC(uiCode, "sps_max_mtt_hierarchy_depth_intra_tile_group_luma"); maxBTD[0] = uiCode; + READ_UVLC(uiCode, "sps_max_mtt_hierarchy_depth_inter_tile_groups"); maxBTD[1] = uiCode; + READ_UVLC(uiCode, "sps_max_mtt_hierarchy_depth_intra_tile_groups_luma"); maxBTD[0] = uiCode; maxTTSize[0] = maxBTSize[0] = minQT[0]; if (maxBTD[0] != 0) @@ -966,7 +966,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) if (pcSPS->getUseDualITree()) { READ_UVLC(uiCode, "sps_log2_diff_min_qt_min_cb_intra_tile_group_chroma"); minQT[2] = 1 << (uiCode + pcSPS->getLog2MinCodingBlockSize()); - READ_UVLC(uiCode, "sps_max_mtt_hierarchy_depth_intra_tile_group_chroma"); maxBTD[2] = uiCode; + READ_UVLC(uiCode, "sps_max_mtt_hierarchy_depth_intra_tile_groups_chroma"); maxBTD[2] = uiCode; maxTTSize[2] = maxBTSize[2] = minQT[2]; if (maxBTD[2] != 0) { @@ -993,7 +993,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG( uiCode, "sps_sao_enabled_flag" ); pcSPS->setSAOEnabledFlag ( uiCode ? true : false ); READ_FLAG( uiCode, "sps_alf_enabled_flag" ); pcSPS->setALFEnabledFlag ( uiCode ? true : false ); - READ_FLAG( uiCode, "sps_pcm_enabled_flag" ); pcSPS->setPCMEnabledFlag( uiCode ? true : false ); + READ_FLAG( uiCode, "pcm_enabled_flag" ); pcSPS->setPCMEnabledFlag( uiCode ? true : false ); if( pcSPS->getPCMEnabledFlag() ) { READ_CODE( 4, uiCode, "pcm_sample_bit_depth_luma_minus1" ); pcSPS->setPCMBitDepth ( CHANNEL_TYPE_LUMA, 1 + uiCode ); @@ -1020,8 +1020,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) pcSPS->setSBTMVPEnabledFlag(false); } - // KJS: sps_amvr_enabled_flag - READ_FLAG( uiCode, "imv_enable_flag" ); pcSPS->setUseIMV ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_amvr_enable_flag" ); pcSPS->setUseAmvr ( uiCode != 0 ); READ_FLAG( uiCode, "sps_bdof_enabled_flag" ); pcSPS->setBDOFEnabledFlag ( uiCode != 0 ); @@ -1048,8 +1047,8 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) { #endif #if JVET_M0464_UNI_MTS - READ_FLAG( uiCode, "mts_intra_enabled_flag" ); pcSPS->setUseIntraMTS ( uiCode != 0 ); - READ_FLAG( uiCode, "mts_inter_enabled_flag" ); pcSPS->setUseInterMTS ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_mts_intra_enabled_flag" ); pcSPS->setUseIntraMTS ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_mts_inter_enabled_flag" ); pcSPS->setUseInterMTS ( uiCode != 0 ); #else READ_FLAG( uiCode, "emt_intra_enabled_flag" ); pcSPS->setUseIntraEMT ( uiCode != 0 ); READ_FLAG( uiCode, "emt_inter_enabled_flag" ); pcSPS->setUseInterEMT ( uiCode != 0 ); @@ -1058,12 +1057,12 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } #endif // KJS: sps_affine_enabled_flag - READ_FLAG( uiCode, "affine_flag" ); pcSPS->setUseAffine ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_affine_enabled_flag" ); pcSPS->setUseAffine ( uiCode != 0 ); if ( pcSPS->getUseAffine() ) { - READ_FLAG( uiCode, "affine_type_flag" ); pcSPS->setUseAffineType ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_affine_type_flag" ); pcSPS->setUseAffineType ( uiCode != 0 ); } - READ_FLAG( uiCode, "gbi_flag" ); pcSPS->setUseGBi ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_gbi_enabled_flag" ); pcSPS->setUseGBi ( uiCode != 0 ); #if JVET_M0483_IBC READ_FLAG(uiCode, "ibc_flag"); pcSPS->setIBCFlag(uiCode); #else @@ -1072,7 +1071,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) // KJS: sps_ciip_enabled_flag READ_FLAG( uiCode, "mhintra_flag" ); pcSPS->setUseMHIntra ( uiCode != 0 ); - READ_FLAG( uiCode, "triangle_flag" ); pcSPS->setUseTriangle ( uiCode != 0 ); + READ_FLAG( uiCode, "sps_triangle_enabled_flag" ); pcSPS->setUseTriangle ( uiCode != 0 ); // KJS: not in draft yet #if JVET_M0255_FRACMMVD_SWITCH @@ -1117,7 +1116,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG( uiCode, "next_dqp_enabled_flag" ); pcSPS->setUseNextDQP ( uiCode != 0 ); #endif - if( pcSPS->getUseIMV() ) + if( pcSPS->getUseAmvr() ) { READ_UVLC( uiCode, "imv_mode_minus1" ); pcSPS->setImvMode( ImvMode( uiCode + 1 ) ); } diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index 011bfd73548b24a9f104484126e769d73a8614ae..a2bd9dbc7cba5f676c511e769a964a7b8932c677 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -1661,7 +1661,7 @@ void CABACWriter::imv_mode( const CodingUnit& cu ) { const SPS *sps = cu.cs->sps; - if( !sps->getUseIMV() ) + if( !sps->getUseAmvr() ) { return; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index b1b3f24159ded1f3e1e2bd8a1e79db99acba2279..4d73d7dfbfae3822589003da0b52f1cf57b04beb 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -883,7 +883,7 @@ void EncLib::xInitSPS(SPS &sps) sps.setUseDualITree ( m_dualITree ); sps.setSBTMVPEnabledFlag ( m_SubPuMvpMode ); sps.setImvMode ( ImvMode(m_ImvMode) ); - sps.setUseIMV ( m_ImvMode != IMV_OFF ); + sps.setUseAmvr ( m_ImvMode != IMV_OFF ); sps.setBDOFEnabledFlag ( m_BIO ); sps.setUseAffine ( m_Affine ); sps.setUseAffineType ( m_AffineType ); diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index da48f75e042bc2c0f523e394664399a8f6ca5c12..f1b632ad8b3b6384f09160b90d1e1fa46e1e046f 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -1395,7 +1395,7 @@ bool InterSearch::predIBCSearch(CodingUnit& cu, Partitioner& partitioner, const PU::fillMvpCand(pu, REF_PIC_LIST_0, pu.refIdx[REF_PIC_LIST_0], amvpInfo4Pel); #endif - pu.cu->imv = 0;// (Int)cu.cs->sps->getUseIMV(); // set as IMV=0 initially + pu.cu->imv = 0;// (Int)cu.cs->sps->getUseAmvr(); // set as IMV=0 initially Mv cMv, cMvPred[2]; AMVPInfo amvpInfo; #if JVET_M0483_IBC @@ -1493,10 +1493,10 @@ bool InterSearch::predIBCSearch(CodingUnit& cu, Partitioner& partitioner, const pu.cu->imv = 0; if (pu.cu->imv == 2) assert((cMv.getHor() % 16 == 0) && (cMv.getVer() % 16 == 0)); - if (cu.cs->sps->getUseIMV()) + if (cu.cs->sps->getUseAmvr()) assert(pu.cu->imv>0 || pu.mvd[REF_PIC_LIST_0] == Mv()); - if (!cu.cs->sps->getUseIMV()) + if (!cu.cs->sps->getUseAmvr()) pu.mvd[REF_PIC_LIST_0] >>= (2); #if JVET_M0483_IBC @@ -1952,7 +1952,7 @@ void InterSearch::predInterSearch(CodingUnit& cu, Partitioner& partitioner) #if JVET_M0246_AFFINE_AMVR bool checkAffine = pu.cu->imv == 0 || pu.cu->slice->getSPS()->getAffineAmvrEnabledFlag(); - bool checkNonAffine = pu.cu->imv == 0 || ( pu.cu->slice->getSPS()->getUseIMV() && + bool checkNonAffine = pu.cu->imv == 0 || ( pu.cu->slice->getSPS()->getUseAmvr() && pu.cu->imv <= pu.cu->slice->getSPS()->getImvMode() ); CodingUnit *bestCU = pu.cu->cs->bestCS != nullptr ? pu.cu->cs->bestCS->getCU( CHANNEL_TYPE_LUMA ) : nullptr; #if JVET_M0444_SMVD diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index db180cded21ea5ddb8db27f91eeb32dc1f1ad548..655b31acfba571cfe6f10ea4e46f1850836c2bcd 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -642,8 +642,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG(pcSPS->getSplitConsOverrideEnabledFlag(), "partition_constraints_override_enabled_flag"); WRITE_UVLC(g_aucLog2[pcSPS->getMinQTSize(I_SLICE)] - pcSPS->getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_intra_tile_group_luma"); WRITE_UVLC(g_aucLog2[pcSPS->getMinQTSize(B_SLICE)] - pcSPS->getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_inter_tile_group"); - WRITE_UVLC(pcSPS->getMaxBTDepth(), "sps_max_mtt_hierarchy_depth_inter_tile_group"); - WRITE_UVLC(pcSPS->getMaxBTDepthI(), "sps_max_mtt_hierarchy_depth_intra_tile_group_luma"); + WRITE_UVLC(pcSPS->getMaxBTDepth(), "sps_max_mtt_hierarchy_depth_inter_tile_groups"); + WRITE_UVLC(pcSPS->getMaxBTDepthI(), "sps_max_mtt_hierarchy_depth_intra_tile_groups_luma"); if (pcSPS->getMaxBTDepthI() != 0) { WRITE_UVLC(g_aucLog2[pcSPS->getMaxBTSizeI()] - g_aucLog2[pcSPS->getMinQTSize(I_SLICE)], "sps_log2_diff_max_bt_min_qt_intra_tile_group_luma"); @@ -657,7 +657,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) if (pcSPS->getUseDualITree()) { WRITE_UVLC(g_aucLog2[pcSPS->getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)] - pcSPS->getLog2MinCodingBlockSize(), "sps_log2_diff_min_qt_min_cb_intra_tile_group_chroma"); - WRITE_UVLC(pcSPS->getMaxBTDepthIChroma(), "sps_max_mtt_hierarchy_depth_intra_tile_group_chroma"); + WRITE_UVLC(pcSPS->getMaxBTDepthIChroma(), "sps_max_mtt_hierarchy_depth_intra_tile_groups_chroma"); if (pcSPS->getMaxBTDepthIChroma() != 0) { WRITE_UVLC(g_aucLog2[pcSPS->getMaxBTSizeIChroma()] - g_aucLog2[pcSPS->getMinQTSize(I_SLICE, CHANNEL_TYPE_CHROMA)], "sps_log2_diff_max_bt_min_qt_intra_tile_group_chroma"); @@ -672,7 +672,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG( pcSPS->getSAOEnabledFlag(), "sps_sao_enabled_flag"); WRITE_FLAG( pcSPS->getALFEnabledFlag(), "sps_alf_enabled_flag" ); - WRITE_FLAG( pcSPS->getPCMEnabledFlag() ? 1 : 0, "sps_pcm_enabled_flag"); + WRITE_FLAG( pcSPS->getPCMEnabledFlag() ? 1 : 0, "pcm_enabled_flag"); if( pcSPS->getPCMEnabledFlag() ) { WRITE_CODE( pcSPS->getPCMBitDepth(CHANNEL_TYPE_LUMA) - 1, 4, "pcm_sample_bit_depth_luma_minus1" ); @@ -695,8 +695,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG( pcSPS->getSBTMVPEnabledFlag() ? 1 : 0, "sps_sbtmvp_enabled_flag"); } - // KJS: sps_amvr_enabled_flag - WRITE_FLAG( pcSPS->getUseIMV() ? 1 : 0, "imv_enable_flag" ); + WRITE_FLAG( pcSPS->getUseAmvr() ? 1 : 0, "sps_amvr_enable_flag" ); WRITE_FLAG( pcSPS->getBDOFEnabledFlag() ? 1 : 0, "sps_bdof_enabled_flag" ); @@ -723,8 +722,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) { #endif #if JVET_M0464_UNI_MTS - WRITE_FLAG( pcSPS->getUseIntraMTS() ? 1 : 0, "mts_intra_enabled_flag" ); - WRITE_FLAG( pcSPS->getUseInterMTS() ? 1 : 0, "mts_inter_enabled_flag" ); + WRITE_FLAG( pcSPS->getUseIntraMTS() ? 1 : 0, "sps_mts_intra_enabled_flag" ); + WRITE_FLAG( pcSPS->getUseInterMTS() ? 1 : 0, "sps_mts_inter_enabled_flag" ); #else WRITE_FLAG( pcSPS->getUseIntraEMT() ? 1 : 0, "emt_intra_enabled_flag" ); WRITE_FLAG( pcSPS->getUseInterEMT() ? 1 : 0, "emt_inter_enabled_flag" ); @@ -733,12 +732,12 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) } #endif // KJS: sps_affine_enabled_flag - WRITE_FLAG( pcSPS->getUseAffine() ? 1 : 0, "affine_flag" ); + WRITE_FLAG( pcSPS->getUseAffine() ? 1 : 0, "sps_affine_enabled_flag" ); if ( pcSPS->getUseAffine() ) { - WRITE_FLAG( pcSPS->getUseAffineType() ? 1 : 0, "affine_type_flag" ); + WRITE_FLAG( pcSPS->getUseAffineType() ? 1 : 0, "sps_affine_type_flag" ); } - WRITE_FLAG( pcSPS->getUseGBi() ? 1 : 0, "gbi_flag" ); + WRITE_FLAG( pcSPS->getUseGBi() ? 1 : 0, "sps_gbi_enabled_flag" ); #if JVET_M0483_IBC WRITE_FLAG(pcSPS->getIBCFlag() ? 1 : 0, "ibc_flag"); #else @@ -748,7 +747,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) // KJS: sps_ciip_enabled_flag WRITE_FLAG( pcSPS->getUseMHIntra() ? 1 : 0, "mhintra_flag" ); - WRITE_FLAG( pcSPS->getUseTriangle() ? 1: 0, "triangle_flag" ); + WRITE_FLAG( pcSPS->getUseTriangle() ? 1: 0, "sps_triangle_enabled_flag" ); // KJS: not in draft yet #if JVET_M0255_FRACMMVD_SWITCH @@ -796,7 +795,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) // additional parameters - if( pcSPS->getUseIMV() ) + if( pcSPS->getUseAmvr() ) { WRITE_UVLC( pcSPS->getImvMode()-1, "imv_mode_minus1" ); }