diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 32880d9a1f9db80ea49d7cd6cb091bdc4f200ab1..0eee2fe995df3b4e9d620ba529b69ccfbdc366c4 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -50,6 +50,8 @@ #include <assert.h> #include <cassert> +#define JVET_O0315_RDPCM_INTRAMODE_ALIGN 1 // JVET-O0200/O0205/O0296/O0342/O0463/O0542: Intra prediction mode alignment for BDPCM + #define JVET_O0438_SPS_AFFINE_AMVR_FLAG 1 // JVET-O0438: affine AMVR control flag conditioned on affine control flag in SPS #define JVET_O0052_TU_LEVEL_CTX_CODED_BIN_CONSTRAINT 1 // JVET-O0052 Method-1: TU-level context coded bin constraint diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index 377aba5891f977bd9ee482cc7f8794b14836fb01..65982f78627e3ea612dce3302a98776a8222745b 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -1180,10 +1180,14 @@ void CABACReader::intra_luma_pred_modes( CodingUnit &cu ) if( cu.bdpcmMode ) { +#if JVET_O0315_RDPCM_INTRAMODE_ALIGN + cu.firstPU->intraDir[0] = cu.bdpcmMode == 2? VER_IDX : HOR_IDX; +#else PredictionUnit *pu = cu.firstPU; unsigned mpm_pred[NUM_MOST_PROBABLE_MODES]; PU::getIntraMPMs(*pu, mpm_pred); cu.firstPU->intraDir[0] = mpm_pred[0]; +#endif return; } diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index b47841a33beb4d46971c91200529b6ab4bee183c..fd8f25da2952b8435c64aae64ae21ed343e14189 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -969,10 +969,14 @@ void CABACWriter::intra_luma_pred_modes( const CodingUnit& cu ) if( cu.bdpcmMode ) { +#if JVET_O0315_RDPCM_INTRAMODE_ALIGN + cu.firstPU->intraDir[0] = cu.bdpcmMode == 2? VER_IDX : HOR_IDX; +#else PredictionUnit *pu = cu.firstPU; unsigned mpm_pred[NUM_MOST_PROBABLE_MODES]; PU::getIntraMPMs( *pu, mpm_pred ); cu.firstPU->intraDir[0] = mpm_pred[0]; +#endif return; } diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp index f54a2feadf55cb02441c1369bbb969e0f754e497..c6c7336d9852e04974bce2f7daa82c6d825af185 100644 --- a/source/Lib/EncoderLib/IntraSearch.cpp +++ b/source/Lib/EncoderLib/IntraSearch.cpp @@ -962,9 +962,13 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, { cu.bdpcmMode = -mode; +#if JVET_O0315_RDPCM_INTRAMODE_ALIGN + uiOrgMode = ModeInfo(false, 0, NOT_INTRA_SUBPARTITIONS, cu.bdpcmMode == 2 ? VER_IDX : HOR_IDX); +#else unsigned mpm_pred[NUM_MOST_PROBABLE_MODES]; PU::getIntraMPMs(pu, mpm_pred); uiOrgMode = ModeInfo(false, 0, NOT_INTRA_SUBPARTITIONS, mpm_pred[0]); +#endif cu.mipFlag = uiOrgMode.mipFlg; cu.ispMode = uiOrgMode.ispMod; pu.multiRefIdx = uiOrgMode.mRefId;