Changeset 1402 in 3DVCSoftware for branches/HTM-16.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
- Timestamp:
- 26 May 2016, 15:03:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1401 r1402 239 239 in>>entry.m_POC; 240 240 in>>entry.m_QPOffset; 241 #if W0038_CQP_ADJ 242 in>>entry.m_CbQPoffset; 243 in>>entry.m_CrQPoffset; 244 #endif 241 245 in>>entry.m_QPFactor; 242 246 in>>entry.m_tcOffsetDiv2; … … 769 773 const Int defaultPrimaryCodes[6] = { 0,50000, 0,0, 50000,0 }; 770 774 const Int defaultWhitePointCode[2] = { 16667, 16667 }; 771 SMultiValueInput<Int> cfg_DisplayPrimariesCode (0, 50000, 3, 3, defaultPrimaryCodes, sizeof(defaultPrimaryCodes )/sizeof(Int));775 SMultiValueInput<Int> cfg_DisplayPrimariesCode (0, 50000, 6, 6, defaultPrimaryCodes, sizeof(defaultPrimaryCodes )/sizeof(Int)); 772 776 SMultiValueInput<Int> cfg_DisplayWhitePointCode (0, 50000, 2, 2, defaultWhitePointCode, sizeof(defaultWhitePointCode)/sizeof(Int)); 773 777 … … 877 881 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 878 882 ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") 883 ("TemporalSubsampleRatio,-ts", m_temporalSubsampleRatio, 1u, "Temporal sub-sample ratio when reading input YUV") 879 884 ("FramesToBeEncoded,f", m_framesToBeEncoded, 0, "Number of frames to be encoded (default=all)") 880 885 ("ClipInputVideoToRec709Range", m_bClipInputVideoToRec709Range, false, "If true then clip input video to the Rec. 709 Range on loading when InternalBitDepth is less than MSBExtendedBitDepth") … … 950 955 951 956 ("HadamardME", m_bUseHADME, true, "Hadamard ME for fractional-pel") 952 ("ASR", m_bUseASR, false, "Adaptive motion search range") 957 ("ASR", m_bUseASR, false, "Adaptive motion search range"); 958 opts.addOptions() 953 959 954 960 // Mode decision parameters … … 978 984 ("CrQpOffset,-crqpofs", m_crQpOffset, 0, "Chroma Cr QP Offset") 979 985 986 #if W0038_CQP_ADJ 987 ("SliceChromaQPOffsetPeriodicity", m_sliceChromaQpOffsetPeriodicity, 0u, "Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.") 988 ("SliceCbQpOffsetIntraOrPeriodic", m_sliceChromaQpOffsetIntraOrPeriodic[0], 0, "Chroma Cb QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.") 989 ("SliceCrQpOffsetIntraOrPeriodic", m_sliceChromaQpOffsetIntraOrPeriodic[1], 0, "Chroma Cr QP Offset at slice level for I slice or for periodic inter slices as defined by SliceChromaQPOffsetPeriodicity. Replaces offset in the GOP table.") 990 #endif 980 991 #if ADAPTIVE_QP_SELECTION 981 992 ("AdaptiveQpSelection,-aqps", m_bUseAdaptQpSelect, false, "AdaptiveQpSelection") … … 1001 1012 ("LoopFilterBetaOffset_div2", m_loopFilterBetaOffsetDiv2, 0) 1002 1013 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0) 1014 #if W0038_DB_OPT 1015 ("DeblockingFilterMetric", m_deblockingFilterMetric, 0) 1016 #else 1003 1017 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false) 1004 1018 #endif 1005 1019 // Coding tools 1006 1020 ("AMP", m_enableAMP, true, "Enable asymmetric motion partitions") … … 1028 1042 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 1029 1043 ("SAOLcuBoundary", m_saoCtuBoundary, false, "0: right/bottom CTU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas") 1044 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 1045 ("SAOResetEncoderStateAfterIRAP", m_saoResetEncoderStateAfterIRAP, false, "When true, resets the encoder's SAO state after an IRAP (POC order). Disabled by default.") 1046 #endif 1030 1047 ("SliceMode", tmpSliceMode, Int(NO_SLICES), "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1031 1048 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" … … 1138 1155 ("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case") 1139 1156 ("StrongIntraSmoothing,-sis", m_useStrongIntraSmoothing, true, "Enable strong intra smoothing for 32x32 blocks") 1140 ("SEIActiveParameterSets", m_activeParameterSetsSEIEnabled, 0, "Enable generation of active parameter sets SEI messages") 1157 ("SEIActiveParameterSets", m_activeParameterSetsSEIEnabled, 0, "Enable generation of active parameter sets SEI messages"); 1158 opts.addOptions() 1141 1159 ("VuiParametersPresent,-vui", m_vuiParametersPresentFlag, false, "Enable generation of vui_parameters()") 1142 1160 ("AspectRatioInfoPresent", m_aspectRatioInfoPresentFlag, false, "Signals whether aspect_ratio_idc is present") … … 1171 1189 ("MaxBitsPerMinCuDenom", m_maxBitsPerMinCuDenom, 1, "Indicates an upper bound for the number of bits of coding_unit() data") 1172 1190 ("Log2MaxMvLengthHorizontal", m_log2MaxMvLengthHorizontal, 15, "Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units") 1173 ("Log2MaxMvLengthVertical", m_log2MaxMvLengthVertical, 15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units") 1191 ("Log2MaxMvLengthVertical", m_log2MaxMvLengthVertical, 15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units"); 1192 opts.addOptions() 1174 1193 ("SEIColourRemappingInfoFileRoot,-cri", m_colourRemapSEIFileRoot, string(""), "Colour Remapping Information SEI parameters root file name (wo num ext)") 1175 1194 ("SEIRecoveryPoint", m_recoveryPointSEIEnabled, false, "Control generation of recovery point SEI messages") … … 1277 1296 ("SEIMasteringDisplayPrimaries", cfg_DisplayPrimariesCode, cfg_DisplayPrimariesCode, "Mastering display primaries for all three colour planes in CIE xy coordinates in increments of 1/50000 (results in the ranges 0 to 50000 inclusive)") 1278 1297 ("SEIMasteringDisplayWhitePoint", cfg_DisplayWhitePointCode, cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)") 1298 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 1299 ("SEIPreferredTransferCharacterisics", m_preferredTransferCharacteristics, -1, "Value for the preferred_transfer_characteristics field of the Alternative transfer characteristics SEI which will override the corresponding entry in the VUI. If negative, do not produce the respective SEI message") 1300 #endif 1279 1301 #if NH_MV 1280 1302 ("SeiCfgFileName_%d", m_seiCfgFileNames, (TChar *) 0 ,MAX_NUM_SEIS , "SEI cfg file name %d") … … 1416 1438 * Set any derived parameters 1417 1439 */ 1440 1441 m_framesToBeEncoded = ( m_framesToBeEncoded + m_temporalSubsampleRatio - 1 ) / m_temporalSubsampleRatio; 1418 1442 m_adIntraLambdaModifier = cfg_adIntraLambdaModifier.values; 1419 1443 if(m_isField) … … 2259 2283 xConfirmPara( m_InputChromaFormatIDC >= NUM_CHROMA_FORMAT, "InputChromaFormatIDC must be either 400, 420, 422 or 444" ); 2260 2284 xConfirmPara( m_iFrameRate <= 0, "Frame rate must be more than 1" ); 2285 xConfirmPara( m_temporalSubsampleRatio < 1, "Temporal subsample rate must be no less than 1" ); 2261 2286 xConfirmPara( m_framesToBeEncoded <= 0, "Total Number Of Frames encoded must be more than 0" ); 2262 2287 #if NH_MV … … 2507 2532 { 2508 2533 xConfirmPara( m_iQP[layer] < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP[layer] > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 2509 xConfirmPara( m_ DeblockingFilterMetric&& (m_bLoopFilterDisable[layer] || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0");2534 xConfirmPara( m_deblockingFilterMetric!=0 && (m_bLoopFilterDisable[layer] || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0"); 2510 2535 } 2511 2536 #else 2512 2537 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 2538 #if W0038_DB_OPT 2539 xConfirmPara( m_deblockingFilterMetric!=0 && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is non-zero then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0"); 2540 #else 2513 2541 xConfirmPara( m_DeblockingFilterMetric && (m_bLoopFilterDisable || m_loopFilterOffsetInPPS), "If DeblockingFilterMetric is true then both LoopFilterDisable and LoopFilterOffsetInPPS must be 0"); 2542 #endif 2514 2543 #endif 2515 2544 … … 2537 2566 { 2538 2567 xConfirmPara( m_iIntraPeriod[i] > 0 && m_iIntraPeriod[i] <= m_iGOPSize , "Intra period must be larger than GOP size for periodic IDR pictures"); 2568 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 2569 if (m_saoResetEncoderStateAfterIRAP) 2570 { 2571 xConfirmPara( m_iIntraPeriod[i] > 0 && m_iIntraPeriod[i] <= m_iGOPSize , "Intra period must be larger than GOP size when SAOResetEncoderStateAfterIRAP is enabled"); 2572 } 2573 #endif 2574 2539 2575 } 2540 2576 #else 2541 xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize , "Intra period must be larger than GOP size for periodic IDR pictures"); 2577 #if OPTIONAL_RESET_SAO_ENCODING_AFTER_IRAP 2578 if (m_saoResetEncoderStateAfterIRAP) 2579 { 2580 xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize , "Intra period must be larger than GOP size when SAOResetEncoderStateAfterIRAP is enabled"); 2581 } 2582 #endif 2583 2584 xConfirmPara( m_iIntraPeriod > 0 && m_iIntraPeriod <= m_iGOPSize , "Intra period must be larger than GOP size for periodic IDR pictures"); 2542 2585 #endif 2543 2586 } … … 2876 2919 } 2877 2920 } 2921 2922 #if W0038_CQP_ADJ 2923 for(Int i=0; i<m_iGOPSize; i++) 2924 { 2925 xConfirmPara( abs(m_GOPList[i].m_CbQPoffset ) > 12, "Cb QP Offset for one of the GOP entries exceeds supported range (-12 to 12)" ); 2926 xConfirmPara( abs(m_GOPList[i].m_CbQPoffset + m_cbQpOffset) > 12, "Cb QP Offset for one of the GOP entries, when combined with the PPS Cb offset, exceeds supported range (-12 to 12)" ); 2927 xConfirmPara( abs(m_GOPList[i].m_CrQPoffset ) > 12, "Cr QP Offset for one of the GOP entries exceeds supported range (-12 to 12)" ); 2928 xConfirmPara( abs(m_GOPList[i].m_CrQPoffset + m_crQpOffset) > 12, "Cr QP Offset for one of the GOP entries, when combined with the PPS Cr offset, exceeds supported range (-12 to 12)" ); 2929 } 2930 xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[0] > 12), "Intra/periodic Cb QP Offset exceeds supported range (-12 to 12)" ); 2931 xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[0] + m_cbQpOffset > 12), "Intra/periodic Cb QP Offset, when combined with the PPS Cb offset, exceeds supported range (-12 to 12)" ); 2932 xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[1] > 12), "Intra/periodic Cr QP Offset exceeds supported range (-12 to 12)" ); 2933 xConfirmPara( abs(m_sliceChromaQpOffsetIntraOrPeriodic[1] + m_crQpOffset > 12), "Intra/periodic Cr QP Offset, when combined with the PPS Cr offset, exceeds supported range (-12 to 12)" ); 2934 #endif 2878 2935 2879 2936 m_extraRPSs=0; … … 3342 3399 } 3343 3400 3401 #if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI 3402 xConfirmPara(m_preferredTransferCharacteristics > 255, "transfer_characteristics_idc should not be greater than 255."); 3403 #endif 3404 3344 3405 #undef xConfirmPara 3345 3406 if (check_failed) … … 3408 3469 #endif 3409 3470 3410 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate);3411 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate);3471 printf("Real Format : %dx%d %gHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, (Double)m_iFrameRate/m_temporalSubsampleRatio ); 3472 printf("Internal Format : %dx%d %gHz\n", m_iSourceWidth, m_iSourceHeight, (Double)m_iFrameRate/m_temporalSubsampleRatio ); 3412 3473 printf("Sequence PSNR output : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") ); 3413 3474 printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") );
Note: See TracChangeset for help on using the changeset viewer.