Changeset 294 in 3DVCSoftware for branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
- Timestamp:
- 19 Feb 2013, 20:33:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r292 r294 233 233 ("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width") 234 234 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height") 235 #if PIC_CROPPING236 235 ("CroppingMode", m_croppingMode, 0, "Cropping mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 237 236 ("CropLeft", m_cropLeft, 0, "Left cropping/padding for cropping mode 3") … … 241 240 ("HorizontalPadding,-pdx", m_aiPad[0], 0, "horizontal source padding for cropping mode 2") 242 241 ("VerticalPadding,-pdy", m_aiPad[1], 0, "vertical source padding for cropping mode 2") 243 #endif244 242 ("InputBitDepth", m_uiInputBitDepth, 8u, "bit-depth of input file") 245 243 ("BitDepth", m_uiInputBitDepth, 8u, "deprecated alias of InputBitDepth") 246 244 ("OutputBitDepth", m_uiOutputBitDepth, 0u, "bit-depth of output file") 247 245 ("InternalBitDepth", m_uiInternalBitDepth, 0u, "Internal bit-depth (BitDepth+BitIncrement)") 248 #if !PIC_CROPPING249 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "horizontal source padding size")250 ("VerticalPadding,-pdy", m_aiPad[1], 0, "vertical source padding size")251 ("PAD", m_bUsePAD, false, "automatic source padding of multiple of 16" )252 #endif253 246 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 254 247 ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") … … 279 272 ("DecodingRefreshType,-dr",m_iDecodingRefreshType, 0, "intra refresh, (0:none 1:CRA 2:IDR)") 280 273 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 281 #if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER282 ("MaxNumberOfReorderPictures", m_numReorderFrames, -1, "Max. number of reorder pictures: -1: encoder determines value, >=0: set explicitly")283 ("MaxNumberOfReferencePictures", m_maxNumberOfReferencePictures, 6, "Max. number of reference pictures")284 #endif285 274 ("ListCombination,-lc", m_bUseLComb, true, "combined reference list flag for uni-prediction in B-slices") 286 275 ("LCModification", m_bLCMod, false, "enables signalling of combined reference list derivation") … … 321 310 ("TemporalLayerQPOffset_L3,-tq3", m_aiTLayerQPOffset[3], MAX_QP + 1, "QP offset of temporal layer 3") 322 311 323 #if !H0566_TLA324 ("TLayeringBasedOnCodingStruct,-tl", m_bTLayering, false, "Temporal ID is set based on the hierarchical coding structure")325 326 ("TLayerSwitchingFlag_L0,-ts0", m_abTLayerSwitchingFlag[0], false, "Switching flag for temporal layer 0")327 ("TLayerSwitchingFlag_L1,-ts1", m_abTLayerSwitchingFlag[1], false, "Switching flag for temporal layer 1")328 ("TLayerSwitchingFlag_L2,-ts2", m_abTLayerSwitchingFlag[2], false, "Switching flag for temporal layer 2")329 ("TLayerSwitchingFlag_L3,-ts3", m_abTLayerSwitchingFlag[3], false, "Switching flag for temporal layer 3")330 #endif331 312 332 313 /* Entropy coding parameters */ … … 349 330 ("IVSEnable", m_bUseIVS , true , "Use inter-view vector scaling" ) 350 331 #endif 351 #if DBL_CONTROL352 332 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, true) 353 #endif354 333 355 334 /* Camera Paremetes */ … … 412 391 ("ALF", m_abUseALF, std::vector<Bool>(1,true), "Enables ALF") 413 392 ("SAO", m_abUseSAO, std::vector<Bool>(1, true), "SAO") 414 #if SAO_UNIT_INTERLEAVING415 393 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "2048: default") 416 394 ("SAOInterleaving", m_saoInterleavingFlag, false, "0: SAO Picture Mode, 1: SAO Interleaving ") 417 #endif418 395 419 396 ("ALFEncodePassReduction", m_iALFEncodePassReduction, 0, "0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding") 420 397 421 398 ("ALFMaxNumFilter,-ALFMNF", m_iALFMaxNumberFilters, 16, "16: No Constrained, 1-15: Constrained max number of filter") 422 #if LCU_SYNTAX_ALF423 399 ("ALFParamInSlice", m_bALFParamInSlice, false, "ALF parameters in 0: APS, 1: slice header") 424 400 ("ALFPicBasedEncode", m_bALFPicBasedEncode, true, "ALF picture-based encoding 0: false, 1: true") 425 #endif426 401 427 402 ("SliceMode", m_iSliceMode, 0, "0: Disable all Recon slice limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes") … … 446 421 ("TileInfoPresentFlag", m_iColumnRowInfoPresent, 1, "0: tiles parameters are NOT present in the PPS. 1: tiles parameters are present in the PPS") 447 422 ("UniformSpacingIdc", m_iUniformSpacingIdr, 0, "Indicates if the column and row boundaries are distributed uniformly") 448 #if !REMOVE_TILE_DEPENDENCE449 ("TileBoundaryIndependenceIdc", m_iTileBoundaryIndependenceIdr, 1, "Indicates if the column and row boundaries break the prediction")450 #endif451 423 ("NumTileColumnsMinus1", m_iNumColumnsMinus1, 0, "Number of columns in a picture minus 1") 452 424 ("ColumnWidthArray", cfg_ColumnWidth, string(""), "Array containing ColumnWidth values in units of LCU") … … 463 435 ("ScalingList", m_useScalingListId, 0, "0: no scaling list, 1: default scaling lists, 2: scaling lists specified in ScalingListFile") 464 436 ("ScalingListFile", cfg_ScalingListFile, string(""), "Scaling list file name") 465 #if MULTIBITS_DATA_HIDING466 437 ("SignHideFlag,-SBH", m_signHideFlag, 1) 467 438 ("SignHideThreshold,-TSIG", m_signHidingThreshold, 4) 468 #endif469 439 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 470 440 ("DMM", m_bUseDMM, false, "depth model modes flag") … … 484 454 ("FEN", m_bUseFastEnc, false, "fast encoder setting") 485 455 ("ECU", m_bUseEarlyCU, false, "Early CU setting") 486 #if FAST_DECISION_FOR_MRG_RD_COST487 456 ("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost") 488 #endif489 457 ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting") 490 458 #if HHI_INTERVIEW_SKIP … … 624 592 } 625 593 626 #if PIC_CROPPING627 594 switch (m_croppingMode) 628 595 { … … 674 641 } 675 642 } 676 #else677 678 // compute source padding size679 if ( m_bUsePAD )680 {681 if ( m_iSourceWidth%MAX_PAD_SIZE )682 {683 m_aiPad[0] = (m_iSourceWidth/MAX_PAD_SIZE+1)*MAX_PAD_SIZE - m_iSourceWidth;684 }685 686 if ( m_iSourceHeight%MAX_PAD_SIZE )687 {688 m_aiPad[1] = (m_iSourceHeight/MAX_PAD_SIZE+1)*MAX_PAD_SIZE - m_iSourceHeight;689 }690 }691 m_iSourceWidth += m_aiPad[0];692 m_iSourceHeight += m_aiPad[1];693 #endif694 643 695 644 // allocate slice-based dQP values … … 897 846 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 898 847 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" ); 899 #if H0736_AVC_STYLE_QP_RANGE900 848 xConfirmPara( m_aiQP[0] < -6 * ((Int)m_uiInternalBitDepth - 8) || m_aiQP[0] > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 901 849 if ( m_aiQP.size() >= 2 ) … … 903 851 xConfirmPara( m_aiQP[1] < -6 * ((Int)m_uiInternalBitDepth - 8) || m_aiQP[1] > 51, "QP depth exceeds supported range (-QpBDOffsety to 51)" ); 904 852 } 905 #else906 xConfirmPara( m_aiQP[0] < 0 || m_aiQP[0] > 51, "QP exceeds supported range (0 to 51)" );907 if ( m_aiQP.size() >= 2 )908 {909 xConfirmPara( m_aiQP[1] < 0 || m_aiQP[1] > 51, "QP Depth exceeds supported range (0 to 51)" );910 }911 #endif912 853 xConfirmPara( m_iALFEncodePassReduction < 0 || m_iALFEncodePassReduction > 2, "ALFEncodePassReduction must be equal to 0, 1 or 2"); 913 #if LCU_SYNTAX_ALF914 854 xConfirmPara( m_iALFMaxNumberFilters < 1, "ALFMaxNumFilter should be larger than 1"); 915 #else916 xConfirmPara( m_iALFMaxNumberFilters < 1 || m_iALFMaxNumberFilters > 16, "ALFMaxNumFilter exceeds supported range (1 to 16)");917 #endif918 855 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -13 || m_loopFilterBetaOffsetDiv2 > 13, "Loop Filter Beta Offset div. 2 exceeds supported range (-13 to 13)"); 919 856 xConfirmPara( m_loopFilterTcOffsetDiv2 < -13 || m_loopFilterTcOffsetDiv2 > 13, "Loop Filter Tc Offset div. 2 exceeds supported range (-13 to 13)"); … … 941 878 xConfirmPara( m_uiMaxCUWidth < 16, "Maximum partition width size should be larger than or equal to 16"); 942 879 xConfirmPara( m_uiMaxCUHeight < 16, "Maximum partition height size should be larger than or equal to 16"); 943 #if PIC_CROPPING944 880 xConfirmPara( (m_iSourceWidth % (m_uiMaxCUWidth >> (m_uiMaxCUDepth-1)))!=0, "Resulting coded frame width must be a multiple of the minimum CU size"); 945 881 xConfirmPara( (m_iSourceHeight % (m_uiMaxCUHeight >> (m_uiMaxCUDepth-1)))!=0, "Resulting coded frame height must be a multiple of the minimum CU size"); 946 #else947 xConfirmPara( (m_iSourceWidth % (m_uiMaxCUWidth >> (m_uiMaxCUDepth-1)))!=0, "Frame width should be multiple of minimum CU size");948 xConfirmPara( (m_iSourceHeight % (m_uiMaxCUHeight >> (m_uiMaxCUDepth-1)))!=0, "Frame height should be multiple of minimum CU size");949 #endif950 882 951 883 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater."); … … 1005 937 } 1006 938 #if ADAPTIVE_QP_SELECTION 1007 #if H0736_AVC_STYLE_QP_RANGE1008 939 xConfirmPara( m_bUseAdaptQpSelect == true && m_aiQP[0] < 0, "AdaptiveQpSelection must be disabled when QP < 0."); 1009 940 xConfirmPara( m_bUseAdaptQpSelect == true && m_aiQP[1] < 0, "AdaptiveQpSelection must be disabled when QP < 0."); 1010 941 xConfirmPara( m_bUseAdaptQpSelect == true && (m_iChromaQpOffset !=0 || m_iChromaQpOffset2nd != 0 ), "AdaptiveQpSelection must be disabled when ChromaQpOffset is not equal to 0."); 1011 #endif1012 942 #endif 1013 943 … … 1020 950 } 1021 951 1022 #if FIXED_NUMBER_OF_TILES_SLICE_MODE1023 952 xConfirmPara( m_iSliceMode < 0 || m_iSliceMode > 3, "SliceMode exceeds supported range (0 to 3)" ); 1024 #endif1025 953 if (m_iSliceMode!=0) 1026 954 { 1027 955 xConfirmPara( m_iSliceArgument < 1 , "SliceArgument should be larger than or equal to 1" ); 1028 956 } 1029 #if FIXED_NUMBER_OF_TILES_SLICE_MODE1030 957 if (m_iSliceMode==3) 1031 958 { 1032 959 xConfirmPara( m_iSliceGranularity > 0 , "When SliceMode == 3 is chosen, the SliceGranularity must be 0" ); 1033 960 } 1034 #endif1035 961 xConfirmPara( m_iEntropySliceMode < 0 || m_iEntropySliceMode > 2, "EntropySliceMode exceeds supported range (0 to 2)" ); 1036 962 if (m_iEntropySliceMode!=0) … … 1042 968 xConfirmPara( m_iSliceGranularity > m_iMaxCuDQPDepth, "SliceGranularity must be smaller smaller than or equal to maximum dqp depth" ); 1043 969 1044 #if NO_COMBINED_PARALLEL1045 970 bool tileFlag = (m_iNumColumnsMinus1 > 0 || m_iNumRowsMinus1 > 0 ); 1046 971 xConfirmPara( tileFlag && m_iEntropySliceMode, "Tile and Entropy Slice can not be applied together"); 1047 972 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together"); 1048 973 xConfirmPara( m_iWaveFrontSynchro && m_iEntropySliceMode, "Wavefront and Entropy Slice can not be applied together"); 1049 #endif1050 974 1051 975 // max CU width and height should be power of 2 … … 1239 1163 for( Int i = 0; i < MAX_GOP; i++ ) { isOK[i] = false; } 1240 1164 Int numOK = 0; 1241 #if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1242 Int numReorderFramesRequired=0;1243 m_maxNumberOfReferencePictures=0;1244 Int lastDisp = -1;1245 #endif1246 1165 m_extraRPSs[viewId] = 0; 1247 1166 //start looping through frames in coding order until we can verify that the GOP structure is correct. … … 1427 1346 } 1428 1347 } 1429 #if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1430 if(m_maxNumberOfReferencePictures<numRefs)1431 {1432 m_maxNumberOfReferencePictures=numRefs;1433 }1434 #endif1435 1348 refList[numRefs] = curPOC; 1436 1349 numRefs++; 1437 #if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1438 Int nonDisplayed=0;1439 for(Int i=0; i<numRefs; i++)1440 {1441 if(refList[i]==lastDisp+1)1442 {1443 lastDisp=refList[i];1444 i=0;1445 }1446 }1447 for(Int i=0; i<numRefs; i++)1448 {1449 if(refList[i]>lastDisp)1450 {1451 nonDisplayed++;1452 }1453 }1454 if(nonDisplayed>numReorderFramesRequired)1455 {1456 numReorderFramesRequired=nonDisplayed;1457 }1458 #endif1459 1350 } 1460 1351 checkGOP++; 1461 1352 } 1462 #if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1463 if (m_numReorderFrames == -1)1464 {1465 m_numReorderFrames = numReorderFramesRequired;1466 }1467 #endif1468 1353 xConfirmPara( errorGOP, "Invalid GOP structure given" ); 1469 #if H0566_TLA1470 1354 m_maxTempLayer[viewId] = 1; 1471 #endif1472 1355 for( Int i = 0; i < m_iGOPSize; i++ ) 1473 1356 { 1474 #if H0566_TLA1475 1357 if( m_GOPListsMvc[viewId][i].m_temporalId >= m_maxTempLayer[viewId] ) 1476 1358 { 1477 1359 m_maxTempLayer[viewId] = m_GOPListsMvc[viewId][i].m_temporalId + 1; 1478 1360 } 1479 #endif1480 1361 xConfirmPara( m_GOPListsMvc[viewId][i].m_sliceType != 'B' && m_GOPListsMvc[viewId][i].m_sliceType != 'P', "Slice type must be equal to B or P" ); 1481 1362 } 1482 1363 1483 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1484 1364 for( Int i = 0; i < MAX_TLAYER; i++ ) 1485 1365 { … … 1538 1418 m_maxDecPicBuffering[viewId][MAX_TLAYER-1] = m_numReorderPics[viewId][MAX_TLAYER-1]; 1539 1419 } 1540 #endif 1541 1542 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER 1420 1543 1421 xConfirmPara( m_bUseLComb == false && m_numReorderPics[viewId][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. 1544 #else1545 xConfirmPara( m_bUseLComb==false && m_numReorderFrames!=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.1546 xConfirmPara( m_numReorderFrames < numReorderFramesRequired, "For the used GOP the encoder requires more pictures for reordering than specified in MaxNumberOfReorderPictures" );1547 #endif1548 1422 } 1549 1423 } … … 1655 1529 } 1656 1530 } 1657 #if PIC_CROPPING1658 1531 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_cropLeft - m_cropRight, m_iSourceHeight - m_cropTop - m_cropBottom, m_iFrameRate ); 1659 #else1660 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_aiPad[0], m_iSourceHeight-m_aiPad[1], m_iFrameRate );1661 #endif1662 1532 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 1663 1533 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_iFrameToBeEncoded-1, m_iFrameToBeEncoded ); … … 1727 1597 1728 1598 printf("TOOL CFG General: "); 1729 #if LCU_SYNTAX_ALF1730 1599 printf("ALFMNF:%d ", m_iALFMaxNumberFilters); 1731 1600 printf("ALFInSlice:%d ", m_bALFParamInSlice); 1732 1601 printf("ALFPicEnc:%d ", m_bALFPicBasedEncode); 1733 #endif1734 1602 printf("IBD:%d ", !!g_uiBitIncrement); 1735 1603 printf("HAD:%d ", m_bUseHADME ); … … 1737 1605 printf("SQP:%d ", m_uiDeltaQpRD ); 1738 1606 printf("ASR:%d ", m_bUseASR ); 1739 #if !PIC_CROPPING1740 printf("PAD:%d ", m_bUsePAD );1741 #endif1742 1607 printf("LComb:%d ", m_bUseLComb ); 1743 1608 printf("LCMod:%d ", m_bLCMod ); 1744 1609 printf("FEN:%d ", m_bUseFastEnc ); 1745 1610 printf("ECU:%d ", m_bUseEarlyCU ); 1746 #if FAST_DECISION_FOR_MRG_RD_COST1747 1611 printf("FDM:%d ", m_useFastDecisionForMerge ); 1748 #endif1749 1612 printf("CFM:%d ", m_bUseCbfFastMode ); 1750 1613 printf("RQT:%d ", 1 ); … … 1761 1624 } 1762 1625 printf("CIP:%d ", m_bUseConstrainedIntraPred); 1763 #if BURST_IPCM1764 1626 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 1765 #else1766 printf("PCM:%d ", ((1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);1767 #endif1768 #if SAO_UNIT_INTERLEAVING1769 1627 printf("SAOInterleaving:%d ", (m_saoInterleavingFlag)?(1):(0)); 1770 #endif1771 1628 #if LOSSLESS_CODING 1772 1629 printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 ); … … 1774 1631 printf("WPP:%d ", (Int)m_bUseWeightPred); 1775 1632 printf("WPB:%d ", m_uiBiPredIdc); 1776 #if !REMOVE_TILE_DEPENDENCE1777 printf("TileBoundaryIndependence:%d ", m_iTileBoundaryIndependenceIdr );1778 #endif1779 1633 printf("TileLocationInSliceHdr:%d ", m_iTileLocationInSliceHeaderFlag); 1780 1634 printf("TileMarker:%d", m_iTileMarkerFlag); … … 1799 1653 #endif 1800 1654 1801 #if MULTIBITS_DATA_HIDING1802 1655 printf(" SignBitHidingFlag:%d SignBitHidingThreshold:%d", m_signHideFlag, m_signHidingThreshold); 1803 #endif1804 1656 printf("\n"); 1805 1657 printf("TOOL CFG VIDEO : ");
Note: See TracChangeset for help on using the changeset viewer.