diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 034d79b71efc8ab1598aa1f3e8d7e307e4fdbe7a..1277781e463bffb87162a8d69811043b89c1cd1f 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -663,11 +663,7 @@ void Slice::checkRPL(const ReferencePictureList* pRPL0, const ReferencePictureLi int numActiveEntriesL0 = getNumRefIdx(REF_PIC_LIST_0); int numActiveEntriesL1 = getNumRefIdx(REF_PIC_LIST_1); -#if JVET_Q0042_VUI bool fieldSeqFlag = getSPS()->getFieldSeqFlag(); -#else - bool fieldSeqFlag = getSPS()->getVuiParameters() && getSPS()->getVuiParameters()->getFieldSeqFlag(); -#endif int currentPictureIsTrailing = 0; if (getPic()->getDecodingOrderNumber() > associatedIRAPDecodingOrderNumber) @@ -1257,11 +1253,7 @@ void Slice::checkLeadingPictureRestrictions(PicList& rcListPic) const { numLeadingPicsFound++; int limitNonLP = 0; -#if JVET_Q0042_VUI if (pcSlice->getSPS()->getFieldSeqFlag()) -#else - if (pcSlice->getSPS()->getVuiParameters() && pcSlice->getSPS()->getVuiParameters()->getFieldSeqFlag()) -#endif limitNonLP = 1; CHECK(pcPic->poc > this->getAssociatedIRAPPOC() && numLeadingPicsFound > limitNonLP, "Invalid POC"); } @@ -2601,9 +2593,7 @@ SPS::SPS() , m_numVerVirtualBoundaries(0) , m_numHorVirtualBoundaries(0) , m_generalHrdParametersPresentFlag(false) -#if JVET_Q0042_VUI , m_fieldSeqFlag (false) -#endif , m_vuiParametersPresentFlag (false) , m_vuiParameters () , m_wrapAroundEnabledFlag (false) diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index ecc7bd5fe3b511ec8c8a631fb503d06a4e9693a7..0699c62d1a1ef3bd1bd1b4dd6af6b1cd0cb0847a 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -1135,9 +1135,6 @@ private: int m_colourPrimaries; int m_transferCharacteristics; int m_matrixCoefficients; -#if !JVET_Q0042_VUI - bool m_fieldSeqFlag; -#endif bool m_chromaLocInfoPresentFlag; int m_chromaSampleLocTypeTopField; int m_chromaSampleLocTypeBottomField; @@ -1157,9 +1154,6 @@ public: , m_colourPrimaries (2) , m_transferCharacteristics (2) , m_matrixCoefficients (2) -#if !JVET_Q0042_VUI - , m_fieldSeqFlag (false) -#endif , m_chromaLocInfoPresentFlag (false) , m_chromaSampleLocTypeTopField (0) , m_chromaSampleLocTypeBottomField (0) @@ -1197,10 +1191,6 @@ public: int getMatrixCoefficients() const { return m_matrixCoefficients; } void setMatrixCoefficients(int i) { m_matrixCoefficients = i; } -#if !JVET_Q0042_VUI - bool getFieldSeqFlag() const { return m_fieldSeqFlag; } - void setFieldSeqFlag(bool i) { m_fieldSeqFlag = i; } -#endif bool getChromaLocInfoPresentFlag() const { return m_chromaLocInfoPresentFlag; } void setChromaLocInfoPresentFlag(bool i) { m_chromaLocInfoPresentFlag = i; } @@ -1412,9 +1402,7 @@ private: GeneralHrdParams m_generalHrdParams; OlsHrdParams m_olsHrdParams[MAX_TLAYER]; -#if JVET_Q0042_VUI bool m_fieldSeqFlag; -#endif bool m_vuiParametersPresentFlag; VUI m_vuiParameters; @@ -1766,10 +1754,8 @@ void setCCALFEnabledFlag( bool b ) GeneralHrdParams* getGeneralHrdParameters() { return &m_generalHrdParams; } const GeneralHrdParams* getGeneralHrdParameters() const { return &m_generalHrdParams; } -#if JVET_Q0042_VUI bool getFieldSeqFlag() const { return m_fieldSeqFlag; } void setFieldSeqFlag(bool i) { m_fieldSeqFlag = i; } -#endif bool getVuiParametersPresentFlag() const { return m_vuiParametersPresentFlag; } void setVuiParametersPresentFlag(bool b) { m_vuiParametersPresentFlag = b; } VUI* getVuiParameters() { return &m_vuiParameters; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index ce9a3d5207af2efcf6d3e845a5f6c6e79161d401..27cdaae8fbb1bc898f1a8faf85bb56e1f618824c 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -109,7 +109,6 @@ -#define JVET_Q0042_VUI 1 // Modifications to VUI syntax #define JVET_Q0512_ENC_CHROMA_TS_ACT 1 // JVET-Q0512: encoder-side improvement on enabling chroma transform-skip for ACT diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 42c2c9baced90bd44218668ecfb76d547f4cae57..1cd036e666e78ab20575999c66a30ebf4cc943a4 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1120,7 +1120,6 @@ void HLSyntaxReader::parseScalingListAps( APS* aps ) parseScalingList( &info ); } -#if JVET_Q0042_VUI void HLSyntaxReader::parseVUI(VUI* pcVUI, SPS *pcSPS) { #if ENABLE_TRACING @@ -1173,60 +1172,6 @@ void HLSyntaxReader::parseVUI(VUI* pcVUI, SPS *pcSPS) } } -#else -void HLSyntaxReader::parseVUI(VUI* pcVUI, SPS *pcSPS) -{ -#if ENABLE_TRACING - DTRACE( g_trace_ctx, D_HEADER, "----------- vui_parameters -----------\n"); -#endif - - - uint32_t symbol; - - READ_FLAG( symbol, "aspect_ratio_info_present_flag"); pcVUI->setAspectRatioInfoPresentFlag(symbol); - if (pcVUI->getAspectRatioInfoPresentFlag()) - { - READ_FLAG( symbol, "aspect_ratio_constant_flag"); pcVUI->setAspectRatioConstantFlag(symbol); - READ_CODE(8, symbol, "aspect_ratio_idc"); pcVUI->setAspectRatioIdc(symbol); - if (pcVUI->getAspectRatioIdc() == 255) - { - READ_CODE(16, symbol, "sar_width"); pcVUI->setSarWidth(symbol); - READ_CODE(16, symbol, "sar_height"); pcVUI->setSarHeight(symbol); - } - } - - READ_FLAG( symbol, "colour_description_present_flag"); pcVUI->setColourDescriptionPresentFlag(symbol); - if (pcVUI->getColourDescriptionPresentFlag()) - { - READ_CODE(8, symbol, "colour_primaries"); pcVUI->setColourPrimaries(symbol); - READ_CODE(8, symbol, "transfer_characteristics"); pcVUI->setTransferCharacteristics(symbol); - READ_CODE(8, symbol, "matrix_coeffs"); pcVUI->setMatrixCoefficients(symbol); - READ_FLAG( symbol, "video_full_range_flag"); pcVUI->setVideoFullRangeFlag(symbol); - } - - READ_FLAG( symbol, "field_seq_flag"); pcVUI->setFieldSeqFlag(symbol); - - READ_FLAG( symbol, "chroma_loc_info_present_flag"); pcVUI->setChromaLocInfoPresentFlag(symbol); - if (pcVUI->getChromaLocInfoPresentFlag()) - { - if(pcVUI->getFieldSeqFlag()) - { - READ_UVLC( symbol, "chroma_sample_loc_type_top_field" ); pcVUI->setChromaSampleLocTypeTopField(symbol); - READ_UVLC( symbol, "chroma_sample_loc_type_bottom_field" ); pcVUI->setChromaSampleLocTypeBottomField(symbol); - } - else - { - READ_UVLC( symbol, "chroma_sample_loc_type" ); pcVUI->setChromaSampleLocType(symbol); - } - } - - READ_FLAG( symbol, "overscan_info_present_flag"); pcVUI->setOverscanInfoPresentFlag(symbol); - if (pcVUI->getOverscanInfoPresentFlag()) - { - READ_FLAG( symbol, "overscan_appropriate_flag"); pcVUI->setOverscanAppropriateFlag(symbol); - } -} -#endif void HLSyntaxReader::parseGeneralHrdParameters(GeneralHrdParams *hrd) { @@ -2113,9 +2058,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } } -#if JVET_Q0042_VUI READ_FLAG( uiCode, "field_seq_flag"); pcSPS->setFieldSeqFlag(uiCode); -#endif READ_FLAG( uiCode, "vui_parameters_present_flag" ); pcSPS->setVuiParametersPresentFlag(uiCode); diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 0dbbb5f003dbb45eae6088fcb0ef70dc1b5013d1..2e17c352fe4b58c73b4f8283de272ae09bdd5438 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1353,9 +1353,7 @@ void EncLib::xInitSPS( SPS& sps, VPS& vps ) #if JVET_Q0795_CCALF sps.setCCALFEnabledFlag( m_ccalf ); #endif -#if JVET_Q0042_VUI sps.setFieldSeqFlag(false); -#endif sps.setVuiParametersPresentFlag(getVuiParametersPresentFlag()); if (sps.getVuiParametersPresentFlag()) @@ -1370,9 +1368,6 @@ void EncLib::xInitSPS( SPS& sps, VPS& vps ) pcVUI->setColourPrimaries(getColourPrimaries()); pcVUI->setTransferCharacteristics(getTransferCharacteristics()); pcVUI->setMatrixCoefficients(getMatrixCoefficients()); -#if !JVET_Q0042_VUI - pcVUI->setFieldSeqFlag(false); -#endif pcVUI->setChromaLocInfoPresentFlag(getChromaLocInfoPresentFlag()); pcVUI->setChromaSampleLocTypeTopField(getChromaSampleLocTypeTopField()); pcVUI->setChromaSampleLocTypeBottomField(getChromaSampleLocTypeBottomField()); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 44d044ec35a97f98ccced563aad590ff3cfceec2..a51e8d76ad54ebded5fa4f95e2f7149f64ceb8e7 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -711,7 +711,6 @@ void HLSWriter::codeScalingListAps( APS* pcAPS ) codeScalingList( param ); } -#if JVET_Q0042_VUI void HLSWriter::codeVUI( const VUI *pcVUI, const SPS* pcSPS ) { #if ENABLE_TRACING @@ -758,54 +757,6 @@ void HLSWriter::codeVUI( const VUI *pcVUI, const SPS* pcSPS ) } } } -#else -void HLSWriter::codeVUI( const VUI *pcVUI, const SPS* pcSPS ) -{ -#if ENABLE_TRACING - DTRACE( g_trace_ctx, D_HEADER, "----------- vui_parameters -----------\n"); -#endif - - - WRITE_FLAG(pcVUI->getAspectRatioInfoPresentFlag(), "aspect_ratio_info_present_flag"); - if (pcVUI->getAspectRatioInfoPresentFlag()) - { - WRITE_FLAG(pcVUI->getAspectRatioConstantFlag(), "aspect_ratio_constant_flag"); - WRITE_CODE(pcVUI->getAspectRatioIdc(), 8, "aspect_ratio_idc" ); - if (pcVUI->getAspectRatioIdc() == 255) - { - WRITE_CODE(pcVUI->getSarWidth(), 16, "sar_width"); - WRITE_CODE(pcVUI->getSarHeight(), 16, "sar_height"); - } - } - WRITE_FLAG(pcVUI->getColourDescriptionPresentFlag(), "colour_description_present_flag"); - if (pcVUI->getColourDescriptionPresentFlag()) - { - WRITE_CODE(pcVUI->getColourPrimaries(), 8, "colour_primaries"); - WRITE_CODE(pcVUI->getTransferCharacteristics(), 8, "transfer_characteristics"); - WRITE_CODE(pcVUI->getMatrixCoefficients(), 8, "matrix_coeffs"); - WRITE_FLAG(pcVUI->getVideoFullRangeFlag(), "video_full_range_flag"); - } - WRITE_FLAG(pcVUI->getFieldSeqFlag(), "field_seq_flag"); - WRITE_FLAG(pcVUI->getChromaLocInfoPresentFlag(), "chroma_loc_info_present_flag"); - if (pcVUI->getChromaLocInfoPresentFlag()) - { - if(pcVUI->getFieldSeqFlag()) - { - WRITE_UVLC(pcVUI->getChromaSampleLocTypeTopField(), "chroma_sample_loc_type_top_field"); - WRITE_UVLC(pcVUI->getChromaSampleLocTypeBottomField(), "chroma_sample_loc_type_bottom_field"); - } - else - { - WRITE_UVLC(pcVUI->getChromaSampleLocType(), "chroma_sample_loc_type"); - } - } - WRITE_FLAG(pcVUI->getOverscanInfoPresentFlag(), "overscan_info_present_flag"); - if (pcVUI->getOverscanInfoPresentFlag()) - { - WRITE_FLAG(pcVUI->getOverscanAppropriateFlag(), "overscan_appropriate_flag"); - } -} -#endif void HLSWriter::codeGeneralHrdparameters(const GeneralHrdParams * hrd) { @@ -1378,9 +1329,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) } } -#if JVET_Q0042_VUI WRITE_FLAG(pcSPS->getFieldSeqFlag(), "field_seq_flag"); -#endif WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(), "vui_parameters_present_flag" ); if (pcSPS->getVuiParametersPresentFlag()) {