Changeset 133 in SHVCSoftware for branches/SHM-2.0-dev/source/App


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

update to HM10.1

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  
    254254      }
    255255      if ( bNewPicture && bNewPOC &&
    256            (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
     256           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
    257257            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
    258258            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
    259             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT
    260             || 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 ) )
    261261      {
    262262        xFlushOutput( pcListPic, curLayerId );
     
    414414      }
    415415      if ( bNewPicture &&
    416            (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
     416           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
    417417            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
    418418            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
    419             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT
    420             || 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 ) )
    421421      {
    422422        xFlushOutput( pcListPic );
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r125 r133  
    8989{
    9090  m_aidQP = NULL;
     91#if J0149_TONE_MAPPING_SEI
     92  m_startOfCodedInterval = NULL;
     93  m_codedPivotValue = NULL;
     94  m_targetPivotValue = NULL;
     95#endif
    9196}
    9297#endif
     
    102107    delete[] m_aidQP;
    103108  }
     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
    104126  free(m_pchInputFile);
    105127#endif
     
    324346  string cfg_RowHeight;
    325347  string cfg_ScalingListFile;
     348#if J0149_TONE_MAPPING_SEI
     349  string cfg_startOfCodedInterval;
     350  string cfg_codedPivotValue;
     351  string cfg_targetPivotValue;
     352#endif
    326353#if SIGNAL_BITRATE_PICRATE_IN_VPS
    327354  string cfg_bitRateInfoPresentFlag;
     
    430457  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
    431458  ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
     459#if !L0034_COMBINED_LIST_CLEANUP
    432460  ("ListCombination,-lc",     m_bUseLComb,               true, "Combined reference list for uni-prediction estimation in B-slices")
     461#endif
    433462  // motion options
    434463  ("FastSearch",              m_iFastSearch,                1, "0:Full search  1:Diamond  2:PMVFAST")
     
    488517  ("LoopFilterTcOffset_div2",        m_loopFilterTcOffsetDiv2,             0 )
    489518  ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false )
     519#if L0386_DB_METRIC
     520  ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
     521#endif
    490522
    491523  // Coding tools
     
    602634  ("SEIBufferingPeriod",             m_bufferingPeriodSEIEnabled,              0, "Control generation of buffering period SEI messages")
    603635  ("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
    604668  ("SEIFramePacking",                m_framePackingSEIEnabled,                 0, "Control generation of frame packing SEI messages")
    605669  ("SEIFramePackingType",            m_framePackingSEIType,                    0, "Define frame packing arrangement\n"
     
    622686  ("SEIGradualDecodingRefreshInfo",  m_gradualDecodingRefreshInfoEnabled,      0, "Control generation of gradual decoding refresh information SEI message")
    623687  ("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
    624694#if SIGNAL_BITRATE_PICRATE_IN_VPS
    625695  ("BitRatePicRateMaxTLayers",   m_bitRatePicRateMaxTLayers,           0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file")
     
    878948  }
    879949  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  }
    8801010#endif
    8811011  // check validity of input parameters
     
    13751505  {
    13761506    m_numReorderPics[i] = 0;
     1507#if L0323_DPB
     1508    m_maxDecPicBuffering[i] = 1;
     1509#else
    13771510    m_maxDecPicBuffering[i] = 0;
     1511#endif
    13781512  }
    13791513  for(Int i=0; i<m_iGOPSize; i++)
    13801514  {
     1515#if L0323_DPB
     1516    if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
     1517#else
    13811518    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
    13831524      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics;
     1525#endif
    13841526    }
    13851527    Int highestDecodingNumberWithLowerPOC = 0;
     
    14121554      m_numReorderPics[i+1] = m_numReorderPics[i];
    14131555    }
     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
    14141563    // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    14151564    if(m_numReorderPics[i] > m_maxDecPicBuffering[i])
     
    14171566      m_maxDecPicBuffering[i] = m_numReorderPics[i];
    14181567    }
     1568#endif
    14191569    // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer
    14201570    if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i])
     
    14231573    }
    14241574  }
     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
    14251584  // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    14261585  if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])
     
    14281587    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];
    14291588  }
     1589#endif
    14301590
    14311591#if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers
     
    15111671  }
    15121672#endif
    1513 
     1673#if !L0034_COMBINED_LIST_CLEANUP
    15141674  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
    15151676  xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );
    15161677#if !SVC_EXTENSION
     
    15201681
    15211682  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
    15221696
    15231697#if RATE_CONTROL_LAMBDA_DOMAIN
     
    16771851  printf("SQP:%d ", m_uiDeltaQpRD         );
    16781852  printf("ASR:%d ", m_bUseASR             );
     1853#if !L0034_COMBINED_LIST_CLEANUP
    16791854  printf("LComb:%d ", m_bUseLComb         );
     1855#endif
    16801856  printf("FEN:%d ", m_bUseFastEnc         );
    16811857  printf("ECU:%d ", m_bUseEarlyCU         );
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncCfg.h

    r125 r133  
    109109  GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
    110110  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
    111114  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of reference pictures needed for decoding
     115#endif
     116#if !L0034_COMBINED_LIST_CLEANUP
    112117  Bool      m_bUseLComb;                                      ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)
     118#endif
    113119  Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
    114120  Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
     
    172178  Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
    173179  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
    174183 
    175184  // coding tools (PCM)
     
    223232  Int       m_bufferingPeriodSEIEnabled;
    224233  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
    225261  Int       m_framePackingSEIEnabled;
    226262  Int       m_framePackingSEIType;
     
    232268  Int       m_gradualDecodingRefreshInfoEnabled;
    233269  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
    234276  // weighted prediction
    235277  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
  • 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.