Changeset 133 in SHVCSoftware for branches/SHM-2.0-dev/source/App
- Timestamp:
- 28 Apr 2013, 08:49:16 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source/App
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/App/TAppDecoder/TAppDecTop.cpp
r125 r133 254 254 } 255 255 if ( bNewPicture && bNewPOC && 256 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 256 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 257 257 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP 258 258 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP 259 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA NT260 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) )259 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL 260 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) ) 261 261 { 262 262 xFlushOutput( pcListPic, curLayerId ); … … 414 414 } 415 415 if ( bNewPicture && 416 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 416 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 417 417 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP 418 418 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP 419 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA NT420 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) )419 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL 420 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) ) 421 421 { 422 422 xFlushOutput( pcListPic ); -
branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r125 r133 89 89 { 90 90 m_aidQP = NULL; 91 #if J0149_TONE_MAPPING_SEI 92 m_startOfCodedInterval = NULL; 93 m_codedPivotValue = NULL; 94 m_targetPivotValue = NULL; 95 #endif 91 96 } 92 97 #endif … … 102 107 delete[] m_aidQP; 103 108 } 109 #if J0149_TONE_MAPPING_SEI 110 if ( m_startOfCodedInterval ) 111 { 112 delete[] m_startOfCodedInterval; 113 m_startOfCodedInterval = NULL; 114 } 115 if ( m_codedPivotValue ) 116 { 117 delete[] m_codedPivotValue; 118 m_codedPivotValue = NULL; 119 } 120 if ( m_targetPivotValue ) 121 { 122 delete[] m_targetPivotValue; 123 m_targetPivotValue = NULL; 124 } 125 #endif 104 126 free(m_pchInputFile); 105 127 #endif … … 324 346 string cfg_RowHeight; 325 347 string cfg_ScalingListFile; 348 #if J0149_TONE_MAPPING_SEI 349 string cfg_startOfCodedInterval; 350 string cfg_codedPivotValue; 351 string cfg_targetPivotValue; 352 #endif 326 353 #if SIGNAL_BITRATE_PICRATE_IN_VPS 327 354 string cfg_bitRateInfoPresentFlag; … … 430 457 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 431 458 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 459 #if !L0034_COMBINED_LIST_CLEANUP 432 460 ("ListCombination,-lc", m_bUseLComb, true, "Combined reference list for uni-prediction estimation in B-slices") 461 #endif 433 462 // motion options 434 463 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") … … 488 517 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 489 518 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false ) 519 #if L0386_DB_METRIC 520 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false ) 521 #endif 490 522 491 523 // Coding tools … … 602 634 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 603 635 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 636 #if J0149_TONE_MAPPING_SEI 637 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 638 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") 639 ("SEIToneMapCancelFlag", m_toneMapCancelFlag, false, "Indicates that Tone Mapping SEI message cancels the persistance or follows") 640 ("SEIToneMapPersistenceFlag", m_toneMapPersistenceFlag, true, "Specifies the persistence of the Tone Mapping SEI message") 641 ("SEIToneMapCodedDataBitDepth", m_toneMapCodedDataBitDepth, 8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages") 642 ("SEIToneMapTargetBitDepth", m_toneMapTargetBitDepth, 8, "Specifies Output BitDepth of Tome mapping function") 643 ("SEIToneMapModelId", m_toneMapModelId, 0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n" 644 "\t0: linear mapping with clipping\n" 645 "\t1: sigmoidal mapping\n" 646 "\t2: user-defined table mapping\n" 647 "\t3: piece-wise linear mapping\n" 648 "\t4: luminance dynamic range information ") 649 ("SEIToneMapMinValue", m_toneMapMinValue, 0, "Specifies the minimum value in mode 0") 650 ("SEIToneMapMaxValue", m_toneMapMaxValue, 1023, "Specifies the maxmum value in mode 0") 651 ("SEIToneMapSigmoidMidpoint", m_sigmoidMidpoint, 512, "Specifies the centre point in mode 1") 652 ("SEIToneMapSigmoidWidth", m_sigmoidWidth, 960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1") 653 ("SEIToneMapStartOfCodedInterval", cfg_startOfCodedInterval, string(""), "Array of user-defined mapping table") 654 ("SEIToneMapNumPivots", m_numPivots, 0, "Specifies the number of pivot points in mode 3") 655 ("SEIToneMapCodedPivotValue", cfg_codedPivotValue, string(""), "Array of pivot point") 656 ("SEIToneMapTargetPivotValue", cfg_targetPivotValue, string(""), "Array of pivot point") 657 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 658 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 659 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 660 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") 661 ("SEIToneMapExposureCompensationValueDenomIdc", m_exposureCompensationValueDenomIdc, 2, "Specifies the denominator of ExposureCompensationValue") 662 ("SEIToneMapRefScreenLuminanceWhite", m_refScreenLuminanceWhite, 350, "Specifies reference screen brightness setting in units of candela per square metre") 663 ("SEIToneMapExtendedRangeWhiteLevel", m_extendedRangeWhiteLevel, 800, "Indicates the luminance dynamic range") 664 ("SEIToneMapNominalBlackLevelLumaCodeValue", m_nominalBlackLevelLumaCodeValue, 16, "Specifies luma sample value of the nominal black level assigned decoded pictures") 665 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 666 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 667 #endif 604 668 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 605 669 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" … … 622 686 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 623 687 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 688 #if L0208_SOP_DESCRIPTION_SEI 689 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 690 #endif 691 #if K0180_SCALABLE_NESTING_SEI 692 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 693 #endif 624 694 #if SIGNAL_BITRATE_PICRATE_IN_VPS 625 695 ("BitRatePicRateMaxTLayers", m_bitRatePicRateMaxTLayers, 0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file") … … 878 948 } 879 949 m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 950 #endif 951 #if J0149_TONE_MAPPING_SEI 952 if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag ) 953 { 954 Char* pcStartOfCodedInterval = cfg_startOfCodedInterval.empty() ? NULL: strdup(cfg_startOfCodedInterval.c_str()); 955 Char* pcCodedPivotValue = cfg_codedPivotValue.empty() ? NULL: strdup(cfg_codedPivotValue.c_str()); 956 Char* pcTargetPivotValue = cfg_targetPivotValue.empty() ? NULL: strdup(cfg_targetPivotValue.c_str()); 957 if( m_toneMapModelId == 2 && pcStartOfCodedInterval ) 958 { 959 char *startOfCodedInterval; 960 UInt num = 1u<< m_toneMapTargetBitDepth; 961 m_startOfCodedInterval = new Int[num]; 962 ::memset( m_startOfCodedInterval, 0, sizeof(Int)*num ); 963 startOfCodedInterval = strtok(pcStartOfCodedInterval, " ."); 964 int i = 0; 965 while( startOfCodedInterval && ( i < num ) ) 966 { 967 m_startOfCodedInterval[i] = atoi( startOfCodedInterval ); 968 startOfCodedInterval = strtok(NULL, " ."); 969 i++; 970 } 971 } 972 else 973 { 974 m_startOfCodedInterval = NULL; 975 } 976 if( ( m_toneMapModelId == 3 ) && ( m_numPivots > 0 ) ) 977 { 978 if( pcCodedPivotValue && pcTargetPivotValue ) 979 { 980 char *codedPivotValue; 981 char *targetPivotValue; 982 m_codedPivotValue = new Int[m_numPivots]; 983 m_targetPivotValue = new Int[m_numPivots]; 984 ::memset( m_codedPivotValue, 0, sizeof(Int)*( m_numPivots ) ); 985 ::memset( m_targetPivotValue, 0, sizeof(Int)*( m_numPivots ) ); 986 codedPivotValue = strtok(pcCodedPivotValue, " ."); 987 int i=0; 988 while(codedPivotValue&&i<m_numPivots) 989 { 990 m_codedPivotValue[i] = atoi( codedPivotValue ); 991 codedPivotValue = strtok(NULL, " ."); 992 i++; 993 } 994 i=0; 995 targetPivotValue = strtok(pcTargetPivotValue, " ."); 996 while(targetPivotValue&&i<m_numPivots) 997 { 998 m_targetPivotValue[i]= atoi( targetPivotValue ); 999 targetPivotValue = strtok(NULL, " ."); 1000 i++; 1001 } 1002 } 1003 } 1004 else 1005 { 1006 m_codedPivotValue = NULL; 1007 m_targetPivotValue = NULL; 1008 } 1009 } 880 1010 #endif 881 1011 // check validity of input parameters … … 1375 1505 { 1376 1506 m_numReorderPics[i] = 0; 1507 #if L0323_DPB 1508 m_maxDecPicBuffering[i] = 1; 1509 #else 1377 1510 m_maxDecPicBuffering[i] = 0; 1511 #endif 1378 1512 } 1379 1513 for(Int i=0; i<m_iGOPSize; i++) 1380 1514 { 1515 #if L0323_DPB 1516 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1517 #else 1381 1518 if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1382 { 1519 #endif 1520 { 1521 #if L0323_DPB 1522 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 1523 #else 1383 1524 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics; 1525 #endif 1384 1526 } 1385 1527 Int highestDecodingNumberWithLowerPOC = 0; … … 1412 1554 m_numReorderPics[i+1] = m_numReorderPics[i]; 1413 1555 } 1556 #if L0323_DPB 1557 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1558 if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1) 1559 { 1560 m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1; 1561 } 1562 #else 1414 1563 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1415 1564 if(m_numReorderPics[i] > m_maxDecPicBuffering[i]) … … 1417 1566 m_maxDecPicBuffering[i] = m_numReorderPics[i]; 1418 1567 } 1568 #endif 1419 1569 // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer 1420 1570 if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i]) … … 1423 1573 } 1424 1574 } 1575 1576 1577 #if L0323_DPB 1578 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1579 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1) 1580 { 1581 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1; 1582 } 1583 #else 1425 1584 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1426 1585 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1]) … … 1428 1587 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1]; 1429 1588 } 1589 #endif 1430 1590 1431 1591 #if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers … … 1511 1671 } 1512 1672 #endif 1513 1673 #if !L0034_COMBINED_LIST_CLEANUP 1514 1674 xConfirmPara( m_bUseLComb==false && m_numReorderPics[MAX_TLAYER-1]!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" ); // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1. 1675 #endif 1515 1676 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 1516 1677 #if !SVC_EXTENSION … … 1520 1681 1521 1682 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n"); 1683 1684 #if J0149_TONE_MAPPING_SEI 1685 if (m_toneMappingInfoSEIEnabled) 1686 { 1687 xConfirmPara( m_toneMapCodedDataBitDepth < 8 || m_toneMapCodedDataBitDepth > 14 , "SEIToneMapCodedDataBitDepth must be in rage 8 to 14"); 1688 xConfirmPara( m_toneMapTargetBitDepth < 1 || (m_toneMapTargetBitDepth > 16 && m_toneMapTargetBitDepth < 255) , "SEIToneMapTargetBitDepth must be in rage 1 to 16 or equal to 255"); 1689 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4"); 1690 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0"); 1691 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100"); 1692 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue"); 1693 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue"); 1694 } 1695 #endif 1522 1696 1523 1697 #if RATE_CONTROL_LAMBDA_DOMAIN … … 1677 1851 printf("SQP:%d ", m_uiDeltaQpRD ); 1678 1852 printf("ASR:%d ", m_bUseASR ); 1853 #if !L0034_COMBINED_LIST_CLEANUP 1679 1854 printf("LComb:%d ", m_bUseLComb ); 1855 #endif 1680 1856 printf("FEN:%d ", m_bUseFastEnc ); 1681 1857 printf("ECU:%d ", m_bUseEarlyCU ); -
branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncCfg.h
r125 r133 109 109 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 110 110 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 111 #if L0323_DPB 112 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 113 #else 111 114 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of reference pictures needed for decoding 115 #endif 116 #if !L0034_COMBINED_LIST_CLEANUP 112 117 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421) 118 #endif 113 119 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 114 120 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping … … 172 178 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 173 179 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 180 #if L0386_DB_METRIC 181 Bool m_DeblockingFilterMetric; ///< blockiness metric in encoder 182 #endif 174 183 175 184 // coding tools (PCM) … … 223 232 Int m_bufferingPeriodSEIEnabled; 224 233 Int m_pictureTimingSEIEnabled; 234 #if J0149_TONE_MAPPING_SEI 235 Bool m_toneMappingInfoSEIEnabled; 236 Int m_toneMapId; 237 Bool m_toneMapCancelFlag; 238 Bool m_toneMapPersistenceFlag; 239 Int m_toneMapCodedDataBitDepth; 240 Int m_toneMapTargetBitDepth; 241 Int m_toneMapModelId; 242 Int m_toneMapMinValue; 243 Int m_toneMapMaxValue; 244 Int m_sigmoidMidpoint; 245 Int m_sigmoidWidth; 246 Int m_numPivots; 247 Int m_cameraIsoSpeedIdc; 248 Int m_cameraIsoSpeedValue; 249 Int m_exposureCompensationValueSignFlag; 250 Int m_exposureCompensationValueNumerator; 251 Int m_exposureCompensationValueDenomIdc; 252 Int m_refScreenLuminanceWhite; 253 Int m_extendedRangeWhiteLevel; 254 Int m_nominalBlackLevelLumaCodeValue; 255 Int m_nominalWhiteLevelLumaCodeValue; 256 Int m_extendedWhiteLevelLumaCodeValue; 257 Int* m_startOfCodedInterval; 258 Int* m_codedPivotValue; 259 Int* m_targetPivotValue; 260 #endif 225 261 Int m_framePackingSEIEnabled; 226 262 Int m_framePackingSEIType; … … 232 268 Int m_gradualDecodingRefreshInfoEnabled; 233 269 Int m_decodingUnitInfoSEIEnabled; 270 #if L0208_SOP_DESCRIPTION_SEI 271 Int m_SOPDescriptionSEIEnabled; 272 #endif 273 #if K0180_SCALABLE_NESTING_SEI 274 Int m_scalableNestingSEIEnabled; 275 #endif 234 276 // weighted prediction 235 277 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices -
branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r125 r133 1 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party3 * and contributor rights, including patent rights, and no such rights are4 * granted under this license.5 *6 * Copyright (c) 2010-2013, ITU/ISO/IEC7 * All rights reserved.8 *9 * Redistribution and use in source and binary forms, with or without10 * modification, are permitted provided that the following conditions are met:11 *12 * * Redistributions of source code must retain the above copyright notice,13 * this list of conditions and the following disclaimer.14 * * Redistributions in binary form must reproduce the above copyright notice,15 * this list of conditions and the following disclaimer in the documentation16 * and/or other materials provided with the distribution.17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may18 * be used to endorse or promote products derived from this software without19 * specific prior written permission.20 *21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF31 * THE POSSIBILITY OF SUCH DAMAGE.32 */2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 33 34 34 /** \file TAppEncTop.cpp 35 \brief Encoder application class35 \brief Encoder application class 36 36 */ 37 37 … … 167 167 m_acTEncTop[layer].setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 168 168 m_acTEncTop[layer].setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 169 #if L0386_DB_METRIC 170 m_acTEncTop[layer].setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 171 #endif 169 172 170 173 //====== Motion search ======== … … 200 203 m_acTEncTop[layer].setUseHADME ( m_bUseHADME ); 201 204 m_acTEncTop[layer].setUseLossless ( m_useLossless ); 202 m_acTEncTop[layer].setUseLComb ( m_bUseLComb ); 205 #if !L0034_COMBINED_LIST_CLEANUP 206 m_cTEncTop.setUseLComb ( m_bUseLComb ); 207 #endif 203 208 m_acTEncTop[layer].setdQPs ( m_acLayerCfg[layer].getdQPs() ); 204 209 m_acTEncTop[layer].setUseRDOQ ( m_useRDOQ ); … … 270 275 m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 271 276 m_acTEncTop[layer].setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 277 #if J0149_TONE_MAPPING_SEI 278 m_acTEncTop[layer].setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 279 m_acTEncTop[layer].setTMISEIToneMapId ( m_toneMapId ); 280 m_acTEncTop[layer].setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 281 m_acTEncTop[layer].setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 282 m_acTEncTop[layer].setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 283 m_acTEncTop[layer].setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 284 m_acTEncTop[layer].setTMISEIModelID ( m_toneMapModelId ); 285 m_acTEncTop[layer].setTMISEIMinValue ( m_toneMapMinValue ); 286 m_acTEncTop[layer].setTMISEIMaxValue ( m_toneMapMaxValue ); 287 m_acTEncTop[layer].setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 288 m_acTEncTop[layer].setTMISEISigmoidWidth ( m_sigmoidWidth ); 289 m_acTEncTop[layer].setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 290 m_acTEncTop[layer].setTMISEINumPivots ( m_numPivots ); 291 m_acTEncTop[layer].setTMISEICodedPivotValue ( m_codedPivotValue ); 292 m_acTEncTop[layer].setTMISEITargetPivotValue ( m_targetPivotValue ); 293 m_acTEncTop[layer].setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 294 m_acTEncTop[layer].setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 295 m_acTEncTop[layer].setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 296 m_acTEncTop[layer].setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 297 m_acTEncTop[layer].setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 298 m_acTEncTop[layer].setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 299 m_acTEncTop[layer].setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 300 m_acTEncTop[layer].setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 301 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 302 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 303 #endif 272 304 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 273 305 m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 279 311 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 280 312 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 313 #if L0208_SOP_DESCRIPTION_SEI 314 m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 315 #endif 316 #if K0180_SCALABLE_NESTING_SEI 317 m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 318 #endif 281 319 m_acTEncTop[layer].setUniformSpacingIdr ( m_iUniformSpacingIdr ); 282 320 m_acTEncTop[layer].setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 442 480 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 443 481 m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 482 #if L0386_DB_METRIC 483 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 484 #endif 444 485 445 486 //====== Motion search ======== … … 475 516 m_cTEncTop.setUseHADME ( m_bUseHADME ); 476 517 m_cTEncTop.setUseLossless ( m_useLossless ); 518 #if !L0034_COMBINED_LIST_CLEANUP 477 519 m_cTEncTop.setUseLComb ( m_bUseLComb ); 520 #endif 478 521 m_cTEncTop.setdQPs ( m_aidQP ); 479 522 m_cTEncTop.setUseRDOQ ( m_useRDOQ ); … … 545 588 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 546 589 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 590 #if J0149_TONE_MAPPING_SEI 591 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 592 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); 593 m_cTEncTop.setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 594 m_cTEncTop.setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 595 m_cTEncTop.setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 596 m_cTEncTop.setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 597 m_cTEncTop.setTMISEIModelID ( m_toneMapModelId ); 598 m_cTEncTop.setTMISEIMinValue ( m_toneMapMinValue ); 599 m_cTEncTop.setTMISEIMaxValue ( m_toneMapMaxValue ); 600 m_cTEncTop.setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 601 m_cTEncTop.setTMISEISigmoidWidth ( m_sigmoidWidth ); 602 m_cTEncTop.setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 603 m_cTEncTop.setTMISEINumPivots ( m_numPivots ); 604 m_cTEncTop.setTMISEICodedPivotValue ( m_codedPivotValue ); 605 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue ); 606 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 607 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 608 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 609 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 610 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 611 m_cTEncTop.setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 612 m_cTEncTop.setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 613 m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 614 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 615 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 616 #endif 547 617 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 548 618 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 554 624 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 555 625 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 626 #if L0208_SOP_DESCRIPTION_SEI 627 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 628 #endif 629 #if K0180_SCALABLE_NESTING_SEI 630 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 631 #endif 556 632 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 557 633 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 812 888 813 889 /** 814 - create internal class815 - initialize internal variable816 - until the end of input YUV file, call encoding function in TEncTop class817 - delete allocated buffers818 - destroy internal class819 .820 */890 - create internal class 891 - initialize internal variable 892 - until the end of input YUV file, call encoding function in TEncTop class 893 - delete allocated buffers 894 - destroy internal class 895 . 896 */ 821 897 #if SVC_EXTENSION 822 898 Void TAppEncTop::encode() … … 1102 1178 1103 1179 /** 1104 - application has picture buffer list with size of GOP1105 - picture buffer list acts as ring buffer1106 - end of the list has the latest picture1107 .1108 */1180 - application has picture buffer list with size of GOP 1181 - picture buffer list acts as ring buffer 1182 - end of the list has the latest picture 1183 . 1184 */ 1109 1185 #if SVC_EXTENSION 1110 1186 Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer) … … 1222 1298 1223 1299 /** \param iNumEncoded number of encoded frames 1224 */1300 */ 1225 1301 Void TAppEncTop::xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits) 1226 1302 { … … 1251 1327 1252 1328 /** 1253 *1254 */1329 * 1330 */ 1255 1331 void TAppEncTop::rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& annexBsizes) 1256 1332 { … … 1264 1340 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1265 1341 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1266 case NAL_UNIT_CODED_SLICE_TLA :1342 case NAL_UNIT_CODED_SLICE_TLA_R: 1267 1343 case NAL_UNIT_CODED_SLICE_TSA_N: 1268 1344 case NAL_UNIT_CODED_SLICE_STSA_R: 1269 1345 case NAL_UNIT_CODED_SLICE_STSA_N: 1270 case NAL_UNIT_CODED_SLICE_BLA :1271 case NAL_UNIT_CODED_SLICE_BLA NT:1346 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 1347 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 1272 1348 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 1273 case NAL_UNIT_CODED_SLICE_IDR :1349 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 1274 1350 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 1275 1351 case NAL_UNIT_CODED_SLICE_CRA: 1276 1352 case NAL_UNIT_CODED_SLICE_RADL_N: 1277 case NAL_UNIT_CODED_SLICE_ DLP:1353 case NAL_UNIT_CODED_SLICE_RADL_R: 1278 1354 case NAL_UNIT_CODED_SLICE_RASL_N: 1279 case NAL_UNIT_CODED_SLICE_ TFD:1355 case NAL_UNIT_CODED_SLICE_RASL_R: 1280 1356 case NAL_UNIT_VPS: 1281 1357 case NAL_UNIT_SPS:
Note: See TracChangeset for help on using the changeset viewer.