diff --git a/source/Lib/CommonLib/LoopFilter.cpp b/source/Lib/CommonLib/LoopFilter.cpp index c7b4d9fd2e6c5b084efdfb96327abd1824ac776a..2200bfd2b91494dce95bdc2c09e4ca4a78d9ca01 100644 --- a/source/Lib/CommonLib/LoopFilter.cpp +++ b/source/Lib/CommonLib/LoopFilter.cpp @@ -689,15 +689,23 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De const CodingUnit& cuQ = cu; const CodingUnit& cuP = *cu.cs->getCU( posP, cu.chType ); +#if !JVET_P0571_FIX_BS_BDPCM_CHROMA if( ( MODE_INTRA == cuP.predMode && cuP.bdpcmMode ) && ( MODE_INTRA == cuQ.predMode && cuQ.bdpcmMode ) ) { return 0; } +#endif //-- Set BS for Intra MB : BS = 4 or 3 if( ( MODE_INTRA == cuP.predMode ) || ( MODE_INTRA == cuQ.predMode ) ) { +#if JVET_P0571_FIX_BS_BDPCM_CHROMA + int bsY = (MODE_INTRA == cuP.predMode && cuP.bdpcmMode) && (MODE_INTRA == cuQ.predMode && cuQ.bdpcmMode) ? 0 : 2; + int bsC = 2; + return (BsSet(bsY, COMPONENT_Y) + BsSet(bsC, COMPONENT_Cb) + BsSet(bsC, COMPONENT_Cr)); +#else return (BsSet(2, COMPONENT_Y) + BsSet(2, COMPONENT_Cb) + BsSet(2, COMPONENT_Cr)); +#endif } const TransformUnit& tuQ = *cuQ.cs->getTU(posQ, cuQ.chType); diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 1bdc55c18c0669bfc4bf6b90aa899d4845b2edf3..0cb6d479bb92b9856ba0f768bcbd22d915d610aa 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -49,6 +49,8 @@ #include <cstring> #include <assert.h> #include <cassert> +#define JVET_P0571_FIX_BS_BDPCM_CHROMA 1 // JVET-P0571: align boundary strength for Chroma BDPCM + #define JVET_P0983_REMOVE_SPS_SBT_MAX_SIZE_FLAG 1 // JVET-P0983/JVET-P0391: Remove sps_sbt_max_size_64_flag #define JVET_P0530_TPM_WEIGHT_ALIGN 1 // JVET-P0530: align chroma weights with luma weights for TPM blending