Changeset 302 in SHVCSoftware for branches/SHM-2.1-dev/source/App/TAppEncoder


Ignore:
Timestamp:
28 Jun 2013, 00:40:00 (12 years ago)
Author:
seregin
Message:

update to HM11.0

Location:
branches/SHM-2.1-dev/source/App/TAppEncoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r298 r302  
    9696{
    9797  m_aidQP = NULL;
    98 #if J0149_TONE_MAPPING_SEI
    9998  m_startOfCodedInterval = NULL;
    10099  m_codedPivotValue = NULL;
    101100  m_targetPivotValue = NULL;
    102 #endif
    103101}
    104102#endif
     
    114112    delete[] m_aidQP;
    115113  }
    116 #if J0149_TONE_MAPPING_SEI
    117114  if ( m_startOfCodedInterval )
    118115  {
     
    130127    m_targetPivotValue = NULL;
    131128  }
    132 #endif
    133129  free(m_pchInputFile);
    134130#endif
     
    326322}
    327323
    328 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    329 Void readBoolString(const string inpString, const Int numEntries, Bool* &memberArray, const char *elementName);
    330 Void readIntString(const string inpString, const Int numEntries, Int* &memberArray, const char *elementName);
    331 #endif
    332324// ====================================================================================================================
    333325// Public member functions
     
    450442  string cfg_RowHeight;
    451443  string cfg_ScalingListFile;
    452 #if J0149_TONE_MAPPING_SEI
    453444  string cfg_startOfCodedInterval;
    454445  string cfg_codedPivotValue;
    455446  string cfg_targetPivotValue;
    456 #endif
    457 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    458   string cfg_bitRateInfoPresentFlag;
    459   string cfg_picRateInfoPresentFlag;
    460   string cfg_avgBitRate;
    461   string cfg_maxBitRate;
    462   string cfg_avgPicRate;
    463   string cfg_constantPicRateIdc;
    464 #endif
    465447  po::Options opts;
    466448  opts.addOptions()
     
    556538  ("Tier",    m_levelTier, Level::MAIN,   "Tier to use for interpretation of --Level")
    557539
    558 #if L0046_CONSTRAINT_FLAGS
    559540  ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive")
    560541  ("InterlacedSource",  m_interlacedSourceFlag,  false, "Indicate that source is interlaced")
    561542  ("NonPackedSource",   m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
    562543  ("FrameOnly",         m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames")
    563 #endif
    564544
    565545  // Unit definition parameters
     
    585565  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
    586566  ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
    587 #if !L0034_COMBINED_LIST_CLEANUP
    588   ("ListCombination,-lc",     m_bUseLComb,               true, "Combined reference list for uni-prediction estimation in B-slices")
    589 #endif
    590567  // motion options
    591568  ("FastSearch",              m_iFastSearch,                1, "0:Full search  1:Diamond  2:PMVFAST")
     
    633610  ("RDOQ",                          m_useRDOQ,                  true )
    634611  ("RDOQTS",                        m_useRDOQTS,                true )
    635 #if L0232_RD_PENALTY
    636612  ("RDpenalty",                     m_rdPenalty,                0,  "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disbaled  1:RD-penalty  2:maximum RD-penalty")
    637 #endif
    638613  // Entropy coding parameters
    639614  ("SBACRD",                         m_bUseSBACRD,                      true, "SBAC based RD estimation")
     
    645620  ("LoopFilterTcOffset_div2",        m_loopFilterTcOffsetDiv2,             0 )
    646621  ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false )
    647 #if L0386_DB_METRIC
    648622  ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
    649 #endif
    650623
    651624  // Coding tools
     
    722695  ( "RateControl",         m_RCEnableRateControl,   false, "Rate control: enable rate control" )
    723696  ( "TargetBitrate",       m_RCTargetBitrate,           0, "Rate control: target bitrate" )
     697#if M0036_RC_IMPROVEMENT
     698  ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit,     0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" )
     699#else
    724700  ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" )
     701#endif
    725702  ( "LCULevelRateControl", m_RCLCULevelRC,           true, "Rate control: true: LCU level RC; false: picture level RC" )
    726703  ( "RCLCUSeparateModel",  m_RCUseLCUSeparateModel,  true, "Rate control: use LCU level separate R-lambda model" )
     
    775752  ("SEIBufferingPeriod",             m_bufferingPeriodSEIEnabled,              0, "Control generation of buffering period SEI messages")
    776753  ("SEIPictureTiming",               m_pictureTimingSEIEnabled,                0, "Control generation of picture timing SEI messages")
    777 #if J0149_TONE_MAPPING_SEI
    778754  ("SEIToneMappingInfo",                       m_toneMappingInfoSEIEnabled,    false, "Control generation of Tone Mapping SEI messages")
    779755  ("SEIToneMapId",                             m_toneMapId,                        0, "Specifies Id of Tone Mapping SEI message for a given session")
     
    806782  ("SEIToneMapNominalWhiteLevelLumaCodeValue",        m_nominalWhiteLevelLumaCodeValue,         235, "Specifies luma sample value of the nominal white level assigned decoded pictures")
    807783  ("SEIToneMapExtendedWhiteLevelLumaCodeValue",       m_extendedWhiteLevelLumaCodeValue,        300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures")
    808 #endif
    809784  ("SEIFramePacking",                m_framePackingSEIEnabled,                 0, "Control generation of frame packing SEI messages")
    810785  ("SEIFramePackingType",            m_framePackingSEIType,                    0, "Define frame packing arrangement\n"
     
    830805  ("SEILayersPresent",               m_layersPresentSEIEnabled,                0, "Control generation of layers present SEI message")
    831806#endif
    832 #if L0208_SOP_DESCRIPTION_SEI
    833807  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    834 #endif
    835 #if K0180_SCALABLE_NESTING_SEI
    836808  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
    837 #endif
    838 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    839   ("BitRatePicRateMaxTLayers",   m_bitRatePicRateMaxTLayers,           0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file")
    840   ("BitRateInfoPresent",         cfg_bitRateInfoPresentFlag,          string(""), "Control signalling of bit rate information of avg. bit rate and max. bit rate in VPS\n"
    841                                                                           "\t0: Do not sent bit rate info\n"
    842                                                                           "\tN (N > 0): Send bit rate info for N sub-layers. N should equal maxTempLayers.")                                                                     
    843   ("PicRateInfoPresent",         cfg_picRateInfoPresentFlag,          string(""), "Control signalling of picture rate information of avg. bit rate and max. bit rate in VPS\n"
    844                                                                           "\t0: Do not sent picture rate info\n"
    845                                                                           "\tN (N > 0): Send picture rate info for N sub-layers. N should equal maxTempLayers.")                                                                     
    846   ("AvgBitRate",                   cfg_avgBitRate,                    string(""), "List of avg. bit rates for the different sub-layers; include non-negative number even if corresponding flag is 0")
    847   ("MaxBitRate",                   cfg_maxBitRate,                    string(""), "List of max. bit rates for the different sub-layers; include non-negative number even if corresponding flag is 0")
    848   ("AvgPicRate",                   cfg_avgPicRate,                    string(""), "List of avg. picture rates for the different sub-layers; include non-negative number even if corresponding flag is 0")
    849   ("ConstantPicRateIdc",           cfg_constantPicRateIdc,            string(""), "List of constant picture rate IDCs; include non-negative number even if corresponding flag is 0")
    850 #endif
    851809#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    852810  ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
     
    11531111  }
    11541112#endif
    1155 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    1156   readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" );
    1157   readIntString (cfg_avgBitRate,             m_bitRatePicRateMaxTLayers, m_avgBitRate,             "avg. bit rate"               );
    1158   readIntString (cfg_maxBitRate,             m_bitRatePicRateMaxTLayers, m_maxBitRate,             "max. bit rate"               );
    1159   readBoolString(cfg_picRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_picRateInfoPresentFlag, "bit rate info. present flag" );
    1160   readIntString (cfg_avgPicRate,             m_bitRatePicRateMaxTLayers, m_avgPicRate,             "avg. pic rate"               );
    1161   readIntString (cfg_constantPicRateIdc,     m_bitRatePicRateMaxTLayers, m_constantPicRateIdc,     "constant pic rate Idc"       );
    1162 #endif
    11631113  m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());
    11641114 
     
    12691219  m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
    12701220#endif
    1271 #if J0149_TONE_MAPPING_SEI
    12721221  if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag )
    12731222  {
     
    13281277    }
    13291278  }
    1330 #endif
    13311279  // check validity of input parameters
    13321280  xCheckParameter();
     
    13401288  return true;
    13411289}
    1342 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    1343 Void readBoolString(const string inpString, const Int numEntries, Bool* &memberArray, const char *elementName)
    1344 {
    1345   Char* inpArray = inpString.empty() ? NULL : strdup(inpString.c_str());
    1346   Int i = 0;
    1347   if(numEntries)
    1348   {
    1349     Char* tempArray = strtok(inpArray, " ,-");
    1350     memberArray = new Bool[numEntries];
    1351     while( tempArray != NULL )
    1352     {
    1353       if( i >= numEntries )
    1354       {
    1355         printf( "The number of %s defined is larger than the allowed number\n", elementName );
    1356         exit( EXIT_FAILURE );
    1357       }
    1358       assert( (atoi(tempArray) == 0) || (atoi(tempArray) == 1) );
    1359       *( memberArray + i ) = atoi(tempArray);
    1360       tempArray = strtok(NULL, " ,-");
    1361       i++;
    1362     }
    1363     if( i < numEntries )
    1364     {
    1365       printf( "Some %s are not defined\n", elementName );
    1366       exit( EXIT_FAILURE );
    1367     }
    1368   }
    1369   else
    1370   {
    1371     memberArray = NULL;
    1372   }
    1373 }
    1374 
    1375 Void readIntString(const string inpString, const Int numEntries, Int* &memberArray, const char *elementName)
    1376 {
    1377   Char* inpArray = inpString.empty() ? NULL : strdup(inpString.c_str());
    1378   Int i = 0;
    1379   if(numEntries)
    1380   {
    1381     Char* tempArray = strtok(inpArray, " ,-");
    1382     memberArray = new Int[numEntries];
    1383     while( tempArray != NULL )
    1384     {
    1385       if( i >= numEntries )
    1386       {
    1387         printf( "The number of %s defined is larger than the allowed number\n", elementName );
    1388         exit( EXIT_FAILURE );
    1389       }
    1390       *( memberArray + i ) = atoi(tempArray);
    1391       tempArray = strtok(NULL, " ,-");
    1392       i++;
    1393     }
    1394     if( i < numEntries )
    1395     {
    1396       printf( "Some %s are not defined\n", elementName );
    1397       exit( EXIT_FAILURE );
    1398     }
    1399   }
    1400   else
    1401   {
    1402     memberArray = NULL;
    1403   }
    1404 }
    1405 #endif
    14061290// ====================================================================================================================
    14071291// Private member functions
     
    14191303    fprintf(stderr, "**          decoder requires this option to be enabled.         **\n");
    14201304    fprintf(stderr, "******************************************************************\n");
     1305  }
     1306  if( m_profile==Profile::NONE )
     1307  {
     1308    fprintf(stderr, "***************************************************************************\n");
     1309    fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");
     1310    fprintf(stderr, "***************************************************************************\n");
     1311  }
     1312  if( m_level==Level::NONE )
     1313  {
     1314    fprintf(stderr, "***************************************************************************\n");
     1315    fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
     1316    fprintf(stderr, "***************************************************************************\n");
    14211317  }
    14221318
     
    14391335  xConfirmPara( m_iQP <  -6 * (m_internalBitDepthY - 8) || m_iQP > 51,                    "QP exceeds supported range (-QpBDOffsety to 51)" );
    14401336#endif
    1441   xConfirmPara( m_loopFilterBetaOffsetDiv2 < -13 || m_loopFilterBetaOffsetDiv2 > 13,          "Loop Filter Beta Offset div. 2 exceeds supported range (-13 to 13)");
    1442   xConfirmPara( m_loopFilterTcOffsetDiv2 < -13 || m_loopFilterTcOffsetDiv2 > 13,              "Loop Filter Tc Offset div. 2 exceeds supported range (-13 to 13)");
     1337  xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6,          "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)");
     1338  xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6,              "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)");
    14431339  xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2,                                     "Fast Search Mode is not supported value (0:Full search  1:Diamond  2:PMVFAST)" );
    14441340  xConfirmPara( m_iSearchRange < 0 ,                                                        "Search Range must be more than 0" );
     
    16011497    }
    16021498  }
    1603 #endif 
    1604 
    1605 #if SVC_EXTENSION
     1499
    16061500  // verify layer configuration parameters
    16071501  for(UInt layer=0; layer<m_numLayers; layer++)
     
    18281722  {
    18291723    m_numReorderPics[i] = 0;
    1830 #if L0323_DPB
    18311724    m_maxDecPicBuffering[i] = 1;
    1832 #else
    1833     m_maxDecPicBuffering[i] = 0;
    1834 #endif
    18351725  }
    18361726  for(Int i=0; i<m_iGOPSize; i++)
    18371727  {
    1838 #if L0323_DPB
    18391728    if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
    1840 #else
    1841     if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
    1842 #endif
    1843     {
    1844 #if L0323_DPB
     1729    {
    18451730      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1;
    1846 #else
    1847       m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics;
    1848 #endif
    18491731    }
    18501732    Int highestDecodingNumberWithLowerPOC = 0;
     
    18771759      m_numReorderPics[i+1] = m_numReorderPics[i];
    18781760    }
    1879 #if L0323_DPB
    18801761    // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive
    18811762    if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1)
     
    18831764      m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1;
    18841765    }
    1885 #else
    1886     // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    1887     if(m_numReorderPics[i] > m_maxDecPicBuffering[i])
    1888     {
    1889       m_maxDecPicBuffering[i] = m_numReorderPics[i];
    1890     }
    1891 #endif
    18921766    // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer
    18931767    if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i])
     
    18981772
    18991773
    1900 #if L0323_DPB
    19011774  // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] -  1, inclusive
    19021775  if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1)
     
    19041777    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1;
    19051778  }
    1906 #else
    1907   // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    1908   if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])
    1909   {
    1910     m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];
    1911   }
    1912 #endif
    19131779
    19141780#if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers
     
    19941860  }
    19951861#endif
    1996 #if !L0034_COMBINED_LIST_CLEANUP
    1997   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.
    1998 #endif
    19991862  xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );
    20001863#if !SVC_EXTENSION
     
    20051868  xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n");
    20061869
    2007 #if J0149_TONE_MAPPING_SEI
    20081870  if (m_toneMappingInfoSEIEnabled)
    20091871  {
     
    20161878    xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue");
    20171879  }
    2018 #endif
    20191880
    20201881#if RATE_CONTROL_LAMBDA_DOMAIN
     
    20661927
    20671928  xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2");
    2068 #if L0444_FPA_TYPE
    20691929  if (m_framePackingSEIEnabled)
    20701930  {
    20711931    xConfirmPara(m_framePackingSEIType < 3 || m_framePackingSEIType > 5 , "SEIFramePackingType must be in rage 3 to 5");
    20721932  }
    2073 #endif
    20741933#if VPS_EXTN_DIRECT_REF_LAYERS
    20751934#if M0457_PREDICTION_INDICATIONS
     
    22662125  printf("RDQ:%d ", m_useRDOQ            );
    22672126  printf("RDQTS:%d ", m_useRDOQTS        );
    2268 #if L0232_RD_PENALTY
    22692127  printf("RDpenalty:%d ", m_rdPenalty  );
    2270 #endif
    22712128  printf("SQP:%d ", m_uiDeltaQpRD         );
    22722129  printf("ASR:%d ", m_bUseASR             );
    2273 #if !L0034_COMBINED_LIST_CLEANUP
    2274   printf("LComb:%d ", m_bUseLComb         );
    2275 #endif
    22762130  printf("FEN:%d ", m_bUseFastEnc         );
    22772131  printf("ECU:%d ", m_bUseEarlyCU         );
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r297 r302  
    9999  Level::Tier   m_levelTier;
    100100  Level::Name   m_level;
    101 #if L0046_CONSTRAINT_FLAGS
    102101  Bool m_progressiveSourceFlag;
    103102  Bool m_interlacedSourceFlag;
    104103  Bool m_nonPackedConstraintFlag;
    105104  Bool m_frameOnlyConstraintFlag;
    106 #endif
    107105 
    108106  // coding structure
     
    115113  GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
    116114  Int       m_numReorderPics[MAX_TLAYER];                     ///< total number of reorder pictures
    117 #if L0323_DPB
    118115  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of pictures in the decoded picture buffer
    119 #else
    120   Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of reference pictures needed for decoding
    121 #endif
    122 #if !L0034_COMBINED_LIST_CLEANUP
    123   Bool      m_bUseLComb;                                      ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)
    124 #endif
    125116  Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
    126117  Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
     
    184175  Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
    185176  Bool      m_DeblockingFilterControlPresent;                 ///< deblocking filter control present flag in PPS
    186 #if L0386_DB_METRIC
    187177  Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
    188 #endif
    189178 
    190179  // coding tools (PCM)
     
    200189  Bool      m_useRDOQ;                                       ///< flag for using RD optimized quantization
    201190  Bool      m_useRDOQTS;                                     ///< flag for using RD optimized quantization for transform skip
    202 #if L0232_RD_PENALTY
    203191  Int      m_rdPenalty;                                      ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty)
    204 #endif
    205192  Int       m_iFastSearch;                                    ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST
    206193  Int       m_iSearchRange;                                   ///< ME search range
     
    241228  Int       m_bufferingPeriodSEIEnabled;
    242229  Int       m_pictureTimingSEIEnabled;
    243 #if J0149_TONE_MAPPING_SEI
    244230  Bool      m_toneMappingInfoSEIEnabled;
    245231  Int       m_toneMapId;
     
    267253  Int*      m_codedPivotValue;
    268254  Int*      m_targetPivotValue;
    269 #endif
    270255  Int       m_framePackingSEIEnabled;
    271256  Int       m_framePackingSEIType;
     
    280265  Int       m_layersPresentSEIEnabled;
    281266#endif
    282 #if L0208_SOP_DESCRIPTION_SEI
    283267  Int       m_SOPDescriptionSEIEnabled;
    284 #endif
    285 #if K0180_SCALABLE_NESTING_SEI
    286268  Int       m_scalableNestingSEIEnabled;
    287 #endif
    288269  // weighted prediction
    289270  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
     
    299280  Bool      m_RCEnableRateControl;                ///< enable rate control or not
    300281  Int       m_RCTargetBitrate;                    ///< target bitrate when rate control is enabled
     282#if M0036_RC_IMPROVEMENT
     283  Int       m_RCKeepHierarchicalBit;              ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation
     284#else
    301285  Bool      m_RCKeepHierarchicalBit;              ///< whether keeping hierarchical bit allocation structure or not
     286#endif
    302287  Bool      m_RCLCULevelRC;                       ///< true: LCU level rate control; false: picture level rate control
    303288  Bool      m_RCUseLCUSeparateModel;              ///< use separate R-lambda model at LCU level
     
    363348  Void  xPrintParameter ();                                   ///< print configuration values
    364349  Void  xPrintUsage     ();                                   ///< print usage
    365 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    366   Int       m_bitRatePicRateMaxTLayers;                       ///< Indicates max. number of sub-layers for which bit rate is signalled.
    367   Bool*     m_bitRateInfoPresentFlag;                         ///< Indicates whether bit rate information is signalled
    368   Bool*     m_picRateInfoPresentFlag;                         ///< Indicates whether pic rate information is signalled
    369   Int*      m_avgBitRate;                                     ///< Indicates avg. bit rate information for various sub-layers
    370   Int*      m_maxBitRate;                                     ///< Indicates max. bit rate information for various sub-layers
    371   Int*      m_avgPicRate;                                     ///< Indicates avg. picture rate information for various sub-layers
    372   Int*      m_constantPicRateIdc;                                ///< Indicates constant picture rate idc for various sub-layers
    373 #endif
    374350#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    375351  Int       m_adaptiveResolutionChange;                       ///< Indicate adaptive resolution change frame
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r297 r302  
    104104    m_acTEncTop[layer].setProfile(m_profile);
    105105    m_acTEncTop[layer].setLevel(m_levelTier, m_level);
    106 #if L0046_CONSTRAINT_FLAGS
    107106    m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlag);
    108107    m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlag);
    109108    m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag);
    110109    m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
    111 #endif
    112110
    113111#if REF_IDX_MFM
     
    244242    m_acTEncTop[layer].setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
    245243    m_acTEncTop[layer].setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
    246 #if L0386_DB_METRIC
    247244    m_acTEncTop[layer].setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
    248 #endif
    249245
    250246    //====== Motion search ========
     
    280276    m_acTEncTop[layer].setUseHADME                     ( m_bUseHADME    );
    281277    m_acTEncTop[layer].setUseLossless                  ( m_useLossless );
    282 #if !L0034_COMBINED_LIST_CLEANUP
    283     m_cTEncTop.setUseLComb                             ( m_bUseLComb    );
    284 #endif
    285278    m_acTEncTop[layer].setdQPs                         ( m_acLayerCfg[layer].getdQPs() );
    286279    m_acTEncTop[layer].setUseRDOQ                      ( m_useRDOQ     );
    287280    m_acTEncTop[layer].setUseRDOQTS                    ( m_useRDOQTS   );
    288 #if L0232_RD_PENALTY
    289281    m_acTEncTop[layer].setRDpenalty                    ( m_rdPenalty );
    290 #endif
    291282    m_acTEncTop[layer].setQuadtreeTULog2MaxSize        ( m_uiQuadtreeTULog2MaxSize );
    292283    m_acTEncTop[layer].setQuadtreeTULog2MinSize        ( m_uiQuadtreeTULog2MinSize );
     
    355346    m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
    356347    m_acTEncTop[layer].setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled );
    357 #if J0149_TONE_MAPPING_SEI
    358348    m_acTEncTop[layer].setToneMappingInfoSEIEnabled                 ( m_toneMappingInfoSEIEnabled );
    359349    m_acTEncTop[layer].setTMISEIToneMapId                           ( m_toneMapId );
     
    381371    m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue      ( m_nominalWhiteLevelLumaCodeValue );
    382372    m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue     ( m_extendedWhiteLevelLumaCodeValue );
    383 #endif
    384373    m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
    385374    m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType );
     
    394383    m_acTEncTop[layer].setLayersPresentSEIEnabled( m_layersPresentSEIEnabled );
    395384#endif
    396 #if L0208_SOP_DESCRIPTION_SEI
    397385    m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    398 #endif
    399 #if K0180_SCALABLE_NESTING_SEI
    400386    m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
    401 #endif
    402387    m_acTEncTop[layer].setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    403388    m_acTEncTop[layer].setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    478463    m_acTEncTop[layer].setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal );
    479464    m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical );
    480 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    481     TComBitRatePicRateInfo *bitRatePicRateInfo = m_cTEncTop[layer].getVPS()->getBitratePicrateInfo();
    482     // The number of bit rate/pic rate have to equal to number of sub-layers.
    483     if(m_bitRatePicRateMaxTLayers)
    484     {
    485       assert(m_bitRatePicRateMaxTLayers == m_cTEncTop[layer].getVPS()->getMaxTLayers());
    486     }
    487     for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)
    488     {
    489       bitRatePicRateInfo->setBitRateInfoPresentFlag( i, m_bitRateInfoPresentFlag[i] );
    490       if( bitRatePicRateInfo->getBitRateInfoPresentFlag(i) )
    491       {
    492         bitRatePicRateInfo->setAvgBitRate(i, m_avgBitRate[i]);
    493         bitRatePicRateInfo->setMaxBitRate(i, m_maxBitRate[i]);
    494       }
    495     }
    496     for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)
    497     {
    498       bitRatePicRateInfo->setPicRateInfoPresentFlag( i, m_picRateInfoPresentFlag[i] );
    499       if( bitRatePicRateInfo->getPicRateInfoPresentFlag(i) )
    500       {
    501         bitRatePicRateInfo->setAvgPicRate     (i, m_avgPicRate[i]);
    502         bitRatePicRateInfo->setConstantPicRateIdc(i, m_constantPicRateIdc[i]);
    503       }
    504     }
    505 #endif
    506465#if REF_IDX_FRAMEWORK
    507466    m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled);
     
    543502  m_cTEncTop.setProfile(m_profile);
    544503  m_cTEncTop.setLevel(m_levelTier, m_level);
    545 #if L0046_CONSTRAINT_FLAGS
    546504  m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag);
    547505  m_cTEncTop.setInterlacedSourceFlag(m_interlacedSourceFlag);
    548506  m_cTEncTop.setNonPackedConstraintFlag(m_nonPackedConstraintFlag);
    549507  m_cTEncTop.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
    550 #endif
    551508
    552509  m_cTEncTop.setFrameRate                    ( m_iFrameRate );
     
    587544  m_cTEncTop.setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
    588545  m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
    589 #if L0386_DB_METRIC
    590546  m_cTEncTop.setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
    591 #endif
    592547
    593548  //====== Motion search ========
     
    623578  m_cTEncTop.setUseHADME                     ( m_bUseHADME    );
    624579  m_cTEncTop.setUseLossless                  ( m_useLossless );
    625 #if !L0034_COMBINED_LIST_CLEANUP
    626   m_cTEncTop.setUseLComb                     ( m_bUseLComb    );
    627 #endif
    628580  m_cTEncTop.setdQPs                         ( m_aidQP        );
    629581  m_cTEncTop.setUseRDOQ                      ( m_useRDOQ     );
    630582  m_cTEncTop.setUseRDOQTS                    ( m_useRDOQTS   );
    631 #if L0232_RD_PENALTY
    632583  m_cTEncTop.setRDpenalty                 ( m_rdPenalty );
    633 #endif
    634584  m_cTEncTop.setQuadtreeTULog2MaxSize        ( m_uiQuadtreeTULog2MaxSize );
    635585  m_cTEncTop.setQuadtreeTULog2MinSize        ( m_uiQuadtreeTULog2MinSize );
     
    698648  m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
    699649  m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled );
    700 #if J0149_TONE_MAPPING_SEI
    701650  m_cTEncTop.setToneMappingInfoSEIEnabled                 ( m_toneMappingInfoSEIEnabled );
    702651  m_cTEncTop.setTMISEIToneMapId                           ( m_toneMapId );
     
    724673  m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue      ( m_nominalWhiteLevelLumaCodeValue );
    725674  m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue     ( m_extendedWhiteLevelLumaCodeValue );
    726 #endif
    727675  m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
    728676  m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType );
     
    737685  m_cTEncTop.setLayersPresentSEIEnabled( m_layersPresentSEIEnabled );
    738686#endif
    739 #if L0208_SOP_DESCRIPTION_SEI
    740687  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    741 #endif
    742 #if K0180_SCALABLE_NESTING_SEI
    743688  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
    744 #endif
    745689  m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    746690  m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    811755  m_cTEncTop.setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal );
    812756  m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical );
    813 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    814   TComBitRatePicRateInfo *bitRatePicRateInfo = m_cTEncTop.getVPS()->getBitratePicrateInfo();
    815   // The number of bit rate/pic rate have to equal to number of sub-layers.
    816   if(m_bitRatePicRateMaxTLayers)
    817   {
    818     assert(m_bitRatePicRateMaxTLayers == m_cTEncTop.getVPS()->getMaxTLayers());
    819   }
    820   for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)
    821   {
    822     bitRatePicRateInfo->setBitRateInfoPresentFlag( i, m_bitRateInfoPresentFlag[i] );
    823     if( bitRatePicRateInfo->getBitRateInfoPresentFlag(i) )
    824     {
    825       bitRatePicRateInfo->setAvgBitRate(i, m_avgBitRate[i]);
    826       bitRatePicRateInfo->setMaxBitRate(i, m_maxBitRate[i]);
    827     }
    828   }
    829   for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)
    830   {
    831     bitRatePicRateInfo->setPicRateInfoPresentFlag( i, m_picRateInfoPresentFlag[i] );
    832     if( bitRatePicRateInfo->getPicRateInfoPresentFlag(i) )
    833     {
    834       bitRatePicRateInfo->setAvgPicRate     (i, m_avgPicRate[i]);
    835       bitRatePicRateInfo->setConstantPicRateIdc(i, m_constantPicRateIdc[i]);
    836     }
    837   }
    838 #endif
    839757}
    840758#endif
  • branches/SHM-2.1-dev/source/App/TAppEncoder/encmain.cpp

    r191 r302  
    5757  // print information
    5858  fprintf( stdout, "\n" );
     59#if SVC_EXTENSION
    5960  fprintf( stdout, "SHM software: Encoder Version [%s]", NV_VERSION );
     61#else
     62  fprintf( stdout, "HM software: Encoder Version [%s]", NV_VERSION );
     63#endif
    6064  fprintf( stdout, NVM_ONOS );
    6165  fprintf( stdout, NVM_COMPILEDBY );
Note: See TracChangeset for help on using the changeset viewer.