diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 3046085ff050e28f64448a6fdd347bb6063582f9..b9fd07cbce91ffc64e326dedd08c047250a2ba62 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -74,7 +74,6 @@ -#define JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC 1 // Move nnpfc_inp_order_idc and nnpfc_out_order_idc, and gate the bit depth syntax elements #define JVET_AD0056_MOVE_COLOUR_DESC_FLAG 1 // Move nnpfc_separate_colour_description_present_flag and associated flags and add conformance checks diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index 286948caa92d2f940bd15d80ca94f8e6a88d71bc..184c61be488256c3e9badd28746d8021ef125fde 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -2965,14 +2965,12 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_inp_format_idc"); sei.m_inpFormatIdc = val; -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC sei_read_uvlc(pDecodedMessageOutputStream,val,"nnpfc_auxiliary_inp_idc"); sei.m_auxInpIdc = val; CHECK(val > 1, "The value of nnpfc_auxiliary_inp_idc shall be in the range of 0 to 1"); sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_inp_order_idc"); sei.m_inpOrderIdc = val; CHECK(val > 3, "The value of nnpfc_inp_order_idc shall be in the range of 0 to 3"); -#endif CHECK(((sei.m_purpose & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0) && sei.m_inpOrderIdc == 0, "When nnpfc_purpose & 0x02 is not equal to 0, nnpfc_inp_order_idc shall not be equal to 0."); #if JVET_AD0233_NNPFC_CHROMA_SAMPLE_LOC @@ -2983,7 +2981,6 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC if (sei.m_inpFormatIdc == 1) { -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC if (sei.m_inpOrderIdc != 1) { sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_inp_tensor_luma_bitdepth_minus8"); @@ -2996,19 +2993,7 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei.m_inpTensorBitDepthChromaMinus8 = val; CHECK(val > 24, "The value of nnpfc_inp_tensor_chroma_bitdepth_minus8 shall be in the range of 0 to 24"); } -#else - sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_inp_tensor_bitdepth_luma_minus8"); - sei.m_inpTensorBitDepthLumaMinus8 = val; - sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_inp_tensor_bitdepth_chroma_minus8"); - sei.m_inpTensorBitDepthChromaMinus8 = val; -#endif } -#if !JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC - sei_read_uvlc(pDecodedMessageOutputStream,val,"nnpfc_aux_inp_idc"); - sei.m_auxInpIdc = val; - sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_inp_order_idc"); - sei.m_inpOrderIdc = val; -#endif #if !JVET_AD0056_MOVE_COLOUR_DESC_FLAG sei_read_flag(pDecodedMessageOutputStream,val,"nnpfc_sep_col_desc_flag"); sei.m_sepColDescriptionFlag = val; @@ -3027,16 +3012,13 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_out_format_idc"); sei.m_outFormatIdc = val; -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_out_order_idc"); sei.m_outOrderIdc = val; CHECK(((sei.m_purpose & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0) && (sei.m_outOrderIdc == 0 || sei.m_outOrderIdc == 3), "When nnpfc_purpose & 0x02 is not equal to 0, nnpfc_out_order_idc shall not be equal to 0 or 3."); CHECK(((sei.m_purpose & NNPC_PurposeType::COLOURIZATION) != 0) && sei.m_outOrderIdc == 0, "When nnpfc_purpose & 0x20 is not equal to 0, nnpfc_out_order_idc shall not be equal to 0."); -#endif if (sei.m_outFormatIdc == 1) { -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC if (sei.m_outOrderIdc != 1) { sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_out_tensor_luma_bitdepth_minus8"); @@ -3049,12 +3031,6 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei.m_outTensorBitDepthChromaMinus8 = val; CHECK(val > 24, "The value of nnpfc_out_tensor_chroma_bitdepth_minus8 shall be in the range of 0 to 24"); } -#else - sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_out_tensor_bitdepth_luma_minus8"); - sei.m_outTensorBitDepthLumaMinus8 = val; - sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_out_tensor_bitdepth_chroma_minus8"); - sei.m_outTensorBitDepthChromaMinus8 = val; -#endif } #if JVET_AD0233_NNPFC_CHROMA_SAMPLE_LOC @@ -3095,11 +3071,6 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei.m_fullRangeFlag = val; } #endif -#if !JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC - sei_read_uvlc(pDecodedMessageOutputStream, val, "nnpfc_out_order_idc"); - sei.m_outOrderIdc = val; - CHECK(((sei.m_purpose & NNPC_PurposeType::CHROMA_UPSAMPLING) != 0) && (sei.m_outOrderIdc == 3), "When nnpfc_purpose & 0x02 is not equal to 0, nnpfc_out_order_idc shall not be equal to 3.") -#endif #if JVET_AD0233_NNPFC_CHROMA_SAMPLE_LOC sei_read_flag(pDecodedMessageOutputStream,val,"nnpfc_chroma_loc_info_present_flag"); diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index f197f603242a685c86d30eddb0b30d8a6b6b3a03..5f5d7709891d1dce8b3381bf8113d7d2251b9537 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1734,13 +1734,10 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN xWriteFlag(sei.m_componentLastFlag, "nnpfc_component_last_flag"); xWriteUvlc(sei.m_inpFormatIdc, "nnpfc_inp_format_idc"); -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC xWriteUvlc(sei.m_auxInpIdc, "nnpfc_auxiliary_inp_idc"); xWriteUvlc(sei.m_inpOrderIdc, "nnpfc_inp_order_idc"); -#endif if (sei.m_inpFormatIdc == 1) { -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC if (sei.m_inpOrderIdc != 1) { xWriteUvlc(sei.m_inpTensorBitDepthLumaMinus8, "nnpfc_inp_tensor_luma_bitdepth_minus8"); @@ -1749,15 +1746,7 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN { xWriteUvlc(sei.m_inpTensorBitDepthChromaMinus8, "nnpfc_inp_tensor_chroma_bitdepth_minus8"); } -#else - xWriteUvlc(sei.m_inpTensorBitDepthLumaMinus8, "nnpfc_inp_tensor_bitdepth_luma_minus8"); - xWriteUvlc(sei.m_inpTensorBitDepthChromaMinus8, "nnpfc_inp_tensor_bitdepth_chroma_minus8"); -#endif } -#if !JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC - xWriteUvlc(sei.m_auxInpIdc, "nnpfc_aux_inp_idc"); - xWriteUvlc(sei.m_inpOrderIdc, "nnpfc_inp_order_idc"); -#endif #if !JVET_AD0056_MOVE_COLOUR_DESC_FLAG xWriteFlag(sei.m_sepColDescriptionFlag, "nnpfc_sep_col_desc_flag"); @@ -1769,12 +1758,9 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN } #endif xWriteUvlc(sei.m_outFormatIdc, "nnpfc_out_format_idc"); -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC xWriteUvlc(sei.m_outOrderIdc, "nnpfc_out_order_idc"); -#endif if (sei.m_outFormatIdc == 1) { -#if JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC if (sei.m_outOrderIdc != 1) { xWriteUvlc(sei.m_outTensorBitDepthLumaMinus8, "nnpfc_out_tensor_luma_bitdepth_minus8"); @@ -1783,10 +1769,6 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN { xWriteUvlc(sei.m_outTensorBitDepthChromaMinus8, "nnpfc_out_tensor_chroma_bitdepth_minus8"); } -#else - xWriteUvlc(sei.m_outTensorBitDepthLumaMinus8, "nnpfc_out_tensor_bitdepth_luma_minus8"); - xWriteUvlc(sei.m_outTensorBitDepthChromaMinus8, "nnpfc_out_tensor_bitdepth_chroma_minus8"); -#endif } #if JVET_AD0056_MOVE_COLOUR_DESC_FLAG @@ -1818,9 +1800,6 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN } #endif -#if !JVET_AD0056_MOVE_NNPFC_INP_AND_OUT_ORDER_IDC - xWriteUvlc(sei.m_outOrderIdc, "nnpfc_out_order_idc"); -#endif xWriteUvlc(sei.m_overlap, "nnpfc_overlap"); xWriteFlag(sei.m_constantPatchSizeFlag, "nnpfc_constant_patch_size_flag"); if (sei.m_constantPatchSizeFlag)