- Timestamp:
- 13 Aug 2014, 18:37:06 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r863 r868 2076 2076 #if !SVC_EXTENSION 2077 2077 // reading external Colour Remapping Information SEI message parameters from file 2078 if( m_colourRemapSEIFile. length())2078 if( m_colourRemapSEIFile.size() > 0 ) 2079 2079 { 2080 2080 FILE* fic; … … 2091 2091 { 2092 2092 retval = fscanf( fic, "%d", &m_colourRemapSEIPersistenceFlag ); 2093 retval = fscanf( fic, "%d", &m_colourRemapSEIVideoSignal TypePresentFlag);2094 if( m_colourRemapSEIVideoSignal TypePresentFlag )2095 { 2096 retval = fscanf( fic, "%d", &m_colourRemapSEI VideoFullRangeFlag );2093 retval = fscanf( fic, "%d", &m_colourRemapSEIVideoSignalInfoPresentFlag); 2094 if( m_colourRemapSEIVideoSignalInfoPresentFlag ) 2095 { 2096 retval = fscanf( fic, "%d", &m_colourRemapSEIFullRangeFlag ); 2097 2097 retval = fscanf( fic, "%d", &m_colourRemapSEIPrimaries ); 2098 retval = fscanf( fic, "%d", &m_colourRemapSEITransfer Characteristics);2099 retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoeff s );2100 } 2101 2102 retval = fscanf( fic, "%d", &m_colourRemapSEI CodedDataBitDepth );2103 retval = fscanf( fic, "%d", &m_colourRemapSEI TargetBitDepth );2098 retval = fscanf( fic, "%d", &m_colourRemapSEITransferFunction ); 2099 retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoefficients ); 2100 } 2101 2102 retval = fscanf( fic, "%d", &m_colourRemapSEIInputBitDepth ); 2103 retval = fscanf( fic, "%d", &m_colourRemapSEIBitDepth ); 2104 2104 2105 2105 for( Int c=0 ; c<3 ; c++ ) … … 2170 2170 { 2171 2171 retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag = tempCode ? 1 : 0; 2172 retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoSignal TypePresentFlag = tempCode ? 1 : 0;2173 if( m_acLayerCfg[layer].m_colourRemapSEIVideoSignal TypePresentFlag )2174 { 2175 retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEI VideoFullRangeFlag = tempCode ? 1 : 0;2172 retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag = tempCode ? 1 : 0; 2173 if( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag ) 2174 { 2175 retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag = tempCode ? 1 : 0; 2176 2176 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIPrimaries ); 2177 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITransfer Characteristics);2178 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIMatrixCoeff s );2179 } 2180 2181 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEI CodedDataBitDepth );2182 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEI TargetBitDepth );2177 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITransferFunction ); 2178 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients ); 2179 } 2180 2181 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth ); 2182 retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIBitDepth ); 2183 2183 2184 2184 for( Int c=0 ; c<3 ; c++ ) … … 3324 3324 #if Q0074_COLOUR_REMAPPING_SEI 3325 3325 #if !SVC_EXTENSION 3326 if ( m_colourRemapSEIFile.c_str() && !m_colourRemapSEICancelFlag )3327 { 3328 xConfirmPara( m_colourRemapSEI CodedDataBitDepth < 8 || m_colourRemapSEICodedDataBitDepth > 16 , "colour_remap_coded_data_bit_depth shall be in the range of 8 to 16, inclusive");3329 xConfirmPara( m_colourRemapSEI TargetBitDepth < 8 || (m_colourRemapSEITargetBitDepth > 16 && m_colourRemapSEITargetBitDepth < 255) , "colour_remap_target_bit_depth shall be in the range of 8 to 16, inclusive");3326 if ( ( m_colourRemapSEIFile.size() > 0 ) && !m_colourRemapSEICancelFlag ) 3327 { 3328 xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive"); 3329 xConfirmPara( m_colourRemapSEIBitDepth < 8 || m_colourRemapSEIBitDepth > 16, "colour_remap_bit_depth shall be in the range of 8 to 16, inclusive"); 3330 3330 for( Int c=0 ; c<3 ; c++) 3331 3331 { … … 3334 3334 for( Int i=0 ; i<=m_colourRemapSEIPreLutNumValMinus1[c] ; i++) 3335 3335 { 3336 xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEI CodedDataBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");3337 xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEI TargetBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");3336 xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEIInputBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_input_bit_depth)-1, inclusive"); 3337 xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive"); 3338 3338 } 3339 3339 xConfirmPara( m_colourRemapSEIPostLutNumValMinus1[c] < 0 || m_colourRemapSEIPostLutNumValMinus1[c] > 32, "post_lut_num_val_minus1[c] shall be in the range of 0 to 32, inclusive"); … … 3341 3341 for( Int i=0 ; i<=m_colourRemapSEIPostLutNumValMinus1[c] ; i++) 3342 3342 { 3343 xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEI TargetBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");3344 xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEI TargetBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");3343 xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive"); 3344 xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive"); 3345 3345 } 3346 3346 } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r861 r868 381 381 Bool m_colourRemapSEICancelFlag; 382 382 Bool m_colourRemapSEIPersistenceFlag; 383 Bool m_colourRemapSEIVideoSignal TypePresentFlag;384 Bool m_colourRemapSEI VideoFullRangeFlag;383 Bool m_colourRemapSEIVideoSignalInfoPresentFlag; 384 Bool m_colourRemapSEIFullRangeFlag; 385 385 Int m_colourRemapSEIPrimaries; 386 Int m_colourRemapSEITransfer Characteristics;387 Int m_colourRemapSEIMatrixCoeff s;388 Int m_colourRemapSEI CodedDataBitDepth;389 Int m_colourRemapSEI TargetBitDepth;386 Int m_colourRemapSEITransferFunction; 387 Int m_colourRemapSEIMatrixCoefficients; 388 Int m_colourRemapSEIInputBitDepth; 389 Int m_colourRemapSEIBitDepth; 390 390 Int m_colourRemapSEIPreLutNumValMinus1[3]; 391 391 Int* m_colourRemapSEIPreLutCodedValue[3]; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r860 r868 218 218 219 219 #if Q0074_COLOUR_REMAPPING_SEI 220 if( m_colourRemapSEIFile. c_str())220 if( m_colourRemapSEIFile.size() > 0 ) 221 221 { 222 222 FILE* fic; … … 234 234 { 235 235 retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIPersistenceFlag = tempCode ? 1 : 0; 236 retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoSignal TypePresentFlag = tempCode ? 1 : 0;237 if( m_colourRemapSEIVideoSignal TypePresentFlag )238 { 239 retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEI VideoFullRangeFlag = tempCode ? 1 : 0;236 retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoSignalInfoPresentFlag = tempCode ? 1 : 0; 237 if( m_colourRemapSEIVideoSignalInfoPresentFlag ) 238 { 239 retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIFullRangeFlag = tempCode ? 1 : 0; 240 240 retval = fscanf( fic, "%d", &m_colourRemapSEIPrimaries ); 241 retval = fscanf( fic, "%d", &m_colourRemapSEITransfer Characteristics);242 retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoeff s );243 } 244 245 retval = fscanf( fic, "%d", &m_colourRemapSEI CodedDataBitDepth );246 retval = fscanf( fic, "%d", &m_colourRemapSEI TargetBitDepth );241 retval = fscanf( fic, "%d", &m_colourRemapSEITransferFunction ); 242 retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoefficients ); 243 } 244 245 retval = fscanf( fic, "%d", &m_colourRemapSEIInputBitDepth ); 246 retval = fscanf( fic, "%d", &m_colourRemapSEIBitDepth ); 247 247 248 248 for( Int c=0 ; c<3 ; c++ ) … … 518 518 #endif 519 519 #if Q0074_COLOUR_REMAPPING_SEI 520 if ( m_colourRemapSEIFile.length() && !m_colourRemapSEICancelFlag )521 { 522 xConfirmPara( m_colourRemapSEI CodedDataBitDepth < 8 || m_colourRemapSEICodedDataBitDepth > 16 , "colour_remap_coded_data_bit_depth shall be in the range of 8 to 16, inclusive");523 xConfirmPara( m_colourRemapSEI TargetBitDepth < 8 || (m_colourRemapSEITargetBitDepth > 16 && m_colourRemapSEITargetBitDepth < 255) , "colour_remap_target_bit_depth shall be in the range of 8 to 16, inclusive");520 if ( ( m_colourRemapSEIFile.size() > 0 ) && !m_colourRemapSEICancelFlag ) 521 { 522 xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive"); 523 xConfirmPara( m_colourRemapSEIBitDepth < 8 || m_colourRemapSEIBitDepth > 16, "colour_remap_bit_depth shall be in the range of 8 to 16, inclusive"); 524 524 for( Int c=0 ; c<3 ; c++) 525 525 { … … 528 528 for( Int i=0 ; i<=m_colourRemapSEIPreLutNumValMinus1[c] ; i++) 529 529 { 530 xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEI CodedDataBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");531 xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEI TargetBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");530 xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEIInputBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_input_bit_depth)-1, inclusive"); 531 xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive"); 532 532 } 533 533 xConfirmPara( m_colourRemapSEIPostLutNumValMinus1[c] < 0 || m_colourRemapSEIPostLutNumValMinus1[c] > 32, "post_lut_num_val_minus1[c] shall be in the range of 0 to 32, inclusive"); 534 534 if( m_colourRemapSEIPostLutNumValMinus1[c]>0 ) 535 535 for( Int i=0 ; i<=m_colourRemapSEIPostLutNumValMinus1[c] ; i++) 536 { 537 if( m_colourRemapSEIPreLutNumValMinus1[c]>0 || m_colourRemapSEIMatrixPresentFlag ) 538 xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive"); 539 else 540 xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive"); 541 xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive"); 536 { 537 xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive"); 538 xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive"); 542 539 } 543 540 } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r856 r868 130 130 Bool m_colourRemapSEICancelFlag; 131 131 Bool m_colourRemapSEIPersistenceFlag; 132 Bool m_colourRemapSEIVideoSignal TypePresentFlag;133 Bool m_colourRemapSEI VideoFullRangeFlag;132 Bool m_colourRemapSEIVideoSignalInfoPresentFlag; 133 Bool m_colourRemapSEIFullRangeFlag; 134 134 Int m_colourRemapSEIPrimaries; 135 Int m_colourRemapSEITransfer Characteristics;136 Int m_colourRemapSEIMatrixCoeff s;137 Int m_colourRemapSEI CodedDataBitDepth;138 Int m_colourRemapSEI TargetBitDepth;135 Int m_colourRemapSEITransferFunction; 136 Int m_colourRemapSEIMatrixCoefficients; 137 Int m_colourRemapSEIInputBitDepth; 138 Int m_colourRemapSEIBitDepth; 139 139 Int m_colourRemapSEIPreLutNumValMinus1[3]; 140 140 Int* m_colourRemapSEIPreLutCodedValue[3]; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r866 r868 539 539 m_acTEncTop[layer].setCRISEICancelFlag ( m_acLayerCfg[layer].m_colourRemapSEICancelFlag ); 540 540 m_acTEncTop[layer].setCRISEIPersistenceFlag ( m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag ); 541 m_acTEncTop[layer].setCRISEIVideoSignal TypePresentFlag ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag );542 m_acTEncTop[layer].setCRISEI VideoFullRangeFlag ( m_acLayerCfg[layer].m_colourRemapSEIVideoFullRangeFlag );541 m_acTEncTop[layer].setCRISEIVideoSignalInfoPresentFlag ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag ); 542 m_acTEncTop[layer].setCRISEIFullRangeFlag ( m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag ); 543 543 m_acTEncTop[layer].setCRISEIPrimaries ( m_acLayerCfg[layer].m_colourRemapSEIPrimaries ); 544 m_acTEncTop[layer].setCRISEITransfer Characteristics ( m_acLayerCfg[layer].m_colourRemapSEITransferCharacteristics);545 m_acTEncTop[layer].setCRISEIMatrixCoeff s ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoeffs );546 m_acTEncTop[layer].setCRISEI CodedDataBitDepth ( m_acLayerCfg[layer].m_colourRemapSEICodedDataBitDepth );547 m_acTEncTop[layer].setCRISEI TargetBitDepth ( m_acLayerCfg[layer].m_colourRemapSEITargetBitDepth );544 m_acTEncTop[layer].setCRISEITransferFunction ( m_acLayerCfg[layer].m_colourRemapSEITransferFunction ); 545 m_acTEncTop[layer].setCRISEIMatrixCoefficients ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients ); 546 m_acTEncTop[layer].setCRISEIInputBitDepth ( m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth ); 547 m_acTEncTop[layer].setCRISEIBitDepth ( m_acLayerCfg[layer].m_colourRemapSEIBitDepth ); 548 548 m_acTEncTop[layer].setCRISEIPreLutNumValMinus1 ( m_acLayerCfg[layer].m_colourRemapSEIPreLutNumValMinus1 ); 549 549 m_acTEncTop[layer].setCRISEIPreLutCodedValue ( m_acLayerCfg[layer].m_colourRemapSEIPreLutCodedValue ); … … 924 924 m_cTEncTop.setCRISEICancelFlag ( m_colourRemapSEICancelFlag ); 925 925 m_cTEncTop.setCRISEIPersistenceFlag ( m_colourRemapSEIPersistenceFlag ); 926 m_cTEncTop.setCRISEIVideoSignal TypePresentFlag ( m_colourRemapSEIVideoSignalTypePresentFlag );927 m_cTEncTop.setCRISEI VideoFullRangeFlag ( m_colourRemapSEIVideoFullRangeFlag );926 m_cTEncTop.setCRISEIVideoSignalInfoPresentFlag ( m_colourRemapSEIVideoSignalInfoPresentFlag ); 927 m_cTEncTop.setCRISEIFullRangeFlag ( m_colourRemapSEIFullRangeFlag ); 928 928 m_cTEncTop.setCRISEIPrimaries ( m_colourRemapSEIPrimaries ); 929 m_cTEncTop.setCRISEITransfer Characteristics ( m_colourRemapSEITransferCharacteristics);930 m_cTEncTop.setCRISEIMatrixCoeff s ( m_colourRemapSEIMatrixCoeffs );931 m_cTEncTop.setCRISEI CodedDataBitDepth ( m_colourRemapSEICodedDataBitDepth );932 m_cTEncTop.setCRISEI TargetBitDepth ( m_colourRemapSEITargetBitDepth );929 m_cTEncTop.setCRISEITransferFunction ( m_colourRemapSEITransferFunction ); 930 m_cTEncTop.setCRISEIMatrixCoefficients ( m_colourRemapSEIMatrixCoefficients ); 931 m_cTEncTop.setCRISEIInputBitDepth ( m_colourRemapSEIInputBitDepth ); 932 m_cTEncTop.setCRISEIBitDepth ( m_colourRemapSEIBitDepth ); 933 933 m_cTEncTop.setCRISEIPreLutNumValMinus1 ( m_colourRemapSEIPreLutNumValMinus1 ); 934 934 m_cTEncTop.setCRISEIPreLutCodedValue ( m_colourRemapSEIPreLutCodedValue ); -
branches/SHM-dev/source/Lib/TLibCommon/SEI.h
r856 r868 458 458 Bool m_colourRemapCancelFlag; 459 459 Bool m_colourRemapPersistenceFlag; 460 Bool m_colourRemapVideoSignal TypePresentFlag;461 Bool m_colourRemap VideoFullRangeFlag;460 Bool m_colourRemapVideoSignalInfoPresentFlag; 461 Bool m_colourRemapFullRangeFlag; 462 462 Int m_colourRemapPrimaries; 463 Int m_colourRemapTransfer Characteristics;464 Int m_colourRemapMatrixCoeff s;465 Int m_colourRemap CodedDataBitDepth;466 Int m_colourRemap TargetBitDepth;463 Int m_colourRemapTransferFunction; 464 Int m_colourRemapMatrixCoefficients; 465 Int m_colourRemapInputBitDepth; 466 Int m_colourRemapBitDepth; 467 467 Int m_preLutNumValMinus1[3]; 468 468 std::vector<Int> m_preLutCodedValue[3]; -
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
r856 r868 936 936 { 937 937 READ_FLAG( uiVal, "colour_remap_persistence_flag" ); sei.m_colourRemapPersistenceFlag = uiVal; 938 READ_FLAG( uiVal, "colour_remap_video_signal_ type_present_flag" ); sei.m_colourRemapVideoSignalTypePresentFlag = uiVal;939 if ( sei.m_colourRemapVideoSignal TypePresentFlag )940 { 941 READ_FLAG( uiVal, "colour_remap_ video_full_range_flag" ); sei.m_colourRemapVideoFullRangeFlag = uiVal;938 READ_FLAG( uiVal, "colour_remap_video_signal_info_present_flag" ); sei.m_colourRemapVideoSignalInfoPresentFlag = uiVal; 939 if ( sei.m_colourRemapVideoSignalInfoPresentFlag ) 940 { 941 READ_FLAG( uiVal, "colour_remap_full_range_flag" ); sei.m_colourRemapFullRangeFlag = uiVal; 942 942 READ_CODE( 8, uiVal, "colour_remap_primaries" ); sei.m_colourRemapPrimaries = uiVal; 943 READ_CODE( 8, uiVal, "colour_remap_transfer_ characteristics" ); sei.m_colourRemapTransferCharacteristics= uiVal;944 READ_CODE( 8, uiVal, "colour_remap_matrix_coeff s" ); sei.m_colourRemapMatrixCoeffs = uiVal;945 } 946 READ_CODE( 8, uiVal, "colour_remap_ coded_data_bit_depth" ); sei.m_colourRemapCodedDataBitDepth = uiVal;947 READ_CODE( 8, uiVal, "colour_remap_ target_bit_depth" ); sei.m_colourRemapTargetBitDepth = uiVal;943 READ_CODE( 8, uiVal, "colour_remap_transfer_function" ); sei.m_colourRemapTransferFunction = uiVal; 944 READ_CODE( 8, uiVal, "colour_remap_matrix_coefficients" ); sei.m_colourRemapMatrixCoefficients = uiVal; 945 } 946 READ_CODE( 8, uiVal, "colour_remap_input_bit_depth" ); sei.m_colourRemapInputBitDepth = uiVal; 947 READ_CODE( 8, uiVal, "colour_remap_bit_depth" ); sei.m_colourRemapBitDepth = uiVal; 948 948 949 949 for( Int c=0 ; c<3 ; c++ ) … … 955 955 for ( Int i=0 ; i<=sei.m_preLutNumValMinus1[c] ; i++ ) 956 956 { 957 READ_CODE( (( sei.m_colourRemap CodedDataBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_coded_value[c][i]" ); sei.m_preLutCodedValue[c][i] = uiVal;958 READ_CODE( (( sei.m_colourRemap TargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_target_value[c][i]" ); sei.m_preLutTargetValue[c][i] = uiVal;957 READ_CODE( (( sei.m_colourRemapInputBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_coded_value[c][i]" ); sei.m_preLutCodedValue[c][i] = uiVal; 958 READ_CODE( (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, uiVal, "pre_lut_target_value[c][i]" ); sei.m_preLutTargetValue[c][i] = uiVal; 959 959 } 960 960 else // pre_lut_num_val_minus1[c] == 0 … … 962 962 sei.m_preLutCodedValue[c][0] = 0; 963 963 sei.m_preLutTargetValue[c][0] = 0; 964 sei.m_preLutCodedValue[c][1] = (1 << sei.m_colourRemap CodedDataBitDepth) - 1 ;965 sei.m_preLutTargetValue[c][1] = (1 << sei.m_colourRemap TargetBitDepth) - 1 ;964 sei.m_preLutCodedValue[c][1] = (1 << sei.m_colourRemapInputBitDepth) - 1 ; 965 sei.m_preLutTargetValue[c][1] = (1 << sei.m_colourRemapBitDepth) - 1 ; 966 966 } 967 967 } … … 992 992 for ( Int i=0 ; i<=sei.m_postLutNumValMinus1[c] ; i++ ) 993 993 { 994 READ_CODE( (( sei.m_colourRemap TargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_coded_value[c][i]" ); sei.m_postLutCodedValue[c][i] = uiVal;995 READ_CODE( (( sei.m_colourRemap TargetBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_target_value[c][i]" ); sei.m_postLutTargetValue[c][i] = uiVal;994 READ_CODE( (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_coded_value[c][i]" ); sei.m_postLutCodedValue[c][i] = uiVal; 995 READ_CODE( (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, uiVal, "post_lut_target_value[c][i]" ); sei.m_postLutTargetValue[c][i] = uiVal; 996 996 } 997 997 else … … 999 999 sei.m_postLutCodedValue[c][0] = 0; 1000 1000 sei.m_postLutTargetValue[c][0] = 0; 1001 sei.m_postLutTargetValue[c][1] = (1 << sei.m_colourRemap TargetBitDepth) - 1;1002 sei.m_postLutCodedValue[c][1] = (1 << sei.m_colourRemap TargetBitDepth) - 1;1001 sei.m_postLutTargetValue[c][1] = (1 << sei.m_colourRemapBitDepth) - 1; 1002 sei.m_postLutCodedValue[c][1] = (1 << sei.m_colourRemapBitDepth) - 1; 1003 1003 } 1004 1004 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r856 r868 367 367 Int bitDepth = c ? bitDepthC : bitDepthY ; 368 368 preLut[c].resize(1 << bitDepth); 369 postLut[c].resize(1 << pCriSEI->m_colourRemap TargetBitDepth);369 postLut[c].resize(1 << pCriSEI->m_colourRemapBitDepth); 370 370 371 Int bitDepthDiff = pCriSEI->m_colourRemap TargetBitDepth - bitDepth;372 Int iShift1 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from bitdepth to TargetBitdepth (manage only case colourRemapTargetBitDepth>= bitdepth)371 Int bitDepthDiff = pCriSEI->m_colourRemapBitDepth - bitDepth; 372 Int iShift1 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from bitdepth to ColourRemapBitdepth (manage only case colourRemapBitDepth>= bitdepth) 373 373 if( bitDepthDiff<0 ) 374 printf ("Warning: CRI SEI - colourRemap TargetBitDepth (%d) <bitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapTargetBitDepth, bitDepth);375 bitDepthDiff = pCriSEI->m_colourRemap TargetBitDepth - pCriSEI->m_colourRemapCodedDataBitDepth;376 Int iShift2 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from codedDataBitdepth to TargetBitdepth (manage only case colourRemapTargetBitDepth>= colourRemapCodedDataBitDepth)374 printf ("Warning: CRI SEI - colourRemapBitDepth (%d) <bitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapBitDepth, bitDepth); 375 bitDepthDiff = pCriSEI->m_colourRemapBitDepth - pCriSEI->m_colourRemapInputBitDepth; 376 Int iShift2 = (bitDepthDiff>0) ? bitDepthDiff : 0; //bit scale from ColourRemapInputBitdepth to ColourRemapBitdepth (manage only case colourRemapBitDepth>= colourRemapInputBitDepth) 377 377 if( bitDepthDiff<0 ) 378 printf ("Warning: CRI SEI - colourRemap TargetBitDepth (%d) <colourRemapCodedDataBitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapTargetBitDepth, pCriSEI->m_colourRemapCodedDataBitDepth);378 printf ("Warning: CRI SEI - colourRemapBitDepth (%d) <colourRemapInputBitDepth (%d) - case not handled\n", pCriSEI->m_colourRemapBitDepth, pCriSEI->m_colourRemapInputBitDepth); 379 379 380 380 //Fill preLut … … 384 384 for ( Int iPivot=0 ; iPivot<=pCriSEI->m_preLutNumValMinus1[c] ; iPivot++ ) 385 385 { 386 Int iCodedPrev = pCriSEI->m_preLutCodedValue[c][iPivot] << iShift2; //Coded in C odedDataBitdepth387 Int iCodedNext = pCriSEI->m_preLutCodedValue[c][iPivot+1] << iShift2; //Coded in C odedDataBitdepth388 Int iTargetPrev = pCriSEI->m_preLutTargetValue[c][iPivot]; //Coded in TargetBitdepth389 Int iTargetNext = pCriSEI->m_preLutTargetValue[c][iPivot+1]; //Coded in TargetBitdepth386 Int iCodedPrev = pCriSEI->m_preLutCodedValue[c][iPivot] << iShift2; //Coded in CRInputBitdepth 387 Int iCodedNext = pCriSEI->m_preLutCodedValue[c][iPivot+1] << iShift2; //Coded in CRInputBitdepth 388 Int iTargetPrev = pCriSEI->m_preLutTargetValue[c][iPivot]; //Coded in CRBitdepth 389 Int iTargetNext = pCriSEI->m_preLutTargetValue[c][iPivot+1]; //Coded in CRBitdepth 390 390 if ( iCodedPrev <= iSample && iSample <= iCodedNext ) 391 391 { … … 398 398 399 399 //Fill postLut 400 for ( Int k=0 ; k<(1<<pCriSEI->m_colourRemap TargetBitDepth) ; k++ )400 for ( Int k=0 ; k<(1<<pCriSEI->m_colourRemapBitDepth) ; k++ ) 401 401 { 402 402 Int iSample = k; 403 403 for ( Int iPivot=0 ; iPivot<=pCriSEI->m_postLutNumValMinus1[c] ; iPivot++ ) 404 404 { 405 Int iCodedPrev = pCriSEI->m_postLutCodedValue[c][iPivot]; //Coded in TargetBitdepth406 Int iCodedNext = pCriSEI->m_postLutCodedValue[c][iPivot+1]; //Coded in TargetBitdepth407 Int iTargetPrev = pCriSEI->m_postLutTargetValue[c][iPivot]; //Coded in TargetBitdepth408 Int iTargetNext = pCriSEI->m_postLutTargetValue[c][iPivot+1]; //Coded in TargetBitdepth405 Int iCodedPrev = pCriSEI->m_postLutCodedValue[c][iPivot]; //Coded in CRBitdepth 406 Int iCodedNext = pCriSEI->m_postLutCodedValue[c][iPivot+1]; //Coded in CRBitdepth 407 Int iTargetPrev = pCriSEI->m_postLutTargetValue[c][iPivot]; //Coded in CRBitdepth 408 Int iTargetNext = pCriSEI->m_postLutTargetValue[c][iPivot+1]; //Coded in CRBitdepth 409 409 if ( iCodedPrev <= iSample && iSample <= iCodedNext ) 410 410 { … … 486 486 + storeCriSEI[layerId].m_colourRemapCoeffs[0][2]*YUVPre[2] 487 487 + roundingOffset ) >> ( storeCriSEI[layerId].m_log2MatrixDenom ); 488 YUVMat[0] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemap TargetBitDepth)-1, YUVMat[0] );488 YUVMat[0] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemapBitDepth)-1, YUVMat[0] ); 489 489 YUVOut[0][x] = postLut[0][ YUVMat[0] ]; 490 490 … … 497 497 + storeCriSEI[layerId].m_colourRemapCoeffs[c][2]*YUVPre[2] 498 498 + roundingOffset ) >> ( storeCriSEI[layerId].m_log2MatrixDenom ); 499 YUVMat[c] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemap TargetBitDepth)-1, YUVMat[c] );499 YUVMat[c] = Clip3( 0, (1<<storeCriSEI[layerId].m_colourRemapBitDepth)-1, YUVMat[c] ); 500 500 YUVOut[c][x>>1] = postLut[c][ YUVMat[c] ]; 501 501 } … … 515 515 //Write remapped picture in decoding order 516 516 Char cTemp[255]; 517 sprintf(cTemp, "seiColourRemappedPic_L%d_%dx%d_%dbits.yuv", layerId, iWidth, iHeight, storeCriSEI[layerId].m_colourRemap TargetBitDepth );518 picColourRemapped.dump( cTemp, true, storeCriSEI[layerId].m_colourRemap TargetBitDepth );517 sprintf(cTemp, "seiColourRemappedPic_L%d_%dx%d_%dbits.yuv", layerId, iWidth, iHeight, storeCriSEI[layerId].m_colourRemapBitDepth ); 518 picColourRemapped.dump( cTemp, true, storeCriSEI[layerId].m_colourRemapBitDepth ); 519 519 520 520 picColourRemapped.destroy(); -
branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r857 r868 646 646 { 647 647 WRITE_FLAG( sei.m_colourRemapPersistenceFlag, "colour_remap_persistence_flag" ); 648 WRITE_FLAG( sei.m_colourRemapVideoSignal TypePresentFlag, "colour_remap_video_signal_type_present_flag" );649 if ( sei.m_colourRemapVideoSignal TypePresentFlag )650 { 651 WRITE_FLAG( sei.m_colourRemap VideoFullRangeFlag, "colour_remap_video_full_range_flag" );648 WRITE_FLAG( sei.m_colourRemapVideoSignalInfoPresentFlag, "colour_remap_video_signal_info_present_flag" ); 649 if ( sei.m_colourRemapVideoSignalInfoPresentFlag ) 650 { 651 WRITE_FLAG( sei.m_colourRemapFullRangeFlag, "colour_remap_full_range_flag" ); 652 652 WRITE_CODE( sei.m_colourRemapPrimaries, 8, "colour_remap_primaries" ); 653 WRITE_CODE( sei.m_colourRemapTransfer Characteristics, 8, "colour_remap_transfer_characteristics" );654 WRITE_CODE( sei.m_colourRemapMatrixCoeff s, 8, "colour_remap_matrix_coeffs" );655 } 656 WRITE_CODE( sei.m_colourRemap CodedDataBitDepth, 8, "colour_remap_coded_data_bit_depth" );657 WRITE_CODE( sei.m_colourRemap TargetBitDepth, 8, "colour_remap_target_bit_depth" );653 WRITE_CODE( sei.m_colourRemapTransferFunction, 8, "colour_remap_transfer_function" ); 654 WRITE_CODE( sei.m_colourRemapMatrixCoefficients, 8, "colour_remap_matrix_coefficients" ); 655 } 656 WRITE_CODE( sei.m_colourRemapInputBitDepth, 8, "colour_remap_input_bit_depth" ); 657 WRITE_CODE( sei.m_colourRemapBitDepth, 8, "colour_remap_bit_depth" ); 658 658 for( Int c=0 ; c<3 ; c++ ) 659 659 { … … 662 662 for( Int i=0 ; i<=sei.m_preLutNumValMinus1[c] ; i++ ) 663 663 { 664 WRITE_CODE( sei.m_preLutCodedValue[c][i], (( sei.m_colourRemapCodedDataBitDepth + 7 ) >> 3 ) << 3, "pre_lut_coded_value[c][i]" );665 WRITE_CODE( sei.m_preLutTargetValue[c][i], (( sei.m_colourRemap TargetBitDepth+ 7 ) >> 3 ) << 3, "pre_lut_target_value[c][i]" );664 WRITE_CODE( sei.m_preLutCodedValue[c][i], (( sei.m_colourRemapInputBitDepth + 7 ) >> 3 ) << 3, "pre_lut_coded_value[c][i]" ); 665 WRITE_CODE( sei.m_preLutTargetValue[c][i], (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, "pre_lut_target_value[c][i]" ); 666 666 } 667 667 } … … 681 681 for( Int i=0 ; i<=sei.m_postLutNumValMinus1[c] ; i++ ) 682 682 { 683 WRITE_CODE( sei.m_postLutCodedValue[c][i], (( sei.m_colourRemap TargetBitDepth + 7 ) >> 3 ) << 3, "post_lut_coded_value[c][i]" );684 WRITE_CODE( sei.m_postLutTargetValue[c][i], (( sei.m_colourRemap TargetBitDepth + 7 ) >> 3 ) << 3, "post_lut_target_value[c][i]" );683 WRITE_CODE( sei.m_postLutCodedValue[c][i], (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, "post_lut_coded_value[c][i]" ); 684 WRITE_CODE( sei.m_postLutTargetValue[c][i], (( sei.m_colourRemapBitDepth + 7 ) >> 3 ) << 3, "post_lut_target_value[c][i]" ); 685 685 } 686 686 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r856 r868 394 394 Bool m_colourRemapSEICancelFlag; 395 395 Bool m_colourRemapSEIPersistenceFlag; 396 Bool m_colourRemapSEIVideoSignal TypePresentFlag;397 Bool m_colourRemapSEI VideoFullRangeFlag;396 Bool m_colourRemapSEIVideoSignalInfoPresentFlag; 397 Bool m_colourRemapSEIFullRangeFlag; 398 398 Int m_colourRemapSEIPrimaries; 399 Int m_colourRemapSEITransfer Characteristics;400 Int m_colourRemapSEIMatrixCoeff s;401 Int m_colourRemapSEI CodedDataBitDepth;402 Int m_colourRemapSEI TargetBitDepth;399 Int m_colourRemapSEITransferFunction; 400 Int m_colourRemapSEIMatrixCoefficients; 401 Int m_colourRemapSEIInputBitDepth; 402 Int m_colourRemapSEIBitDepth; 403 403 Int m_colourRemapSEIPreLutNumValMinus1[3]; 404 404 Int* m_colourRemapSEIPreLutCodedValue[3]; … … 712 712 Void setCRISEIPersistenceFlag(Bool b) { m_colourRemapSEIPersistenceFlag = b; } 713 713 Bool getCRISEIPersistenceFlag() { return m_colourRemapSEIPersistenceFlag; } 714 Void setCRISEIVideoSignal TypePresentFlag(Bool b) { m_colourRemapSEIVideoSignalTypePresentFlag = b; }715 Bool getCRISEIVideoSignal TypePresentFlag() { return m_colourRemapSEIVideoSignalTypePresentFlag; }716 Void setCRISEI VideoFullRangeFlag(Bool b) { m_colourRemapSEIVideoFullRangeFlag = b; }717 Bool getCRISEI VideoFullRangeFlag() { return m_colourRemapSEIVideoFullRangeFlag; }714 Void setCRISEIVideoSignalInfoPresentFlag(Bool b) { m_colourRemapSEIVideoSignalInfoPresentFlag = b; } 715 Bool getCRISEIVideoSignalInfoPresentFlag() { return m_colourRemapSEIVideoSignalInfoPresentFlag; } 716 Void setCRISEIFullRangeFlag(Bool b) { m_colourRemapSEIFullRangeFlag = b; } 717 Bool getCRISEIFullRangeFlag() { return m_colourRemapSEIFullRangeFlag; } 718 718 Void setCRISEIPrimaries(Int i) { m_colourRemapSEIPrimaries = i; } 719 719 Int getCRISEIPrimaries() { return m_colourRemapSEIPrimaries; } 720 Void setCRISEITransfer Characteristics(Int i) { m_colourRemapSEITransferCharacteristics= i; }721 Int getCRISEITransfer Characteristics() { return m_colourRemapSEITransferCharacteristics; }722 Void setCRISEIMatrixCoeff s(Int i) { m_colourRemapSEIMatrixCoeffs = i; }723 Int getCRISEIMatrixCoeff s() { return m_colourRemapSEIMatrixCoeffs; }724 Void setCRISEI CodedDataBitDepth(Int i) { m_colourRemapSEICodedDataBitDepth = i; }725 Int getCRISEI CodedDataBitDepth() { return m_colourRemapSEICodedDataBitDepth; }726 Void setCRISEI TargetBitDepth(Int i) { m_colourRemapSEITargetBitDepth = i; }727 Int getCRISEI TargetBitDepth() { return m_colourRemapSEITargetBitDepth; }720 Void setCRISEITransferFunction(Int i) { m_colourRemapSEITransferFunction = i; } 721 Int getCRISEITransferFunction() { return m_colourRemapSEITransferFunction; } 722 Void setCRISEIMatrixCoefficients(Int i) { m_colourRemapSEIMatrixCoefficients = i; } 723 Int getCRISEIMatrixCoefficients() { return m_colourRemapSEIMatrixCoefficients; } 724 Void setCRISEIInputBitDepth(Int i) { m_colourRemapSEIInputBitDepth = i; } 725 Int getCRISEIInputBitDepth() { return m_colourRemapSEIInputBitDepth; } 726 Void setCRISEIBitDepth(Int i) { m_colourRemapSEIBitDepth = i; } 727 Int getCRISEIBitDepth() { return m_colourRemapSEIBitDepth; } 728 728 Void setCRISEIPreLutNumValMinus1(Int *i) { for(Int c=0 ; c<3 ; c++) m_colourRemapSEIPreLutNumValMinus1[c] = i[c]; } 729 729 Int getCRISEIPreLutNumValMinus1(Int i) { return m_colourRemapSEIPreLutNumValMinus1[i]; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r860 r868 374 374 { 375 375 seiColourRemappingInfo->m_colourRemapPersistenceFlag = m_pcCfg->getCRISEIPersistenceFlag(); 376 seiColourRemappingInfo->m_colourRemapVideoSignal TypePresentFlag = m_pcCfg->getCRISEIVideoSignalTypePresentFlag();377 if( seiColourRemappingInfo->m_colourRemapVideoSignal TypePresentFlag )378 { 379 seiColourRemappingInfo->m_colourRemap VideoFullRangeFlag = m_pcCfg->getCRISEIVideoFullRangeFlag();376 seiColourRemappingInfo->m_colourRemapVideoSignalInfoPresentFlag = m_pcCfg->getCRISEIVideoSignalInfoPresentFlag(); 377 if( seiColourRemappingInfo->m_colourRemapVideoSignalInfoPresentFlag ) 378 { 379 seiColourRemappingInfo->m_colourRemapFullRangeFlag = m_pcCfg->getCRISEIFullRangeFlag(); 380 380 seiColourRemappingInfo->m_colourRemapPrimaries = m_pcCfg->getCRISEIPrimaries(); 381 seiColourRemappingInfo->m_colourRemapTransfer Characteristics = m_pcCfg->getCRISEITransferCharacteristics();382 seiColourRemappingInfo->m_colourRemapMatrixCoeff s = m_pcCfg->getCRISEIMatrixCoeffs();383 } 384 seiColourRemappingInfo->m_colourRemap CodedDataBitDepth = m_pcCfg->getCRISEICodedDataBitDepth();385 seiColourRemappingInfo->m_colourRemap TargetBitDepth = m_pcCfg->getCRISEITargetBitDepth();381 seiColourRemappingInfo->m_colourRemapTransferFunction = m_pcCfg->getCRISEITransferFunction(); 382 seiColourRemappingInfo->m_colourRemapMatrixCoefficients = m_pcCfg->getCRISEIMatrixCoefficients(); 383 } 384 seiColourRemappingInfo->m_colourRemapInputBitDepth = m_pcCfg->getCRISEIInputBitDepth(); 385 seiColourRemappingInfo->m_colourRemapBitDepth = m_pcCfg->getCRISEIBitDepth(); 386 386 for( Int c=0 ; c<3 ; c++ ) 387 387 {
Note: See TracChangeset for help on using the changeset viewer.