Changeset 537 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder
- Timestamp:
- 13 Jul 2013, 15:51:26 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp
r534 r537 79 79 m_aidQP = NULL; 80 80 #endif 81 #if J0149_TONE_MAPPING_SEI82 81 m_startOfCodedInterval = NULL; 83 82 m_codedPivotValue = NULL; 84 83 m_targetPivotValue = NULL; 85 #endif86 84 } 87 85 … … 108 106 } 109 107 #endif 110 #if J0149_TONE_MAPPING_SEI111 108 if ( m_startOfCodedInterval ) 112 109 { … … 124 121 m_targetPivotValue = NULL; 125 122 } 126 #endif127 123 #if !H_MV 128 124 free(m_pchInputFile); … … 316 312 } 317 313 318 #if SIGNAL_BITRATE_PICRATE_IN_VPS319 Void readBoolString(const string inpString, const Int numEntries, Bool* &memberArray, const char *elementName);320 Void readIntString(const string inpString, const Int numEntries, Int* &memberArray, const char *elementName);321 #endif322 314 // ==================================================================================================================== 323 315 // Public member functions … … 352 344 string cfg_RowHeight; 353 345 string cfg_ScalingListFile; 354 #if J0149_TONE_MAPPING_SEI355 346 string cfg_startOfCodedInterval; 356 347 string cfg_codedPivotValue; 357 348 string cfg_targetPivotValue; 358 #endif359 #if SIGNAL_BITRATE_PICRATE_IN_VPS360 string cfg_bitRateInfoPresentFlag;361 string cfg_picRateInfoPresentFlag;362 string cfg_avgBitRate;363 string cfg_maxBitRate;364 string cfg_avgPicRate;365 string cfg_constantPicRateIdc;366 #endif367 349 po::Options opts; 368 350 opts.addOptions() … … 440 422 ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level") 441 423 442 #if L0046_CONSTRAINT_FLAGS443 424 ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive") 444 425 ("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced") 445 426 ("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") 446 427 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 447 #endif448 428 449 429 // Unit definition parameters … … 465 445 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 466 446 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 467 #if !L0034_COMBINED_LIST_CLEANUP468 ("ListCombination,-lc", m_bUseLComb, true, "Combined reference list for uni-prediction estimation in B-slices")469 #endif470 447 // motion options 471 448 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") … … 507 484 ("RDOQ", m_useRDOQ, true ) 508 485 ("RDOQTS", m_useRDOQTS, true ) 509 #if L0232_RD_PENALTY510 486 ("RDpenalty", m_rdPenalty, 0, "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disbaled 1:RD-penalty 2:maximum RD-penalty") 511 #endif512 487 // Entropy coding parameters 513 488 ("SBACRD", m_bUseSBACRD, true, "SBAC based RD estimation") … … 523 498 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 524 499 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false ) 525 #if L0386_DB_METRIC526 500 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false ) 527 #endif528 501 529 502 #if H_3D_ARP … … 598 571 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 599 572 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bitrate" ) 573 #if M0036_RC_IMPROVEMENT 574 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 575 #else 600 576 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" ) 577 #endif 601 578 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: LCU level RC; false: picture level RC" ) 602 579 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use LCU level separate R-lambda model" ) … … 650 627 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 651 628 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 652 #if J0149_TONE_MAPPING_SEI653 629 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 654 630 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") … … 681 657 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 682 658 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 683 #endif684 659 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 685 660 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" … … 702 677 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 703 678 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 704 #if L0208_SOP_DESCRIPTION_SEI705 679 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 706 #endif707 #if K0180_SCALABLE_NESTING_SEI708 680 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 709 #endif710 #if SIGNAL_BITRATE_PICRATE_IN_VPS711 ("BitRatePicRateMaxTLayers", m_bitRatePicRateMaxTLayers, 0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file")712 ("BitRateInfoPresent", cfg_bitRateInfoPresentFlag, string(""), "Control signalling of bit rate information of avg. bit rate and max. bit rate in VPS\n"713 "\t0: Do not sent bit rate info\n"714 "\tN (N > 0): Send bit rate info for N sub-layers. N should equal maxTempLayers.")715 ("PicRateInfoPresent", cfg_picRateInfoPresentFlag, string(""), "Control signalling of picture rate information of avg. bit rate and max. bit rate in VPS\n"716 "\t0: Do not sent picture rate info\n"717 "\tN (N > 0): Send picture rate info for N sub-layers. N should equal maxTempLayers.")718 ("AvgBitRate", cfg_avgBitRate, string(""), "List of avg. bit rates for the different sub-layers; include non-negative number even if corresponding flag is 0")719 ("MaxBitRate", cfg_maxBitRate, string(""), "List of max. bit rates for the different sub-layers; include non-negative number even if corresponding flag is 0")720 ("AvgPicRate", cfg_avgPicRate, string(""), "List of avg. picture rates for the different sub-layers; include non-negative number even if corresponding flag is 0")721 ("ConstantPicRateIdc", cfg_constantPicRateIdc, string(""), "List of constant picture rate IDCs; include non-negative number even if corresponding flag is 0")722 #endif723 681 #if H_3D 724 682 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 759 717 #endif //H_3D 760 718 ; 761 762 #if H_MV 719 #if H_MV 763 720 // parse coding structure 764 721 for( Int k = 0; k < MAX_NUM_LAYERS; k++ ) … … 898 855 free ( pRowHeight ); 899 856 #endif 900 #if SIGNAL_BITRATE_PICRATE_IN_VPS901 readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" );902 readIntString (cfg_avgBitRate, m_bitRatePicRateMaxTLayers, m_avgBitRate, "avg. bit rate" );903 readIntString (cfg_maxBitRate, m_bitRatePicRateMaxTLayers, m_maxBitRate, "max. bit rate" );904 readBoolString(cfg_picRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_picRateInfoPresentFlag, "bit rate info. present flag" );905 readIntString (cfg_avgPicRate, m_bitRatePicRateMaxTLayers, m_avgPicRate, "avg. pic rate" );906 readIntString (cfg_constantPicRateIdc, m_bitRatePicRateMaxTLayers, m_constantPicRateIdc, "constant pic rate Idc" );907 #endif908 857 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 909 858 … … 1071 1020 m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 1072 1021 1073 #if J0149_TONE_MAPPING_SEI1074 1022 if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag ) 1075 1023 { … … 1130 1078 } 1131 1079 } 1132 #endif1133 1080 #if H_3D 1134 1081 // set global varibles … … 1233 1180 return true; 1234 1181 } 1235 #if SIGNAL_BITRATE_PICRATE_IN_VPS1236 Void readBoolString(const string inpString, const Int numEntries, Bool* &memberArray, const char *elementName)1237 {1238 Char* inpArray = inpString.empty() ? NULL : strdup(inpString.c_str());1239 Int i = 0;1240 if(numEntries)1241 {1242 Char* tempArray = strtok(inpArray, " ,-");1243 memberArray = new Bool[numEntries];1244 while( tempArray != NULL )1245 {1246 if( i >= numEntries )1247 {1248 printf( "The number of %s defined is larger than the allowed number\n", elementName );1249 exit( EXIT_FAILURE );1250 }1251 assert( (atoi(tempArray) == 0) || (atoi(tempArray) == 1) );1252 *( memberArray + i ) = atoi(tempArray);1253 tempArray = strtok(NULL, " ,-");1254 i++;1255 }1256 if( i < numEntries )1257 {1258 printf( "Some %s are not defined\n", elementName );1259 exit( EXIT_FAILURE );1260 }1261 }1262 else1263 {1264 memberArray = NULL;1265 }1266 }1267 1268 Void readIntString(const string inpString, const Int numEntries, Int* &memberArray, const char *elementName)1269 {1270 Char* inpArray = inpString.empty() ? NULL : strdup(inpString.c_str());1271 Int i = 0;1272 if(numEntries)1273 {1274 Char* tempArray = strtok(inpArray, " ,-");1275 memberArray = new Int[numEntries];1276 while( tempArray != NULL )1277 {1278 if( i >= numEntries )1279 {1280 printf( "The number of %s defined is larger than the allowed number\n", elementName );1281 exit( EXIT_FAILURE );1282 }1283 *( memberArray + i ) = atoi(tempArray);1284 tempArray = strtok(NULL, " ,-");1285 i++;1286 }1287 if( i < numEntries )1288 {1289 printf( "Some %s are not defined\n", elementName );1290 exit( EXIT_FAILURE );1291 }1292 }1293 else1294 {1295 memberArray = NULL;1296 }1297 }1298 #endif1299 1182 // ==================================================================================================================== 1300 1183 // Private member functions … … 1312 1195 fprintf(stderr, "** decoder requires this option to be enabled. **\n"); 1313 1196 fprintf(stderr, "******************************************************************\n"); 1197 } 1198 if( m_profile==Profile::NONE ) 1199 { 1200 fprintf(stderr, "***************************************************************************\n"); 1201 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n"); 1202 fprintf(stderr, "***************************************************************************\n"); 1203 } 1204 if( m_level==Level::NONE ) 1205 { 1206 fprintf(stderr, "***************************************************************************\n"); 1207 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set! **\n"); 1208 fprintf(stderr, "***************************************************************************\n"); 1314 1209 } 1315 1210 … … 1470 1365 xConfirmPara( m_iQP < -6 * (m_internalBitDepthY - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 1471 1366 #endif 1472 xConfirmPara( m_loopFilterBetaOffsetDiv2 < - 13 || m_loopFilterBetaOffsetDiv2 > 13, "Loop Filter Beta Offset div. 2 exceeds supported range (-13 to 13)");1473 xConfirmPara( m_loopFilterTcOffsetDiv2 < - 13 || m_loopFilterTcOffsetDiv2 > 13, "Loop Filter Tc Offset div. 2 exceeds supported range (-13 to 13)");1367 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)"); 1368 xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6, "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)"); 1474 1369 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" ); 1475 1370 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); … … 1515 1410 xConfirmPara( ( 0 != m_uiUseAdvResPred ) && ( 1 != m_uiUseAdvResPred ), "UseAdvResPred must be 0 or 1." ); 1516 1411 #endif 1517 1518 1412 #if ADAPTIVE_QP_SELECTION 1519 1413 #if H_MV … … 1999 1893 { 2000 1894 m_numReorderPics[i] = 0; 2001 #if L0323_DPB2002 1895 m_maxDecPicBuffering[i] = 1; 2003 #else2004 m_maxDecPicBuffering[i] = 0;2005 #endif2006 1896 } 2007 1897 for(Int i=0; i<m_iGOPSize; i++) 2008 1898 { 2009 #if L0323_DPB2010 1899 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 2011 #else 2012 if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 2013 #endif 2014 { 2015 #if L0323_DPB 1900 { 2016 1901 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 2017 #else2018 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics;2019 #endif2020 1902 } 2021 1903 Int highestDecodingNumberWithLowerPOC = 0; … … 2048 1930 m_numReorderPics[i+1] = m_numReorderPics[i]; 2049 1931 } 2050 #if L0323_DPB2051 1932 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 2052 1933 if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1) … … 2054 1935 m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1; 2055 1936 } 2056 #else2057 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive2058 if(m_numReorderPics[i] > m_maxDecPicBuffering[i])2059 {2060 m_maxDecPicBuffering[i] = m_numReorderPics[i];2061 }2062 #endif2063 1937 // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer 2064 1938 if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i]) … … 2069 1943 2070 1944 2071 #if L0323_DPB2072 1945 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 2073 1946 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1) … … 2075 1948 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1; 2076 1949 } 2077 #else2078 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive2079 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])2080 {2081 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];2082 }2083 #endif2084 1950 2085 1951 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) … … 2156 2022 } 2157 2023 } 2158 #if !L0034_COMBINED_LIST_CLEANUP2159 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.2160 #endif2161 2024 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 2162 2025 xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" ); … … 2165 2028 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n"); 2166 2029 2167 #if J0149_TONE_MAPPING_SEI2168 2030 if (m_toneMappingInfoSEIEnabled) 2169 2031 { … … 2176 2038 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue"); 2177 2039 } 2178 #endif2179 2040 2180 2041 #if RATE_CONTROL_LAMBDA_DOMAIN … … 2208 2069 2209 2070 xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); 2210 #if L0444_FPA_TYPE2211 2071 if (m_framePackingSEIEnabled) 2212 2072 { 2213 2073 xConfirmPara(m_framePackingSEIType < 3 || m_framePackingSEIType > 5 , "SEIFramePackingType must be in rage 3 to 5"); 2214 2074 } 2215 #endif 2216 #if H_MV 2217 } 2218 } 2219 #endif 2220 2075 2076 #if H_MV 2077 } 2078 } 2079 #endif 2221 2080 #undef xConfirmPara 2222 2081 if (check_failed) … … 2356 2215 printf("RDQ:%d ", m_useRDOQ ); 2357 2216 printf("RDQTS:%d ", m_useRDOQTS ); 2358 #if L0232_RD_PENALTY2359 2217 printf("RDpenalty:%d ", m_rdPenalty ); 2360 #endif2361 2218 printf("SQP:%d ", m_uiDeltaQpRD ); 2362 2219 printf("ASR:%d ", m_bUseASR ); 2363 #if !L0034_COMBINED_LIST_CLEANUP2364 printf("LComb:%d ", m_bUseLComb );2365 #endif2366 2220 printf("FEN:%d ", m_bUseFastEnc ); 2367 2221 printf("ECU:%d ", m_bUseEarlyCU ); -
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.h
r534 r537 137 137 Level::Tier m_levelTier; 138 138 Level::Name m_level; 139 #if L0046_CONSTRAINT_FLAGS140 139 Bool m_progressiveSourceFlag; 141 140 Bool m_interlacedSourceFlag; 142 141 Bool m_nonPackedConstraintFlag; 143 142 Bool m_frameOnlyConstraintFlag; 144 #endif145 143 146 144 // coding structure … … 157 155 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 158 156 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 159 #if L0323_DPB160 157 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 161 #else 162 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of reference pictures needed for decoding 163 #endif 164 #endif 165 #if !L0034_COMBINED_LIST_CLEANUP 166 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421) 167 #endif 158 #endif 168 159 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 169 160 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping … … 246 237 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 247 238 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 248 #if L0386_DB_METRIC249 239 Bool m_DeblockingFilterMetric; ///< blockiness metric in encoder 250 #endif251 240 252 241 // coding tools (PCM) … … 262 251 Bool m_useRDOQ; ///< flag for using RD optimized quantization 263 252 Bool m_useRDOQTS; ///< flag for using RD optimized quantization for transform skip 264 #if L0232_RD_PENALTY265 253 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) 266 #endif267 254 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 268 255 Int m_iSearchRange; ///< ME search range … … 298 285 Int m_bufferingPeriodSEIEnabled; 299 286 Int m_pictureTimingSEIEnabled; 300 #if J0149_TONE_MAPPING_SEI301 287 Bool m_toneMappingInfoSEIEnabled; 302 288 Int m_toneMapId; … … 324 310 Int* m_codedPivotValue; 325 311 Int* m_targetPivotValue; 326 #endif327 312 Int m_framePackingSEIEnabled; 328 313 Int m_framePackingSEIType; … … 334 319 Int m_gradualDecodingRefreshInfoEnabled; 335 320 Int m_decodingUnitInfoSEIEnabled; 336 #if L0208_SOP_DESCRIPTION_SEI337 321 Int m_SOPDescriptionSEIEnabled; 338 #endif339 #if K0180_SCALABLE_NESTING_SEI340 322 Int m_scalableNestingSEIEnabled; 341 #endif342 323 // weighted prediction 343 324 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices … … 352 333 Bool m_RCEnableRateControl; ///< enable rate control or not 353 334 Int m_RCTargetBitrate; ///< target bitrate when rate control is enabled 335 #if M0036_RC_IMPROVEMENT 336 Int m_RCKeepHierarchicalBit; ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation 337 #else 354 338 Bool m_RCKeepHierarchicalBit; ///< whether keeping hierarchical bit allocation structure or not 339 #endif 355 340 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control 356 341 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level … … 459 444 } 460 445 461 462 446 for( ; rpcVector.size() > m_numberOfLayers; ) 463 447 { 464 448 rpcVector.pop_back( ); 465 449 } 466 467 450 } 468 451 … … 490 473 Void xPrintVectorElem( Bool elem ) { printf(" %d" , ( elem ? 1 : 0 ));}; 491 474 #endif 492 #if SIGNAL_BITRATE_PICRATE_IN_VPS493 Int m_bitRatePicRateMaxTLayers; ///< Indicates max. number of sub-layers for which bit rate is signalled.494 Bool* m_bitRateInfoPresentFlag; ///< Indicates whether bit rate information is signalled495 Bool* m_picRateInfoPresentFlag; ///< Indicates whether pic rate information is signalled496 Int* m_avgBitRate; ///< Indicates avg. bit rate information for various sub-layers497 Int* m_maxBitRate; ///< Indicates max. bit rate information for various sub-layers498 Int* m_avgPicRate; ///< Indicates avg. picture rate information for various sub-layers499 Int* m_constantPicRateIdc; ///< Indicates constant picture rate idc for various sub-layers500 #endif501 475 #if H_MV 502 476 Int getGOPSize() { return m_iGOPSize; } 503 477 #endif 504 505 478 public: 506 479 TAppEncCfg(); -
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp
r534 r537 194 194 m_cTEncTop.setProfile(m_profile); 195 195 m_cTEncTop.setLevel(m_levelTier, m_level); 196 #if L0046_CONSTRAINT_FLAGS197 196 m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag); 198 197 m_cTEncTop.setInterlacedSourceFlag(m_interlacedSourceFlag); 199 198 m_cTEncTop.setNonPackedConstraintFlag(m_nonPackedConstraintFlag); 200 199 m_cTEncTop.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); 201 #endif202 200 203 201 m_cTEncTop.setFrameRate ( m_iFrameRate ); … … 260 258 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 261 259 m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 262 #if L0386_DB_METRIC263 260 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 264 #endif265 261 266 262 //====== Motion search ======== … … 300 296 m_cTEncTop.setUseHADME ( m_bUseHADME ); 301 297 m_cTEncTop.setUseLossless ( m_useLossless ); 302 #if !L0034_COMBINED_LIST_CLEANUP303 m_cTEncTop.setUseLComb ( m_bUseLComb );304 #endif305 298 #if H_MV 306 299 m_cTEncTop.setdQPs ( m_aidQP[layer] ); … … 310 303 m_cTEncTop.setUseRDOQ ( m_useRDOQ ); 311 304 m_cTEncTop.setUseRDOQTS ( m_useRDOQTS ); 312 #if L0232_RD_PENALTY313 305 m_cTEncTop.setRDpenalty ( m_rdPenalty ); 314 #endif315 306 m_cTEncTop.setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 316 307 m_cTEncTop.setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); … … 380 371 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 381 372 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 382 #if J0149_TONE_MAPPING_SEI383 373 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 384 374 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); … … 406 396 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 407 397 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 408 #endif409 398 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 410 399 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 416 405 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 417 406 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 418 #if L0208_SOP_DESCRIPTION_SEI419 407 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 420 #endif421 #if K0180_SCALABLE_NESTING_SEI422 408 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 423 #endif424 409 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 425 410 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 490 475 m_cTEncTop.setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal ); 491 476 m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 492 #if SIGNAL_BITRATE_PICRATE_IN_VPS493 TComBitRatePicRateInfo *bitRatePicRateInfo = m_cTEncTop.getVPS()->getBitratePicrateInfo();494 // The number of bit rate/pic rate have to equal to number of sub-layers.495 if(m_bitRatePicRateMaxTLayers)496 {497 assert(m_bitRatePicRateMaxTLayers == m_cTEncTop.getVPS()->getMaxTLayers());498 }499 for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)500 {501 bitRatePicRateInfo->setBitRateInfoPresentFlag( i, m_bitRateInfoPresentFlag[i] );502 if( bitRatePicRateInfo->getBitRateInfoPresentFlag(i) )503 {504 bitRatePicRateInfo->setAvgBitRate(i, m_avgBitRate[i]);505 bitRatePicRateInfo->setMaxBitRate(i, m_maxBitRate[i]);506 }507 }508 for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)509 {510 bitRatePicRateInfo->setPicRateInfoPresentFlag( i, m_picRateInfoPresentFlag[i] );511 if( bitRatePicRateInfo->getPicRateInfoPresentFlag(i) )512 {513 bitRatePicRateInfo->setAvgPicRate (i, m_avgPicRate[i]);514 bitRatePicRateInfo->setConstantPicRateIdc(i, m_constantPicRateIdc[i]);515 }516 }517 #endif518 477 #if H_MV 519 478 }
Note: See TracChangeset for help on using the changeset viewer.