Ignore:
Timestamp:
28 Apr 2013, 08:49:16 (12 years ago)
Author:
seregin
Message:

update to HM10.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r125 r133  
    11/* The copyright in this software is being made available under the BSD
    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 */
     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 */
    3333
    3434/** \file     TAppEncTop.cpp
    35 \brief    Encoder application class
     35    \brief    Encoder application class
    3636*/
    3737
     
    167167    m_acTEncTop[layer].setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
    168168    m_acTEncTop[layer].setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
     169#if L0386_DB_METRIC
     170    m_acTEncTop[layer].setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
     171#endif
    169172
    170173    //====== Motion search ========
     
    200203    m_acTEncTop[layer].setUseHADME                     ( m_bUseHADME    );
    201204    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
    203208    m_acTEncTop[layer].setdQPs                         ( m_acLayerCfg[layer].getdQPs() );
    204209    m_acTEncTop[layer].setUseRDOQ                      ( m_useRDOQ     );
     
    270275    m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
    271276    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
    272304    m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
    273305    m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType );
     
    279311    m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled );
    280312    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
    281319    m_acTEncTop[layer].setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    282320    m_acTEncTop[layer].setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    442480  m_cTEncTop.setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
    443481  m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
     482#if L0386_DB_METRIC
     483  m_cTEncTop.setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
     484#endif
    444485
    445486  //====== Motion search ========
     
    475516  m_cTEncTop.setUseHADME                     ( m_bUseHADME    );
    476517  m_cTEncTop.setUseLossless                  ( m_useLossless );
     518#if !L0034_COMBINED_LIST_CLEANUP
    477519  m_cTEncTop.setUseLComb                     ( m_bUseLComb    );
     520#endif
    478521  m_cTEncTop.setdQPs                         ( m_aidQP        );
    479522  m_cTEncTop.setUseRDOQ                      ( m_useRDOQ     );
     
    545588  m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
    546589  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
    547617  m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
    548618  m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType );
     
    554624  m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled );
    555625  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
    556632  m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    557633  m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    812888
    813889/**
    814 - create internal class
    815 - initialize internal variable
    816 - until the end of input YUV file, call encoding function in TEncTop class
    817 - delete allocated buffers
    818 - destroy internal class
    819 .
    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 */
    821897#if SVC_EXTENSION
    822898Void TAppEncTop::encode()
     
    11021178
    11031179/**
    1104 - application has picture buffer list with size of GOP
    1105 - picture buffer list acts as ring buffer
    1106 - end of the list has the latest picture
    1107 .
    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 */
    11091185#if SVC_EXTENSION
    11101186Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer)
     
    12221298
    12231299/** \param iNumEncoded  number of encoded frames
    1224 */
     1300 */
    12251301Void TAppEncTop::xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits)
    12261302{
     
    12511327
    12521328/**
    1253 *
    1254 */
     1329 *
     1330 */
    12551331void TAppEncTop::rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& annexBsizes)
    12561332{
     
    12641340    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    12651341    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    1266     case NAL_UNIT_CODED_SLICE_TLA:
     1342    case NAL_UNIT_CODED_SLICE_TLA_R:
    12671343    case NAL_UNIT_CODED_SLICE_TSA_N:
    12681344    case NAL_UNIT_CODED_SLICE_STSA_R:
    12691345    case NAL_UNIT_CODED_SLICE_STSA_N:
    1270     case NAL_UNIT_CODED_SLICE_BLA:
    1271     case NAL_UNIT_CODED_SLICE_BLANT:
     1346    case NAL_UNIT_CODED_SLICE_BLA_W_LP:
     1347    case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
    12721348    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    1273     case NAL_UNIT_CODED_SLICE_IDR:
     1349    case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
    12741350    case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    12751351    case NAL_UNIT_CODED_SLICE_CRA:
    12761352    case NAL_UNIT_CODED_SLICE_RADL_N:
    1277     case NAL_UNIT_CODED_SLICE_DLP:
     1353    case NAL_UNIT_CODED_SLICE_RADL_R:
    12781354    case NAL_UNIT_CODED_SLICE_RASL_N:
    1279     case NAL_UNIT_CODED_SLICE_TFD:
     1355    case NAL_UNIT_CODED_SLICE_RASL_R:
    12801356    case NAL_UNIT_VPS:
    12811357    case NAL_UNIT_SPS:
Note: See TracChangeset for help on using the changeset viewer.