Commit 2e638a39 authored by Zhipin Deng's avatar Zhipin Deng

remove legacy chromaArrayType

parent 0f8d17ac
...@@ -1358,8 +1358,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) ...@@ -1358,8 +1358,6 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
} }
#if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE #if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE
const uint32_t chromaArrayType = (int) pcSPS->getSeparateColourPlaneFlag() ? 0 : pcSPS->getChromaFormatIdc(); const uint32_t chromaArrayType = (int) pcSPS->getSeparateColourPlaneFlag() ? 0 : pcSPS->getChromaFormatIdc();
#else
const uint32_t chromaArrayType = (int) pcSPS->getChromaFormatIdc();
#endif #endif
READ_CODE(2, uiCode, "sps_log2_ctu_size_minus5"); pcSPS->setCTUSize(1 << (uiCode + 5)); READ_CODE(2, uiCode, "sps_log2_ctu_size_minus5"); pcSPS->setCTUSize(1 << (uiCode + 5));
...@@ -1638,7 +1636,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) ...@@ -1638,7 +1636,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
READ_FLAG(uiCode, "sps_lfnst_enabled_flag"); pcSPS->setUseLFNST(uiCode != 0); READ_FLAG(uiCode, "sps_lfnst_enabled_flag"); pcSPS->setUseLFNST(uiCode != 0);
#endif #endif
#if JVET_S0052_RM_SEPARATE_COLOUR_PLANE
if (pcSPS->getChromaFormatIdc() != CHROMA_400)
#else
if (chromaArrayType != CHROMA_400) if (chromaArrayType != CHROMA_400)
#endif
{ {
READ_FLAG(uiCode, "sps_joint_cbcr_enabled_flag"); pcSPS->setJointCbCrEnabledFlag(uiCode ? true : false); READ_FLAG(uiCode, "sps_joint_cbcr_enabled_flag"); pcSPS->setJointCbCrEnabledFlag(uiCode ? true : false);
ChromaQpMappingTableParams chromaQpMappingTableParams; ChromaQpMappingTableParams chromaQpMappingTableParams;
...@@ -1874,7 +1876,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) ...@@ -1874,7 +1876,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
} }
#endif #endif
READ_FLAG( uiCode, "sps_palette_enabled_flag"); pcSPS->setPLTMode ( uiCode != 0 ); READ_FLAG( uiCode, "sps_palette_enabled_flag"); pcSPS->setPLTMode ( uiCode != 0 );
#if JVET_S0052_RM_SEPARATE_COLOUR_PLANE
if (pcSPS->getChromaFormatIdc() == CHROMA_444 && pcSPS->getLog2MaxTbSize() != 6)
#else
if (chromaArrayType == CHROMA_444 && pcSPS->getLog2MaxTbSize() != 6) if (chromaArrayType == CHROMA_444 && pcSPS->getLog2MaxTbSize() != 6)
#endif
{ {
READ_FLAG(uiCode, "sps_act_enabled_flag"); pcSPS->setUseColorTrans(uiCode != 0); READ_FLAG(uiCode, "sps_act_enabled_flag"); pcSPS->setUseColorTrans(uiCode != 0);
} }
......
...@@ -1724,10 +1724,10 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps) ...@@ -1724,10 +1724,10 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps)
} }
#if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE #if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE
const uint32_t chromaArrayType = (int)sps.getSeparateColourPlaneFlag() ? 0 : sps.getChromaFormatIdc(); const uint32_t chromaArrayType = (int)sps.getSeparateColourPlaneFlag() ? 0 : sps.getChromaFormatIdc();
if( ( chromaArrayType != CHROMA_400 ) && ( chromaQPOffsetNotZero || chromaDbfOffsetNotSameAsLuma ) )
#else #else
const uint32_t chromaArrayType = (int)sps.getChromaFormatIdc(); if ((sps.getChromaFormatIdc() != CHROMA_400) && (chromaQPOffsetNotZero || chromaDbfOffsetNotSameAsLuma))
#endif #endif
if( ( chromaArrayType != CHROMA_400 ) && ( chromaQPOffsetNotZero || chromaDbfOffsetNotSameAsLuma ) )
{ {
pps.setPPSChromaToolFlag(true); pps.setPPSChromaToolFlag(true);
} }
......
...@@ -788,8 +788,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) ...@@ -788,8 +788,8 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
WRITE_FLAG(pcSPS->getGDREnabledFlag(), "gdr_enabled_flag"); WRITE_FLAG(pcSPS->getGDREnabledFlag(), "gdr_enabled_flag");
WRITE_CODE(int(pcSPS->getChromaFormatIdc ()), 2, "chroma_format_idc"); WRITE_CODE(int(pcSPS->getChromaFormatIdc ()), 2, "chroma_format_idc");
const ChromaFormat format = pcSPS->getChromaFormatIdc();
#if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE #if !JVET_S0052_RM_SEPARATE_COLOUR_PLANE
const ChromaFormat format = pcSPS->getChromaFormatIdc();
const uint32_t separate_colour_plane_flag = pcSPS->getSeparateColourPlaneFlag(); const uint32_t separate_colour_plane_flag = pcSPS->getSeparateColourPlaneFlag();
if( format == CHROMA_444 ) if( format == CHROMA_444 )
{ {
...@@ -798,8 +798,6 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) ...@@ -798,8 +798,6 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
} }
const uint32_t chromaArrayType = separate_colour_plane_flag ? 0 : format; const uint32_t chromaArrayType = separate_colour_plane_flag ? 0 : format;
#else
const uint32_t chromaArrayType = format;
#endif #endif
WRITE_FLAG(pcSPS->getRprEnabledFlag(), "ref_pic_resampling_enabled_flag"); WRITE_FLAG(pcSPS->getRprEnabledFlag(), "ref_pic_resampling_enabled_flag");
...@@ -971,7 +969,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) ...@@ -971,7 +969,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
WRITE_FLAG(pcSPS->getUseLFNST() ? 1 : 0, "sps_lfnst_enabled_flag"); WRITE_FLAG(pcSPS->getUseLFNST() ? 1 : 0, "sps_lfnst_enabled_flag");
#endif #endif
#if JVET_S0052_RM_SEPARATE_COLOUR_PLANE
if (pcSPS->getChromaFormatIdc() != CHROMA_400)
#else
if (chromaArrayType != CHROMA_400) if (chromaArrayType != CHROMA_400)
#endif
{ {
WRITE_FLAG(pcSPS->getJointCbCrEnabledFlag(), "sps_joint_cbcr_enabled_flag"); WRITE_FLAG(pcSPS->getJointCbCrEnabledFlag(), "sps_joint_cbcr_enabled_flag");
const ChromaQpMappingTable& chromaQpMappingTable = pcSPS->getChromaQpMappingTable(); const ChromaQpMappingTable& chromaQpMappingTable = pcSPS->getChromaQpMappingTable();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment