Ticket #1247: TM_SEI_fix.patch
File TM_SEI_fix.patch, 10.2 KB (added by o.nakagami, 11 years ago) |
---|
-
doc/software-manual.tex
1762 1762 \\ 1763 1763 \Option{SEIToneMapCameraIsoSpeedValue} & 1764 1764 \ShortOption{\None} & 1765 \Default{4 20} &1765 \Default{400} & 1766 1766 Specifies the camera ISO speed for daylight illumination of Extended_ISO. 1767 1767 \\ 1768 \Option{SEIToneMapExposureIndexIdc} & 1769 \ShortOption{\None} & 1770 \Default{0} & 1771 Indicates the exposure index setting of the camera. 1772 \\ 1773 \Option{SEIToneMapExposureIndexValue} & 1774 \ShortOption{\None} & 1775 \Default{400} & 1776 Specifies the exposure index setting of the cameran of Extended_ISO. 1777 \\ 1768 1778 \Option{SEIToneMapExposureCompensationValueSignFlag} & 1769 1779 \ShortOption{\None} & 1770 1780 \Default{0} & -
source/App/TAppEncoder/TAppEncCfg.cpp
486 486 ("SEIToneMapTargetPivotValue", cfg_targetPivotValue, string(""), "Array of pivot point") 487 487 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 488 488 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 489 ("SEIToneMapExposureIndexIdc", m_exposureIndexIdc, 0, "Indicates the exposure index setting of the camera") 490 ("SEIToneMapExposureIndexValue", m_exposureIndexValue, 400, "Specifies the exposure index setting of the cameran of Extended_ISO") 489 491 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 490 492 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") 491 493 ("SEIToneMapExposureCompensationValueDenomIdc", m_exposureCompensationValueDenomIdc, 2, "Specifies the denominator of ExposureCompensationValue") … … 1326 1328 xConfirmPara( m_toneMapTargetBitDepth < 1 || (m_toneMapTargetBitDepth > 16 && m_toneMapTargetBitDepth < 255) , "SEIToneMapTargetBitDepth must be in rage 1 to 16 or equal to 255"); 1327 1329 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4"); 1328 1330 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0"); 1331 xConfirmPara( m_exposureIndexValue == 0, "SEIToneMapExposureIndexValue shall not be equal to 0"); 1329 1332 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100"); 1330 1333 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue"); 1331 1334 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue"); -
source/App/TAppEncoder/TAppEncCfg.h
212 212 Int m_numPivots; 213 213 Int m_cameraIsoSpeedIdc; 214 214 Int m_cameraIsoSpeedValue; 215 Int m_exposureIndexIdc; 216 Int m_exposureIndexValue; 215 217 Int m_exposureCompensationValueSignFlag; 216 218 Int m_exposureCompensationValueNumerator; 217 219 Int m_exposureCompensationValueDenomIdc; -
source/App/TAppEncoder/TAppEncTop.cpp
234 234 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue ); 235 235 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 236 236 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 237 m_cTEncTop.setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 238 m_cTEncTop.setTMISEIExposureIndexValue ( m_exposureIndexValue ); 237 239 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 238 240 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 239 241 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); -
source/Lib/TLibCommon/SEI.h
352 352 std::vector<Int> m_targetPivotValue; 353 353 Int m_cameraIsoSpeedIdc; 354 354 Int m_cameraIsoSpeedValue; 355 Int m_exposureIndexIdc; 356 Int m_exposureIndexValue; 355 357 Int m_exposureCompensationValueSignFlag; 356 358 Int m_exposureCompensationValueNumerator; 357 359 Int m_exposureCompensationValueDenomIdc; -
source/Lib/TLibDecoder/SEIread.cpp
669 669 } 670 670 case 4: 671 671 { 672 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeed Value= val;673 if( sei.m_cameraIsoSpeed Value== 255) //Extended_ISO672 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeedIdc = val; 673 if( sei.m_cameraIsoSpeedIdc == 255) //Extended_ISO 674 674 { 675 675 READ_CODE( 32, val, "camera_iso_speed_value" ); sei.m_cameraIsoSpeedValue = val; 676 676 } 677 READ_CODE( 8, val, "exposure_index_idc" ); sei.m_exposureIndexIdc = val; 678 if( sei.m_exposureIndexIdc == 255) //Extended_ISO 679 { 680 READ_CODE( 32, val, "exposure_index_value" ); sei.m_exposureIndexValue = val; 681 } 677 682 READ_FLAG( val, "exposure_compensation_value_sign_flag" ); sei.m_exposureCompensationValueSignFlag = val; 678 683 READ_CODE( 16, val, "exposure_compensation_value_numerator" ); sei.m_exposureCompensationValueNumerator = val; 679 684 READ_CODE( 16, val, "exposure_compensation_value_denom_idc" ); sei.m_exposureCompensationValueDenomIdc = val; -
source/Lib/TLibEncoder/SEIwrite.cpp
468 468 { 469 469 WRITE_CODE( sei.m_cameraIsoSpeedValue, 32, "camera_iso_speed_value" ); 470 470 } 471 WRITE_CODE( sei.m_exposureIndexIdc, 8, "exposure_index_idc" ); 472 if( sei.m_exposureIndexIdc == 255) //Extended_ISO 473 { 474 WRITE_CODE( sei.m_exposureIndexValue, 32, "exposure_index_value" ); 475 } 471 476 WRITE_FLAG( sei.m_exposureCompensationValueSignFlag, "exposure_compensation_value_sign_flag" ); 472 477 WRITE_CODE( sei.m_exposureCompensationValueNumerator, 16, "exposure_compensation_value_numerator" ); 473 478 WRITE_CODE( sei.m_exposureCompensationValueDenomIdc, 16, "exposure_compensation_value_denom_idc" ); -
source/Lib/TLibEncoder/TEncCfg.h
234 234 Int m_numPivots; 235 235 Int m_cameraIsoSpeedIdc; 236 236 Int m_cameraIsoSpeedValue; 237 Int m_exposureIndexIdc; 238 Int m_exposureIndexValue; 237 239 Int m_exposureCompensationValueSignFlag; 238 240 Int m_exposureCompensationValueNumerator; 239 241 Int m_exposureCompensationValueDenomIdc; … … 580 582 Int getTMISEICameraIsoSpeedIdc() { return m_cameraIsoSpeedIdc; } 581 583 Void setTMISEICameraIsoSpeedValue(Int b) { m_cameraIsoSpeedValue = b; } 582 584 Int getTMISEICameraIsoSpeedValue() { return m_cameraIsoSpeedValue; } 585 Void setTMISEIExposureIndexIdc(Int b) { m_exposureIndexIdc = b; } 586 Int getTMISEIExposurIndexIdc() { return m_exposureIndexIdc; } 587 Void setTMISEIExposureIndexValue(Int b) { m_exposureIndexValue = b; } 588 Int getTMISEIExposurIndexValue() { return m_exposureIndexValue; } 583 589 Void setTMISEIExposureCompensationValueSignFlag(Int b) { m_exposureCompensationValueSignFlag = b; } 584 590 Int getTMISEIExposureCompensationValueSignFlag() { return m_exposureCompensationValueSignFlag; } 585 591 Void setTMISEIExposureCompensationValueNumerator(Int b) { m_exposureCompensationValueNumerator = b; } -
source/Lib/TLibEncoder/TEncGOP.cpp
251 251 seiToneMappingInfo->m_cameraIsoSpeedIdc = m_pcCfg->getTMISEICameraIsoSpeedIdc(); 252 252 seiToneMappingInfo->m_cameraIsoSpeedValue = m_pcCfg->getTMISEICameraIsoSpeedValue(); 253 253 assert( seiToneMappingInfo->m_cameraIsoSpeedValue !=0 ); 254 seiToneMappingInfo->m_exposureIndexIdc = m_pcCfg->getTMISEIExposurIndexIdc(); 255 seiToneMappingInfo->m_exposureIndexValue = m_pcCfg->getTMISEIExposurIndexValue(); 256 assert( seiToneMappingInfo->m_exposureIndexValue !=0 ); 254 257 seiToneMappingInfo->m_exposureCompensationValueSignFlag = m_pcCfg->getTMISEIExposureCompensationValueSignFlag(); 255 258 seiToneMappingInfo->m_exposureCompensationValueNumerator = m_pcCfg->getTMISEIExposureCompensationValueNumerator(); 256 259 seiToneMappingInfo->m_exposureCompensationValueDenomIdc = m_pcCfg->getTMISEIExposureCompensationValueDenomIdc();