Newer
Older

Karsten Suehring
committed
("Log2MaxTbSize", m_log2MaxTbSize, 6, "Maximum transform block size in logarithm base 2 (Default: 6)")

Karsten Suehring
committed
// Coding structure paramters
("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)")
("GdrEnabled", m_gdrEnabled, false, "GDR enabled")
("GdrPocStart", m_gdrPocStart, -1, "GDR poc start")
Seungwook Hong
committed
("GdrPeriod", m_gdrPeriod, -1, "Number of frames between GDR picture to the next GDR picture")
("GdrInterval", m_gdrInterval, -1, "Number of frames from GDR picture to the recovery point picture")
("GdrNoHash", m_gdrNoHash, true, "Do not generate decode picture hash SEI messages for GDR and recovering pictures")

Karsten Suehring
committed
("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)")
("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure")
("DRAPPeriod", m_drapPeriod, 0, "DRAP period in frames (0: disable Dependent RAP indication SEI messages)")
#if JVET_U0084_EDRAP
("EDRAPPeriod", m_edrapPeriod, 0, "EDRAP period in frames (0: disable Extended Dependent RAP indication SEI messages)")
#endif
("ReWriteParamSets", m_rewriteParamSets, false, "Enable rewriting of Parameter sets before every (intra) random access point")
("IDRRefParamList", m_idrRefParamList, false, "Enable indication of reference picture list syntax elements in slice headers of IDR pictures")

Karsten Suehring
committed
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
// motion search options
("DisableIntraInInter", m_bDisableIntraPUsInInterSlices, false, "Flag to disable intra PUs in inter slices")
("FastSearch", tmpMotionEstimationSearchMethod, int(MESEARCH_DIAMOND), "0:Full search 1:Diamond 2:Selective 3:Enhanced Diamond")
("SearchRange,-sr", m_iSearchRange, 96, "Motion search range")
("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement")
("MinSearchWindow", m_minSearchWindow, 8, "Minimum motion search window size for the adaptive window ME")
("RestrictMESampling", m_bRestrictMESampling, false, "Restrict ME Sampling for selective inter motion search")
("ClipForBiPredMEEnabled", m_bClipForBiPredMeEnabled, false, "Enables clipping in the Bi-Pred ME. It is disabled to reduce encoder run-time")
("FastMEAssumingSmootherMVEnabled", m_bFastMEAssumingSmootherMVEnabled, true, "Enables fast ME assuming a smoother MV.")
("HadamardME", m_bUseHADME, true, "Hadamard ME for fractional-pel")
("ASR", m_bUseASR, false, "Adaptive motion search range");
opts.addOptions()
// Mode decision parameters
("LambdaModifier0,-LM0", m_adLambdaModifier[ 0 ], ( double )1.0, "Lambda modifier for temporal layer 0. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifier1,-LM1", m_adLambdaModifier[ 1 ], ( double )1.0, "Lambda modifier for temporal layer 1. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifier2,-LM2", m_adLambdaModifier[ 2 ], ( double )1.0, "Lambda modifier for temporal layer 2. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifier3,-LM3", m_adLambdaModifier[ 3 ], ( double )1.0, "Lambda modifier for temporal layer 3. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifier4,-LM4", m_adLambdaModifier[ 4 ], ( double )1.0, "Lambda modifier for temporal layer 4. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( double )1.0, "Lambda modifier for temporal layer 5. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( double )1.0, "Lambda modifier for temporal layer 6. If LambdaModifierI is used, this will not affect intra pictures")
("LambdaModifierI,-LMI", cfg_adIntraLambdaModifier, cfg_adIntraLambdaModifier, "Lambda modifiers for Intra pictures, comma separated, up to one the number of temporal layer. If entry for temporalLayer exists, then use it, else if some are specified, use the last, else use the standard LambdaModifiers.")
("IQPFactor,-IQF", m_dIntraQpFactor, -1.0, "Intra QP Factor for Lambda Computation. If negative, the default will scale lambda based on GOP size (unless LambdaFromQpEnable then IntraQPOffset is used instead)")
/* Quantization parameters */
#if QP_SWITCHING_FOR_PARALLEL
("QP,q", m_iQP, 30, "Qp value")
("QPIncrementFrame,-qpif", m_qpIncrementAtSourceFrame, OptionalValue<uint32_t>(), "If a source file frame number is specified, the internal QP will be incremented for all POCs associated with source frames >= frame number. If empty, do not increment.")

Karsten Suehring
committed
#else
("QP,q", m_fQP, 30.0, "Qp value, if value is float, QP is switched once during encoding")
#endif
#if X0038_LAMBDA_FROM_QP_CAPABILITY
("IntraQPOffset", m_intraQPOffset, 0, "Qp offset value for intra slice, typically determined based on GOP size")
("LambdaFromQpEnable", m_lambdaFromQPEnable, false, "Enable flag for derivation of lambda from QP")
#endif
("DeltaQpRD,-dqr", m_uiDeltaQpRD, 0u, "max dQp offset for slice")
("MaxDeltaQP,d", m_iMaxDeltaQP, 0, "max dQp offset for block")
("MaxCuDQPSubdiv,-dqd", m_cuQpDeltaSubdiv, 0, "Maximum subdiv for CU luma Qp adjustment")
Philippe de Lagrange
committed
("MaxCuChromaQpOffsetSubdiv", m_cuChromaQpOffsetSubdiv, 0, "Maximum subdiv for CU chroma Qp adjustment")
("SliceCuChromaQpOffsetEnabled", m_cuChromaQpOffsetEnabled, true, "Enable local chroma QP offsets (slice level flag)")

Karsten Suehring
committed
("FastDeltaQP", m_bFastDeltaQP, false, "Fast Delta QP Algorithm")
#if SHARP_LUMA_DELTA_QP
("LumaLevelToDeltaQPMode", lumaLevelToDeltaQPMode, 0u, "Luma based Delta QP 0(default): not used. 1: Based on CTU average, 2: Based on Max luma in CTU")
#if !WCG_EXT
("LumaLevelToDeltaQPMaxValWeight", m_lumaLevelToDeltaQPMapping.maxMethodWeight, 1.0, "Weight of block max luma val when LumaLevelToDeltaQPMode = 2")
#endif
("LumaLevelToDeltaQPMappingLuma", cfg_lumaLeveltoDQPMappingLuma, cfg_lumaLeveltoDQPMappingLuma, "Luma to Delta QP Mapping - luma thresholds")
("LumaLevelToDeltaQPMappingDQP", cfg_lumaLeveltoDQPMappingQP, cfg_lumaLeveltoDQPMappingQP, "Luma to Delta QP Mapping - DQP values")
#endif
#if JVET_V0078
("SmoothQPReductionEnable", m_smoothQPReductionEnable, false, "Enable QP reduction for smooth blocks according to: Clip3(SmoothQPReductionLimit, 0, SmoothQPReductionModelScale*baseQP+SmoothQPReductionModelOffset)")
("SmoothQPReductionThreshold", m_smoothQPReductionThreshold, 3.0, "Threshold parameter for smoothness (SmoothQPReductionThreshold * number of samples in block)")
("SmoothQPReductionModelScale", m_smoothQPReductionModelScale, -1.0, "Scale parameter of the QP reduction model")
("SmoothQPReductionModelOffset", m_smoothQPReductionModelOffset, 27.0, "Offset parameter of the QP reduction model")
("SmoothQPReductionLimit", m_smoothQPReductionLimit, -16, "Threshold parameter for controlling maximum amount of QP reduction by the QP reduction model")
("SmoothQPReductionPeriodicity", m_smoothQPReductionPeriodicity, 1, "Periodicity parameter of the QP reduction model, 1: all frames, 0: only intra pictures, 2: every second frame, etc")
#endif
("UseIdentityTableForNon420Chroma", m_useIdentityTableForNon420Chroma, true, "True: Indicates that 422/444 chroma uses identity chroma QP mapping tables; False: explicit Qp table may be specified in config")
("SameCQPTablesForAllChroma", m_chromaQpMappingTableParams.m_sameCQPTableForAllChromaFlag, true, "0: Different tables for Cb, Cr and joint Cb-Cr components, 1 (default): Same tables for all three chroma components")
Adarsh Krishnan Ramasubramonian
committed
("QpInValCb", cfg_qpInValCb, cfg_qpInValCb, "Input coordinates for the QP table for Cb component")
("QpOutValCb", cfg_qpOutValCb, cfg_qpOutValCb, "Output coordinates for the QP table for Cb component")
("QpInValCr", cfg_qpInValCr, cfg_qpInValCr, "Input coordinates for the QP table for Cr component")
("QpOutValCr", cfg_qpOutValCr, cfg_qpOutValCr, "Output coordinates for the QP table for Cr component")
("QpInValCbCr", cfg_qpInValCbCr, cfg_qpInValCbCr, "Input coordinates for the QP table for joint Cb-Cr component")
("QpOutValCbCr", cfg_qpOutValCbCr, cfg_qpOutValCbCr, "Output coordinates for the QP table for joint Cb-Cr component")

Karsten Suehring
committed
("CbQpOffset,-cbqpofs", m_cbQpOffset, 0, "Chroma Cb QP Offset")
("CrQpOffset,-crqpofs", m_crQpOffset, 0, "Chroma Cr QP Offset")

Christian Helmrich
committed
("CbQpOffsetDualTree", m_cbQpOffsetDualTree, 0, "Chroma Cb QP Offset for dual tree")
("CrQpOffsetDualTree", m_crQpOffsetDualTree, 0, "Chroma Cr QP Offset for dual tree")
("CbCrQpOffset,-cbcrqpofs", m_cbCrQpOffset, -1, "QP Offset for joint Cb-Cr mode")
("CbCrQpOffsetDualTree", m_cbCrQpOffsetDualTree, 0, "QP Offset for joint Cb-Cr mode in dual tree")

Karsten Suehring
committed
#if ER_CHROMA_QP_WCG_PPS
("WCGPPSEnable", m_wcgChromaQpControl.enabled, false, "1: Enable the WCG PPS chroma modulation scheme. 0 (default) disabled")
("WCGPPSCbQpScale", m_wcgChromaQpControl.chromaCbQpScale, 1.0, "WCG PPS Chroma Cb QP Scale")
("WCGPPSCrQpScale", m_wcgChromaQpControl.chromaCrQpScale, 1.0, "WCG PPS Chroma Cr QP Scale")
("WCGPPSChromaQpScale", m_wcgChromaQpControl.chromaQpScale, 0.0, "WCG PPS Chroma QP Scale")
("WCGPPSChromaQpOffset", m_wcgChromaQpControl.chromaQpOffset, 0.0, "WCG PPS Chroma QP Offset")
#endif
#if W0038_CQP_ADJ
("SliceChromaQPOffsetPeriodicity", m_sliceChromaQpOffsetPeriodicity, 0u, "Used in conjunction with Slice Cb/Cr QpOffsetIntraOrPeriodic. Use 0 (default) to disable periodic nature.")
("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.")
("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.")
#endif
Philippe de Lagrange
committed
("CbQpOffsetList", cfg_cbQpOffsetList, cfg_cbQpOffsetList, "Chroma Cb QP offset list for local adjustment")
("CrQpOffsetList", cfg_crQpOffsetList, cfg_crQpOffsetList, "Chroma Cb QP offset list for local adjustment")
("CbCrQpOffsetList", cfg_cbCrQpOffsetList, cfg_cbCrQpOffsetList, "Chroma joint Cb-Cr QP offset list for local adjustment")

Karsten Suehring
committed
("AdaptiveQP,-aq", m_bUseAdaptiveQP, false, "QP adaptation based on a psycho-visual model")
("MaxQPAdaptationRange,-aqr", m_iQPAdaptationRange, 6, "QP adaptation range")
#if ENABLE_QPA
("PerceptQPA,-qpa", m_bUsePerceptQPA, false, "perceptually motivated input-adaptive QP modification (default: 0 = off, ignored if -aq is set)")
("WPSNR,-wpsnr", m_bUseWPSNR, false, "output perceptually weighted peak SNR (WPSNR) instead of PSNR")
#endif
("dQPFile,m", m_dQPFileName, string(""), "dQP file name")
("RDOQ", m_useRDOQ, true)
("RDOQTS", m_useRDOQTS, true)
#if T0196_SELECTIVE_RDOQ
("SelectiveRDOQ", m_useSelectiveRDOQ, false, "Enable selective RDOQ")
#endif
("RDpenalty", m_rdPenalty, 0, "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disabled 1:RD-penalty 2:maximum RD-penalty")
// Deblocking filter parameters
("DeblockingFilterDisable", m_deblockingFilterDisable, false)
("DeblockingFilterOffsetInPPS", m_deblockingFilterOffsetInPPS, true)
("DeblockingFilterBetaOffset_div2", m_deblockingFilterBetaOffsetDiv2, 0)
("DeblockingFilterTcOffset_div2", m_deblockingFilterTcOffsetDiv2, 0)
("DeblockingFilterCbBetaOffset_div2", m_deblockingFilterCbBetaOffsetDiv2, 0)
("DeblockingFilterCbTcOffset_div2", m_deblockingFilterCbTcOffsetDiv2, 0)
("DeblockingFilterCrBetaOffset_div2", m_deblockingFilterCrBetaOffsetDiv2, 0)
("DeblockingFilterCrTcOffset_div2", m_deblockingFilterCrTcOffsetDiv2, 0)

Karsten Suehring
committed
#if W0038_DB_OPT
("DeblockingFilterMetric", m_deblockingFilterMetric, 0)
#else
("DeblockingFilterMetric", m_DeblockingFilterMetric, false)
#endif
// Coding tools
("ReconBasedCrossCPredictionEstimate", m_reconBasedCrossCPredictionEstimate, false, "When determining the alpha value for cross-component prediction, use the decoded residual rather than the pre-transform encoder-side residual")
("TransformSkip", m_useTransformSkip, false, "Intra transform skipping")
("TransformSkipFast", m_useTransformSkipFast, false, "Fast encoder search for transform skipping, winner takes it all mode.")
("TransformSkipLog2MaxSize", m_log2MaxTransformSkipBlockSize, 5U, "Specify transform-skip maximum size. Minimum 2, Maximum 5. (not valid in V1 profiles)")
("ChromaTS", m_useChromaTS, false, "Enable encoder search of chromaTS")
Alican Nalci
committed
("BDPCM", m_useBDPCM, false, "BDPCM (0:off, 1:luma and chroma)")
Santiago de Luxán Hernández
committed
("ISPFast", m_useFastISP, false, "Fast encoder search for ISP")

Karsten Suehring
committed
("ResidualRotation", m_transformSkipRotationEnabledFlag, false, "Enable rotation of transform-skipped and transquant-bypassed TUs through 180 degrees prior to entropy coding (not valid in V1 profiles)")
("SingleSignificanceMapContext", m_transformSkipContextEnabledFlag, false, "Enable, for transform-skipped and transquant-bypassed TUs, the selection of a single significance map context variable for all coefficients (not valid in V1 profiles)")
#if JVET_V0106_RRC_RICE
("ExtendedRiceRRC", m_rrcRiceExtensionEnableFlag, false, "Enable the extention of the Golomb-Rice parameter derivation for RRC")
#endif

Karsten Suehring
committed
("GolombRiceParameterAdaptation", m_persistentRiceAdaptationEnabledFlag, false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice")
("AlignCABACBeforeBypass", m_cabacBypassAlignmentEnabledFlag, false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise")
("SAO", m_bUseSAO, true, "Enable Sample Adaptive Offset")
("TestSAODisableAtPictureLevel", m_bTestSAODisableAtPictureLevel, false, "Enables the testing of disabling SAO at the picture level after having analysed all blocks")
("SaoEncodingRate", m_saoEncodingRate, 0.75, "When >0 SAO early picture termination is enabled for luma and chroma")
("SaoEncodingRateChroma", m_saoEncodingRateChroma, 0.5, "The SAO early picture termination rate to use for chroma (when m_SaoEncodingRate is >0). If <=0, use results for luma")
("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)")
("SAOLcuBoundary", m_saoCtuBoundary, false, "0: right/bottom CTU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas")
("SAOGreedyEnc", m_saoGreedyMergeEnc, false, "SAO greedy merge encoding algorithm")
("EnablePicPartitioning", m_picPartitionFlag, false, "Enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)")
("MixedLossyLossless", m_mixedLossyLossless, false, "Enable encoder to encode mixed lossy/lossless coding ")
("SliceLosslessArray", cfgSliceLosslessArray, cfgSliceLosslessArray, " Lossless slice array Last lossless flag in the list will be repeated uniformly to cover any remaining slice")
("TileColumnWidthArray", cfgTileColumnWidth, cfgTileColumnWidth, "Tile column widths in units of CTUs. Last column width in list will be repeated uniformly to cover any remaining picture width")
("TileRowHeightArray", cfgTileRowHeight, cfgTileRowHeight, "Tile row heights in units of CTUs. Last row height in list will be repeated uniformly to cover any remaining picture height")
("RasterScanSlices", m_rasterSliceFlag, false, "Indicates if using raster-scan or rectangular slices (0: rectangular, 1: raster-scan)")
("RectSlicePositions", cfgRectSlicePos, cfgRectSlicePos, "Rectangular slice positions. List containing pairs of top-left CTU RS address followed by bottom-right CTU RS address")
("RectSliceFixedWidth", m_rectSliceFixedWidth, 0, "Fixed rectangular slice width in units of tiles (0: disable this feature and use RectSlicePositions instead)")
("RectSliceFixedHeight", m_rectSliceFixedHeight, 0, "Fixed rectangular slice height in units of tiles (0: disable this feature and use RectSlicePositions instead)")
("RasterSliceSizes", cfgRasterSliceSize, cfgRasterSliceSize, "Raster-scan slice sizes in units of tiles. Last size in list will be repeated uniformly to cover any remaining tiles in the picture")
("DisableLoopFilterAcrossTiles", m_disableLFCrossTileBoundaryFlag, false, "Loop filtering applied across tile boundaries or not (0: filter across tile boundaries 1: do not filter across tile boundaries)")
("DisableLoopFilterAcrossSlices", m_disableLFCrossSliceBoundaryFlag, false, "Loop filtering applied across slice boundaries or not (0: filter across slice boundaries 1: do not filter across slice boundaries)")

Karsten Suehring
committed
("FastUDIUseMPMEnabled", m_bFastUDIUseMPMEnabled, true, "If enabled, adapt intra direction search, accounting for MPM")
("FastMEForGenBLowDelayEnabled", m_bFastMEForGenBLowDelayEnabled, true, "If enabled use a fast ME for generalised B Low Delay slices")
("UseBLambdaForNonKeyLowDelayPictures", m_bUseBLambdaForNonKeyLowDelayPictures, true, "Enables use of B-Lambda for non-key low-delay pictures")
("IntraReferenceSmoothing", m_enableIntraReferenceSmoothing, true, "0: Disable use of intra reference smoothing (not valid in V1 profiles). 1: Enable use of intra reference smoothing (same as V1)")
("WeightedPredP,-wpP", m_useWeightedPred, false, "Use weighted prediction in P slices")
("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices")
("WeightedPredMethod,-wpM", tmpWeightedPredictionMethod, int(WP_PER_PICTURE_WITH_SIMPLE_DC_COMBINED_COMPONENT), "Weighted prediction method")
("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region")

Karsten Suehring
committed
("WaveFrontSynchro", m_entropyCodingSyncEnabledFlag, false, "0: entropy coding sync disabled; 1 entropy coding sync enabled")
("EntryPointsPresent", m_entryPointPresentFlag, true, "0: entry points is not present; 1 entry points may be present in slice header")

Karsten Suehring
committed
("ScalingList", m_useScalingListId, SCALING_LIST_OFF, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile")
("ScalingListFile", m_scalingListFileName, string(""), "Scaling list file name. Use an empty string to produce help.")
Adarsh Krishnan Ramasubramonian
committed
("DisableScalingMatrixForLFNST", m_disableScalingMatrixForLfnstBlks, true, "Disable scaling matrices, when enabled, for LFNST-coded blocks")
("DisableScalingMatrixForAlternativeColourSpace", m_disableScalingMatrixForAlternativeColourSpace, false, "Disable scaling matrices when the colour space is not equal to the designated colour space of scaling matrix")
("ScalingMatrixDesignatedColourSpace", m_scalingMatrixDesignatedColourSpace, true, "Indicates if the designated colour space of scaling matrices is equal to the original colour space")
("DepQuant", m_depQuantEnabledFlag, true, "Enable dependent quantization (Default: 1)" )
("SignHideFlag,-SBH", m_signDataHidingEnabledFlag, false, "Enable sign hiding" )

Karsten Suehring
committed
("MaxNumMergeCand", m_maxNumMergeCand, 5u, "Maximum number of merge candidates")
("MaxNumAffineMergeCand", m_maxNumAffineMergeCand, 5u, "Maximum number of affine merge candidates")
("MaxNumGeoCand", m_maxNumGeoCand, 5u, "Maximum number of geometric partitioning mode candidates")
("MaxNumIBCMergeCand", m_maxNumIBCMergeCand, 6u, "Maximum number of IBC merge candidates")
/* Misc. */

Karsten Suehring
committed
("SEIDecodedPictureHash,-dph", tmpDecodedPictureHashSEIMappedType, 0, "Control generation of decode picture hash SEI messages\n"
"\t3: checksum\n"
"\t2: CRC\n"
"\t1: use MD5\n"
"\t0: disable")

Karsten Suehring
committed
("SubpicDecodedPictureHash", tmpSubpicDecodedPictureHashMappedType, 0, "Control generation of decode picture hash SEI messages for each subpicture\n"
"\t3: checksum\n"
"\t2: CRC\n"
"\t1: use MD5\n"
"\t0: disable")

Karsten Suehring
committed
("TMVPMode", m_TMVPModeId, 1, "TMVP mode 0: TMVP disable for all slices. 1: TMVP enable for all slices (default) 2: TMVP enable for certain slices only")
("SliceLevelRpl", m_sliceLevelRpl, true, "Code reference picture lists in slice headers rather than picture header.")
("SliceLevelDblk", m_sliceLevelDblk, true, "Code deblocking filter parameters in slice headers rather than picture header.")
("SliceLevelSao", m_sliceLevelSao, true, "Code SAO parameters in slice headers rather than picture header.")
("SliceLevelAlf", m_sliceLevelAlf, true, "Code ALF parameters in slice headers rather than picture header.")
("SliceLevelWeightedPrediction", m_sliceLevelWp, true, "Code weighted prediction parameters in slice headers rather than picture header.")
("SliceLevelDeltaQp", m_sliceLevelDeltaQp, true, "Code delta Qp in slice headers rather than picture header.")

Karsten Suehring
committed
("FEN", tmpFastInterSearchMode, int(FASTINTERSEARCH_DISABLED), "fast encoder setting")
("ECU", m_bUseEarlyCU, false, "Early CU setting")
("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost")
("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting")
( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" )
( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bit-rate" )
( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" )
( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: CTU level RC; false: picture level RC" )
( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use CTU level separate R-lambda model" )
( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" )
( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" )
#if U0132_TARGET_BITS_SATURATION
( "RCCpbSaturation", m_RCCpbSaturationEnabled, false, "Rate control: enable target bits saturation to avoid CPB overflow and underflow" )
( "RCCpbSize", m_RCCpbSize, 0u, "Rate control: CPB size" )
( "RCInitialCpbFullness", m_RCInitialCpbFullness, 0.9, "Rate control: initial CPB fullness" )

Karsten Suehring
committed
("CostMode", m_costMode, COST_STANDARD_LOSSY, "Use alternative cost functions: choose between 'lossy', 'sequence_level_lossless', 'lossless' (which forces QP to " MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP) ") and 'mixed_lossless_lossy' (which used QP'=" MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME) " for pre-estimates of transquant-bypass blocks).")
Christopher Hollmann
committed
("TSRCdisableLL", m_TSRCdisableLL, true, "Disable TSRC for lossless coding" )

Karsten Suehring
committed
("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case")
("HrdParametersPresent,-hrd", m_hrdParametersPresentFlag, false, "Enable generation of hrd_parameters()")
("VuiParametersPresent,-vui", m_vuiParametersPresentFlag, false, "Enable generation of vui_parameters()")

Karsten Suehring
committed
("SamePicTimingInAllOLS", m_samePicTimingInAllOLS, true, "Indicates that the same picture timing SEI message is used in all OLS")
("AspectRatioInfoPresent", m_aspectRatioInfoPresentFlag, false, "Signals whether aspect_ratio_idc is present")
("AspectRatioIdc", m_aspectRatioIdc, 0, "aspect_ratio_idc")
("SarWidth", m_sarWidth, 0, "horizontal size of the sample aspect ratio")
("SarHeight", m_sarHeight, 0, "vertical size of the sample aspect ratio")
("ColourDescriptionPresent", m_colourDescriptionPresentFlag, false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present")
("ColourPrimaries", m_colourPrimaries, 2, "Indicates chromaticity coordinates of the source primaries")
("TransferCharacteristics", m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source")
("MatrixCoefficients", m_matrixCoefficients, 2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries")
("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive")
("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced")
("NonPackedSourceConstraintFlag", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
("NonProjectedConstraintFlag", m_nonProjectedConstraintFlag, false, "Indicate that the bitstream contains projection SEI messages")
("ChromaLocInfoPresent", m_chromaLocInfoPresentFlag, false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present")
("ChromaSampleLocTypeTopField", m_chromaSampleLocTypeTopField, 0, "Specifies the location of chroma samples for top field")
("ChromaSampleLocTypeBottomField", m_chromaSampleLocTypeBottomField, 0, "Specifies the location of chroma samples for bottom field")
("ChromaSampleLocType", m_chromaSampleLocType, 0, "Specifies the location of chroma samples for progressive content")
("OverscanInfoPresent", m_overscanInfoPresentFlag, false, "Indicates whether conformant decoded pictures are suitable for display using overscan\n")
("OverscanAppropriate", m_overscanAppropriateFlag, false, "Indicates whether conformant decoded pictures are suitable for display using overscan\n")
("VideoFullRange", m_videoFullRangeFlag, false, "Indicates the black level and range of luma and chroma signals");

Karsten Suehring
committed
opts.addOptions()
("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, false, "Control generation of buffering period SEI messages")
("SEIPictureTiming", m_pictureTimingSEIEnabled, false, "Control generation of picture timing SEI messages")
("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, false, "Control generation of decoding unit information SEI message.")
("SEIScalableNesting", m_scalableNestingSEIEnabled, false, "Control generation of scalable nesting SEI messages")
("SEIFrameFieldInfo", m_frameFieldInfoSEIEnabled, false, "Control generation of frame field information SEI messages")

Karsten Suehring
committed
("SEIFramePacking", m_framePackingSEIEnabled, false, "Control generation of frame packing SEI messages")
("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n"
"\t3: side by side - frames are displayed horizontally\n"
"\t4: top bottom - frames are displayed vertically\n"
"\t5: frame alternation - one frame is alternated with the other")
("SEIFramePackingId", m_framePackingSEIId, 0, "Id of frame packing SEI message for a given session")
("SEIFramePackingQuincunx", m_framePackingSEIQuincunx, 0, "Indicate the presence of a Quincunx type video frame")
("SEIFramePackingInterpretation", m_framePackingSEIInterpretation, 0, "Indicate the interpretation of the frame pair\n"
"\t0: unspecified\n"
"\t1: stereo pair, frame0 represents left view\n"
"\t2: stereo pair, frame0 represents right view")
#if JVET_V0061_SEI
("SEIDisplayOrientationEnabled", m_doSEIEnabled, false, "Controls if display orientation packing SEI message enabled")
("SEIDisplayOrientationCancelFlag", m_doSEICancelFlag, true, "Specifies the persistence of any previous display orientation SEI message in output order.")
("SEIDisplayOrientationPersistenceFlag", m_doSEIPersistenceFlag, false, "Specifies the persistence of the display orientation packing SEI message for the current layer.")
("SEIDisplayOrientationTransformType", m_doSEITransformType, 0, "specifies the rotation and mirroring to be applied to the picture.")
#endif
Rickard Sjöberg
committed
("SEIParameterSetsInclusionIndication", m_parameterSetsInclusionIndicationSEIEnabled, false, "Control generation of Parameter sets inclusion indication SEI messages")
("SEISelfContainedClvsFlag", m_selfContainedClvsFlag, 0, "Self contained CLVS indication flag value")

Karsten Suehring
committed
("SEIMasteringDisplayColourVolume", m_masteringDisplay.colourVolumeSEIEnabled, false, "Control generation of mastering display colour volume SEI messages")
("SEIMasteringDisplayMaxLuminance", m_masteringDisplay.maxLuminance, 10000u, "Specifies the mastering display maximum luminance value in units of 1/10000 candela per square metre (32-bit code value)")
("SEIMasteringDisplayMinLuminance", m_masteringDisplay.minLuminance, 0u, "Specifies the mastering display minimum luminance value in units of 1/10000 candela per square metre (32-bit code value)")
("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)")
("SEIMasteringDisplayWhitePoint", cfg_DisplayWhitePointCode, cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)")
#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
("SEIPreferredTransferCharacteristics", 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")
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
("SEIErpEnabled", m_erpSEIEnabled, false, "Control generation of equirectangular projection SEI messages")
("SEIErpCancelFlag", m_erpSEICancelFlag, true, "Indicate that equirectangular projection SEI message cancels the persistence or follows")
("SEIErpPersistenceFlag", m_erpSEIPersistenceFlag, false, "Specifies the persistence of the equirectangular projection SEI messages")
("SEIErpGuardBandFlag", m_erpSEIGuardBandFlag, false, "Indicate the existence of guard band areas in the constituent picture")
("SEIErpGuardBandType", m_erpSEIGuardBandType, 0u, "Indicate the type of the guard band")
("SEIErpLeftGuardBandWidth", m_erpSEILeftGuardBandWidth, 0u, "Indicate the width of the guard band on the left side of the constituent picture")
("SEIErpRightGuardBandWidth", m_erpSEIRightGuardBandWidth, 0u, "Indicate the width of the guard band on the right side of the constituent picture")
("SEISphereRotationEnabled", m_sphereRotationSEIEnabled, false, "Control generation of sphere rotation SEI messages")
("SEISphereRotationCancelFlag", m_sphereRotationSEICancelFlag, true, "Indicate that sphere rotation SEI message cancels the persistence or follows")
("SEISphereRotationPersistenceFlag", m_sphereRotationSEIPersistenceFlag, false, "Specifies the persistence of the sphere rotation SEI messages")
("SEISphereRotationYaw", m_sphereRotationSEIYaw, 0, "Specifies the value of the yaw rotation angle")
("SEISphereRotationPitch", m_sphereRotationSEIPitch, 0, "Specifies the value of the pitch rotation angle")
("SEISphereRotationRoll", m_sphereRotationSEIRoll, 0, "Specifies the value of the roll rotation angle")
("SEIOmniViewportEnabled", m_omniViewportSEIEnabled, false, "Control generation of omni viewport SEI messages")
("SEIOmniViewportId", m_omniViewportSEIId, 0u, "An identifying number that may be used to identify the purpose of the one or more recommended viewport regions")
("SEIOmniViewportCancelFlag", m_omniViewportSEICancelFlag, true, "Indicate that omni viewport SEI message cancels the persistence or follows")
("SEIOmniViewportPersistenceFlag", m_omniViewportSEIPersistenceFlag, false, "Specifies the persistence of the omni viewport SEI messages")
("SEIOmniViewportCntMinus1", m_omniViewportSEICntMinus1, 0u, "specifies the number of recommended viewport regions minus 1")
("SEIOmniViewportAzimuthCentre", cfg_omniViewportSEIAzimuthCentre, cfg_omniViewportSEIAzimuthCentre, "Indicate the centre of the i-th recommended viewport region")
("SEIOmniViewportElevationCentre", cfg_omniViewportSEIElevationCentre, cfg_omniViewportSEIElevationCentre, "Indicate the centre of the i-th recommended viewport region")
("SEIOmniViewportTiltCentre", cfg_omniViewportSEITiltCentre, cfg_omniViewportSEITiltCentre, "Indicates the tilt angle of the i-th recommended viewport region")
("SEIOmniViewportHorRange", cfg_omniViewportSEIHorRange, cfg_omniViewportSEIHorRange, "Indicates the azimuth range of the i-th recommended viewport region")
("SEIOmniViewportVerRange", cfg_omniViewportSEIVerRange, cfg_omniViewportSEIVerRange, "Indicates the elevation range of the i-th recommended viewport region")
("SEIRwpEnabled", m_rwpSEIEnabled, false, "Controls if region-wise packing SEI message enabled")
("SEIRwpCancelFlag", m_rwpSEIRwpCancelFlag, true, "Specifies the persistence of any previous region-wise packing SEI message in output order.")
("SEIRwpPersistenceFlag", m_rwpSEIRwpPersistenceFlag, false, "Specifies the persistence of the region-wise packing SEI message for the current layer.")
("SEIRwpConstituentPictureMatchingFlag", m_rwpSEIConstituentPictureMatchingFlag, false, "Specifies the information in the SEI message apply individually to each constituent picture or to the projected picture.")
("SEIRwpNumPackedRegions", m_rwpSEINumPackedRegions, 0, "specifies the number of packed regions when constituent picture matching flag is equal to 0.")
("SEIRwpProjPictureWidth", m_rwpSEIProjPictureWidth, 0, "Specifies the width of the projected picture.")
("SEIRwpProjPictureHeight", m_rwpSEIProjPictureHeight, 0, "Specifies the height of the projected picture.")
("SEIRwpPackedPictureWidth", m_rwpSEIPackedPictureWidth, 0, "specifies the width of the packed picture.")
("SEIRwpPackedPictureHeight", m_rwpSEIPackedPictureHeight, 0, "Specifies the height of the packed picture.")
("SEIRwpTransformType", cfg_rwpSEIRwpTransformType, cfg_rwpSEIRwpTransformType, "specifies the rotation and mirroring to be applied to the i-th packed region.")
("SEIRwpGuardBandFlag", cfg_rwpSEIRwpGuardBandFlag, cfg_rwpSEIRwpGuardBandFlag, "specifies the existence of guard band in the i-th packed region.")
("SEIRwpProjRegionWidth", cfg_rwpSEIProjRegionWidth, cfg_rwpSEIProjRegionWidth, "specifies the width of the i-th projected region.")
("SEIRwpProjRegionHeight", cfg_rwpSEIProjRegionHeight, cfg_rwpSEIProjRegionHeight, "specifies the height of the i-th projected region.")
("SEIRwpProjRegionTop", cfg_rwpSEIRwpSEIProjRegionTop, cfg_rwpSEIRwpSEIProjRegionTop, "specifies the top sample row of the i-th projected region.")
("SEIRwpProjRegionLeft", cfg_rwpSEIProjRegionLeft, cfg_rwpSEIProjRegionLeft, "specifies the left-most sample column of the i-th projected region.")
("SEIRwpPackedRegionWidth", cfg_rwpSEIPackedRegionWidth, cfg_rwpSEIPackedRegionWidth, "specifies the width of the i-th packed region.")
("SEIRwpPackedRegionHeight", cfg_rwpSEIPackedRegionHeight, cfg_rwpSEIPackedRegionHeight, "specifies the height of the i-th packed region.")
("SEIRwpPackedRegionTop", cfg_rwpSEIPackedRegionTop, cfg_rwpSEIPackedRegionTop, "specifies the top luma sample row of the i-th packed region.")
("SEIRwpPackedRegionLeft", cfg_rwpSEIPackedRegionLeft, cfg_rwpSEIPackedRegionLeft, "specifies the left-most luma sample column of the i-th packed region.")
("SEIRwpLeftGuardBandWidth", cfg_rwpSEIRwpLeftGuardBandWidth, cfg_rwpSEIRwpLeftGuardBandWidth, "specifies the width of the guard band on the left side of the i-th packed region.")
("SEIRwpRightGuardBandWidth", cfg_rwpSEIRwpRightGuardBandWidth, cfg_rwpSEIRwpRightGuardBandWidth, "specifies the width of the guard band on the right side of the i-th packed region.")
("SEIRwpTopGuardBandHeight", cfg_rwpSEIRwpTopGuardBandHeight, cfg_rwpSEIRwpTopGuardBandHeight, "specifies the height of the guard band above the i-th packed region.")
("SEIRwpBottomGuardBandHeight", cfg_rwpSEIRwpBottomGuardBandHeight, cfg_rwpSEIRwpBottomGuardBandHeight, "specifies the height of the guard band below the i-th packed region.")
("SEIRwpGuardBandNotUsedForPredFlag", cfg_rwpSEIRwpGuardBandNotUsedForPredFlag, cfg_rwpSEIRwpGuardBandNotUsedForPredFlag, "Specifies if the guard bands is used in the inter prediction process.")
("SEIRwpGuardBandType", cfg_rwpSEIRwpGuardBandType, cfg_rwpSEIRwpGuardBandType, "Specifies the type of the guard bands for the i-th packed region.")
("SEIGcmpEnabled", m_gcmpSEIEnabled, false, "Control generation of generalized cubemap projection SEI messages")
("SEIGcmpCancelFlag", m_gcmpSEICancelFlag, true, "Indicate that generalized cubemap projection SEI message cancels the persistence or follows")
("SEIGcmpPersistenceFlag", m_gcmpSEIPersistenceFlag, false, "Specifies the persistence of the generalized cubemap projection SEI messages")
("SEIGcmpPackingType", m_gcmpSEIPackingType, 0u, "Specifies the packing type")
("SEIGcmpMappingFunctionType", m_gcmpSEIMappingFunctionType, 0u, "Specifies the mapping function used to adjust the sample locations of the cubemap projection")
("SEIGcmpFaceIndex", cfg_gcmpSEIFaceIndex, cfg_gcmpSEIFaceIndex, "Specifies the face index for the i-th face")
("SEIGcmpFaceRotation", cfg_gcmpSEIFaceRotation, cfg_gcmpSEIFaceRotation, "Specifies the rotation to be applied to the i-th face")
("SEIGcmpFunctionCoeffU", cfg_gcmpSEIFunctionCoeffU, cfg_gcmpSEIFunctionCoeffU, "Specifies the coefficient used in the cubemap mapping function of the u-axis of the i-th face")
("SEIGcmpFunctionUAffectedByVFlag", cfg_gcmpSEIFunctionUAffectedByVFlag, cfg_gcmpSEIFunctionUAffectedByVFlag, "Specifies whether the cubemap mapping function of the u-axis refers to the v position of the sample location")
("SEIGcmpFunctionCoeffV", cfg_gcmpSEIFunctionCoeffV, cfg_gcmpSEIFunctionCoeffV, "Specifies the coefficient used in the cubemap mapping function of the v-axis of the i-th face")
("SEIGcmpFunctionVAffectedByUFlag", cfg_gcmpSEIFunctionVAffectedByUFlag, cfg_gcmpSEIFunctionVAffectedByUFlag, "Specifies whether the cubemap mapping function of the v-axis refers to the u position of the sample location")
("SEIGcmpGuardBandFlag", m_gcmpSEIGuardBandFlag, false, "Indicate the existence of guard band areas in the picture")
("SEIGcmpGuardBandType", m_gcmpSEIGuardBandType, 0u, "Indicate the type of the guard bands")
("SEIGcmpGuardBandBoundaryExteriorFlag", m_gcmpSEIGuardBandBoundaryExteriorFlag, false, "Indicate whether face boundaries contain guard bands")
("SEIGcmpGuardBandSamplesMinus1", m_gcmpSEIGuardBandSamplesMinus1, 0u, "Specifies the number of guard band samples minus1 used in the cubemap projected picture")
("SEISubpicLevelInfoEnabled", m_cfgSubpictureLevelInfoSEI.m_enabled, false, "Control generation of Subpicture Level Information SEI messages")
("SEISubpicLevelInfoRefLevels", cfg_sliRefLevels, cfg_sliRefLevels, "List of reference levels for Subpicture Level Information SEI messages")
("SEISubpicLevelInfoExplicitFraction", m_cfgSubpictureLevelInfoSEI.m_explicitFraction, false, "Enable sending of explicit fractions in Subpicture Level Information SEI messages")
("SEISubpicLevelInfoNumSubpics", m_cfgSubpictureLevelInfoSEI.m_numSubpictures, 1, "Number of subpictures for Subpicture Level Information SEI messages")
("SEIAnnotatedRegionsFileRoot,-ar", m_arSEIFileRoot, string(""), "Annotated region SEI parameters root file name (wo num ext); only the file name base is to be added. Underscore and POC would be automatically addded to . E.g. \"-ar ar\" will search for files ar_0.txt, ar_1.txt, ...")
("SEISubpicLevelInfoMaxSublayers", m_cfgSubpictureLevelInfoSEI.m_sliMaxSublayers, 1, "Number of sublayers for Subpicture Level Information SEI messages")
("SEISubpicLevelInfoSublayerInfoPresentFlag", m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag, false, "Enable sending of level information for all sublayers in Subpicture Level Information SEI messages")
("SEISubpicLevelInfoRefLevelFractions", cfg_sliFractions, cfg_sliFractions, "List of subpicture level fractions for Subpicture Level Information SEI messages")
("SEISubpicLevelInfoNonSubpicLayersFractions", cfg_sliNonSubpicLayersFractions, cfg_sliNonSubpicLayersFractions, "List of level fractions for non-subpicture layers in Subpicture Level Information SEI messages")
("SEISampleAspectRatioInfo", m_sampleAspectRatioInfoSEIEnabled, false, "Control generation of Sample Aspect Ratio Information SEI messages")
("SEISARICancelFlag", m_sariCancelFlag, false, "Indicates that Sample Aspect Ratio Information SEI message cancels the persistence or follows")
("SEISARIPersistenceFlag", m_sariPersistenceFlag, true, "Specifies the persistence of the Sample Aspect Ratio Information SEI message")
("SEISARIAspectRatioIdc", m_sariAspectRatioIdc, 0, "Specifies the Sample Aspect Ratio IDC of Sample Aspect Ratio Information SEI messages")
("SEISARISarWidth", m_sariSarWidth, 0, "Specifies the Sample Aspect Ratio Width of Sample Aspect Ratio Information SEI messages, if extended SAR is chosen.")
("SEISARISarHeight", m_sariSarHeight, 0, "Specifies the Sample Aspect Ratio Height of Sample Aspect Ratio Information SEI messages, if extended SAR is chosen.")
("MCTSEncConstraint", m_MCTSEncConstraint, false, "For MCTS, constrain motion vectors at tile boundaries")

Karsten Suehring
committed
#if ENABLE_TRACING
("TraceChannelsList", bTracingChannelsList, false, "List all available tracing channels")
("TraceRule", sTracingRule, string( "" ), "Tracing rule (ex: \"D_CABAC:poc==8\" or \"D_REC_CB_LUMA:poc==8\")")
("TraceFile", sTracingFile, string( "" ), "Tracing file")
#endif
// film grain characteristics SEI
("SEIFGCEnabled", m_fgcSEIEnabled, false, "Control generation of the film grain characteristics SEI message")
("SEIFGCCancelFlag", m_fgcSEICancelFlag, true, "Specifies the persistence of any previous film grain characteristics SEI message in output order.")
("SEIFGCPersistenceFlag", m_fgcSEIPersistenceFlag, false, "Specifies the persistence of the film grain characteristics SEI message for the current layer.")
("SEIFGCModelID", m_fgcSEIModelID, 0u, "Specifies the film grain simulation model. 0: frequency filtering; 1: auto-regression.")
("SEIFGCSepColourDescPresentFlag", m_fgcSEISepColourDescPresentFlag, false, "Specifies the presence of a distinct colour space description for the film grain characteristics specified in the SEI message.")
("SEIFGCBlendingModeID", m_fgcSEIBlendingModeID, 0u, "Specifies the blending mode used to blend the simulated film grain with the decoded images. 0: additive; 1: multiplicative.")
("SEIFGCLog2ScaleFactor", m_fgcSEILog2ScaleFactor, 0u, "Specifies a scale factor used in the film grain characterization equations.")
("SEIFGCCompModelPresentComp0", m_fgcSEICompModelPresent[0], false, "Specifies the presence of film grain modelling on colour component 0.")
("SEIFGCCompModelPresentComp1", m_fgcSEICompModelPresent[1], false, "Specifies the presence of film grain modelling on colour component 1.")
("SEIFGCCompModelPresentComp2", m_fgcSEICompModelPresent[2], false, "Specifies the presence of film grain modelling on colour component 2.")
// content light level SEI
("SEICLLEnabled", m_cllSEIEnabled, false, "Control generation of the content light level SEI message")
("SEICLLMaxContentLightLevel", m_cllSEIMaxContentLevel, 0u, "When not equal to 0, specifies an upper bound on the maximum light level among all individual samples in a 4:4:4 representation "
"of red, green, and blue colour primary intensities in the linear light domain for the pictures of the CLVS, "
"in units of candelas per square metre.When equal to 0, no such upper bound is indicated.")
("SEICLLMaxPicAvgLightLevel", m_cllSEIMaxPicAvgLevel, 0u, "When not equal to 0, specifies an upper bound on the maximum average light level among the samples in a 4:4:4 representation "
"of red, green, and blue colour primary intensities in the linear light domain for any individual picture of the CLVS, "
"in units of candelas per square metre.When equal to 0, no such upper bound is indicated.")
// ambient viewing environment SEI
("SEIAVEEnabled", m_aveSEIEnabled, false, "Control generation of the ambient viewing environment SEI message")
("SEIAVEAmbientIlluminance", m_aveSEIAmbientIlluminance, 100000u, "Specifies the environmental illluminance of the ambient viewing environment in units of 1/10000 lux for the ambient viewing environment SEI message")
("SEIAVEAmbientLightX", m_aveSEIAmbientLightX, 15635u, "Specifies the normalized x chromaticity coordinate of the environmental ambient light in the nominal viewing enviornment according to the CIE 1931 definition in units of 1/50000 lux for the ambient viewing enviornment SEI message")
("SEIAVEAmbientLightY", m_aveSEIAmbientLightY, 16450u, "Specifies the normalized y chromaticity coordinate of the environmental ambient light in the nominal viewing enviornment according to the CIE 1931 definition in units of 1/50000 lux for the ambient viewing enviornment SEI message")
// content colour volume SEI
("SEICCVEnabled", m_ccvSEIEnabled, false, "Control generation of the Content Colour Volume SEI message")
("SEICCVCancelFlag", m_ccvSEICancelFlag, true, "Specifies the persistence of any previous content colour volume SEI message in output order.")
("SEICCVPersistenceFlag", m_ccvSEIPersistenceFlag, false, "Specifies the persistence of the content colour volume SEI message for the current layer.")
("SEICCVPrimariesPresent", m_ccvSEIPrimariesPresentFlag, true, "Specifies whether the CCV primaries are present in the content colour volume SEI message.")
("m_ccvSEIPrimariesX0", m_ccvSEIPrimariesX[0], 0.300, "Specifies the x coordinate of the first (green) primary for the content colour volume SEI message")
("m_ccvSEIPrimariesY0", m_ccvSEIPrimariesY[0], 0.600, "Specifies the y coordinate of the first (green) primary for the content colour volume SEI message")
("m_ccvSEIPrimariesX1", m_ccvSEIPrimariesX[1], 0.150, "Specifies the x coordinate of the second (blue) primary for the content colour volume SEI message")
("m_ccvSEIPrimariesY1", m_ccvSEIPrimariesY[1], 0.060, "Specifies the y coordinate of the second (blue) primary for the content colour volume SEI message")
("m_ccvSEIPrimariesX2", m_ccvSEIPrimariesX[2], 0.640, "Specifies the x coordinate of the third (red) primary for the content colour volume SEI message")
("m_ccvSEIPrimariesY2", m_ccvSEIPrimariesY[2], 0.330, "Specifies the y coordinate of the third (red) primary for the content colour volume SEI message")
("SEICCVMinLuminanceValuePresent", m_ccvSEIMinLuminanceValuePresentFlag, true, "Specifies whether the CCV min luminance value is present in the content colour volume SEI message")
("SEICCVMinLuminanceValue", m_ccvSEIMinLuminanceValue, 0.0, "specifies the CCV min luminance value in the content colour volume SEI message")
("SEICCVMaxLuminanceValuePresent", m_ccvSEIMaxLuminanceValuePresentFlag, true, "Specifies whether the CCV max luminance value is present in the content colour volume SEI message")
("SEICCVMaxLuminanceValue", m_ccvSEIMaxLuminanceValue, 0.1, "specifies the CCV max luminance value in the content colour volume SEI message")
("SEICCVAvgLuminanceValuePresent", m_ccvSEIAvgLuminanceValuePresentFlag, true, "Specifies whether the CCV avg luminance value is present in the content colour volume SEI message")
("SEICCVAvgLuminanceValue", m_ccvSEIAvgLuminanceValue, 0.01, "specifies the CCV avg luminance value in the content colour volume SEI message")

Karsten Suehring
committed
("DebugBitstream", m_decodeBitstreams[0], string( "" ), "Assume the frames up to POC DebugPOC will be the same as in this bitstream. Load those frames from the bitstream instead of encoding them." )
("DebugPOC", m_switchPOC, -1, "If DebugBitstream is present, load frames up to this POC from this bitstream. Starting with DebugPOC, return to normal encoding." )
("DecodeBitstream1", m_decodeBitstreams[0], string( "" ), "Assume the frames up to POC DebugPOC will be the same as in this bitstream. Load those frames from the bitstream instead of encoding them." )
("DecodeBitstream2", m_decodeBitstreams[1], string( "" ), "Assume the frames up to POC DebugPOC will be the same as in this bitstream. Load those frames from the bitstream instead of encoding them." )
("SwitchPOC", m_switchPOC, -1, "If DebugBitstream is present, load frames up to this POC from this bitstream. Starting with DebugPOC, return to normal encoding." )
("SwitchDQP", m_switchDQP, 0, "delta QP applied to picture with switchPOC and subsequent pictures." )
("FastForwardToPOC", m_fastForwardToPOC, -1, "Get to encoding the specified POC as soon as possible by skipping temporal layers irrelevant for the specified POC." )
("StopAfterFFtoPOC", m_stopAfterFFtoPOC, false, "If using fast forward to POC, after the POC of interest has been hit, stop further encoding.")
("ForceDecodeBitstream1", m_forceDecodeBitstream1, false, "force decoding of bitstream 1 - use this only if you are realy sure about what you are doing ")
("DecodeBitstream2ModPOCAndType", m_bs2ModPOCAndType, false, "Modify POC and NALU-type of second input bitstream, to use second BS as closing I-slice")
("DebugCTU", m_debugCTU, -1, "If DebugBitstream is present, load frames up to this POC from this bitstream. Starting with DebugPOC-frame at CTUline containin debug CTU.")
Nan Hu
committed
#if JVET_V0095_ALF_SAO_TRUE_ORG
("AlfSaoTrueOrg", m_alfSaoTrueOrg, false, "Using true original samples for ALF and SAO optimization when MCTF is enabled\n")
#endif
( "ALF", m_alf, true, "Adaptive Loop Filter\n" )
("ALFStrengthLuma", m_alfStrengthLuma, 1.0, "Adaptive Loop Filter strength for luma. The parameter scales the magnitudes of the ALF filter coefficients for luma. Valid range is 0.0 <= ALFStrengthLuma <= 1.0")
Kenneth Andersson
committed
("ALFAllowPredefinedFilters", m_alfAllowPredefinedFilters, true, "Allow use of predefined filters for ALF")
("CCALFStrength", m_ccalfStrength, 1.0, "Cross-component Adaptive Loop Filter strength. The parameter scales the magnitudes of the CCALF filter coefficients. Valid range is 0.0 <= CCALFStrength <= 1.0")
("ALFStrengthChroma", m_alfStrengthChroma, 1.0, "Adaptive Loop Filter strength for chroma. The parameter scales the magnitudes of the ALF filter coefficients for chroma. Valid range is 0.0 <= ALFStrengthChroma <= 1.0")
("ALFStrengthTargetLuma", m_alfStrengthTargetLuma, 1.0, "Adaptive Loop Filter strength target for ALF luma filter optimization. The parameter scales the auto-correlation matrix E and the cross-correlation vector y for luma. Valid range is 0.0 <= ALFStrengthTargetLuma <= 1.0")
("ALFStrengthTargetChroma", m_alfStrengthTargetChroma, 1.0, "Adaptive Loop Filter strength target for ALF chroma filter optimization. The parameter scales the auto-correlation matrix E and the cross-correlation vector y for chroma. Valid range is 0.0 <= ALFStrengthTargetChroma <= 1.0")
("CCALFStrengthTarget", m_ccalfStrengthTarget, 1.0, "Cross-component Adaptive Loop Filter strength target for filter optimization. The parameter scales the auto-correlation matrix E and the cross-correlation vector y. Valid range is 0.0 <= CCALFStrengthTarget <= 1.0")
( "CCALF", m_ccalf, true, "Cross-component Adaptive Loop Filter" )
( "CCALFQpTh", m_ccalfQpThreshold, 37, "QP threshold above which encoder reduces CCALF usage")
Zhipin Deng
committed
( "RPR", m_rprEnabledFlag, true, "Reference Sample Resolution" )
( "ScalingRatioHor", m_scalingRatioHor, 1.0, "Scaling ratio in hor direction" )
( "ScalingRatioVer", m_scalingRatioVer, 1.0, "Scaling ratio in ver direction" )
( "FractionNumFrames", m_fractionOfFrames, 1.0, "Encode a fraction of the specified in FramesToBeEncoded frames" )
( "SwitchPocPeriod", m_switchPocPeriod, 0, "Switch POC period for RPR" )
( "UpscaledOutput", m_upscaledOutput, 0, "Output upscaled (2), decoded but in full resolution buffer (1) or decoded cropped (0, default) picture for RPR" )
( "EnableOperatingPointInformation", m_OPIEnabled, false, "Enables writing of Operating Point Information (OPI)" )
( "MaxTemporalLayer", m_maxTemporalLayer, 500, "Maximum temporal layer to be signalled in OPI" )
( "TargetOutputLayerSet", m_targetOlsIdx, 500, "Target output layer set index to be signalled in OPI" )

Karsten Suehring
committed
( "MaxSublayers", m_maxSublayers, 7, "Max number of Sublayers")
( "DefaultPtlDpbHrdMaxTidFlag", m_defaultPtlDpbHrdMaxTidFlag, true, "specifies that the syntax elements vps_ptl_max_tid[ i ], vps_dpb_max_tid[ i ], and vps_hrd_max_tid[ i ] are not present and are inferred to be equal to the default value vps_max_sublayers_minus1")
( "AllIndependentLayersFlag", m_allIndependentLayersFlag, true, "All layers are independent layer")
("AllowablePredDirection", m_predDirectionArray, string(""), "prediction directions allowed for i-th temporal layer")
( "LayerId%d", m_layerId, 0, MAX_VPS_LAYERS, "Layer ID")
( "NumRefLayers%d", m_numRefLayers, 0, MAX_VPS_LAYERS, "Number of direct reference layer index of i-th layer")
( "RefLayerIdx%d", m_refLayerIdxStr, string(""), MAX_VPS_LAYERS, "Reference layer index(es)")
( "EachLayerIsAnOlsFlag", m_eachLayerIsAnOlsFlag, true, "Each layer is an OLS layer flag")
( "OlsModeIdc", m_olsModeIdc, 0, "Output layer set mode")
( "NumOutputLayerSets", m_numOutputLayerSets, 1, "Number of output layer sets")
( "OlsOutputLayer%d", m_olsOutputLayerStr, string(""), MAX_VPS_LAYERS, "Output layer index of i-th OLS")
( "NumPTLsInVPS", m_numPtlsInVps, 1, "Number of profile_tier_level structures in VPS" )
( "AvoidIntraInDepLayers", m_avoidIntraInDepLayer, true, "Replaces I pictures in dependent layers with B pictures" )
( "MaxTidILRefPicsPlusOneLayerId%d", m_maxTidILRefPicsPlus1Str, string(""), MAX_VPS_LAYERS, "Maximum temporal ID for inter-layer reference pictures plus 1 of i-th layer, 0 for IRAP only")

Karsten Suehring
committed
;
Rickard Sjöberg
committed
opts.addOptions()
("TemporalFilter", m_gopBasedTemporalFilterEnabled, false, "Enable GOP based temporal filter. Disabled per default")
("TemporalFilterFutureReference", m_gopBasedTemporalFilterFutureReference, true, "Enable referencing of future frames in the GOP based temporal filter. This is typically disabled for Low Delay configurations.")
("TemporalFilterStrengthFrame*", m_gopBasedTemporalFilterStrengths, std::map<int, double>(), "Strength for every * frame in GOP based temporal filter, where * is an integer."
" E.g. --TemporalFilterStrengthFrame8 0.95 will enable GOP based temporal filter at every 8th frame with strength 0.95");
Rickard Sjöberg
committed

Karsten Suehring
committed
#if EXTENSION_360_VIDEO
TExt360AppEncCfg::TExt360AppEncCfgContext ext360CfgContext;
m_ext360.addOptions(opts, ext360CfgContext);
#endif
for(int i=1; i<MAX_GOP+1; i++)
{
std::ostringstream cOSS;
cOSS<<"Frame"<<i;
opts.addOptions()(cOSS.str(), m_GOPList[i-1], GOPEntry());
}
for(int i = 0; i < MAX_NUM_OLSS; i++)
{
std::ostringstream cOSS1;
cOSS1<<"LevelPTL"<<i;
opts.addOptions()(cOSS1.str(), m_levelPtl[i], Level::NONE);
std::ostringstream cOSS2;
cOSS2<<"OlsPTLIdx"<<i;
opts.addOptions()(cOSS2.str(), m_olsPtlIdx[i], 0);
}

Karsten Suehring
committed
po::setDefaults(opts);
po::ErrorReporter err;
const list<const char*>& argv_unhandled = po::scanArgv(opts, argc, (const char**) argv, err);
m_resChangeInClvsEnabled = m_scalingRatioHor != 1.0 || m_scalingRatioVer != 1.0;
Zhipin Deng
committed
m_resChangeInClvsEnabled = m_resChangeInClvsEnabled && m_rprEnabledFlag;
if( m_fractionOfFrames != 1.0 )
m_framesToBeEncoded = int( m_framesToBeEncoded * m_fractionOfFrames );
}
if (m_resChangeInClvsEnabled && !m_switchPocPeriod)
{
m_switchPocPeriod = m_iFrameRate / 2 / m_iGOPSize * m_iGOPSize;
}
//Check the given value of intra period and decoding refresh type. If intra period is -1, set decoding refresh type to be equal to 0. And vice versa
if( m_iIntraPeriod == -1 )
{
m_iDecodingRefreshType = 0;
}
if( !m_iDecodingRefreshType )
{
m_iIntraPeriod = -1;
}
if ( m_gdrEnabled )
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
{
m_iDecodingRefreshType = 3;
m_intraQPOffset = 0;
m_iGOPSize = 1;
m_GOPList[0].m_POC = 1;
m_GOPList[0].m_sliceType = 'B';
m_GOPList[0].m_QPOffset = 0;
m_GOPList[0].m_QPOffsetModelOffset = 0;
m_GOPList[0].m_QPOffsetModelScale = 0;
m_GOPList[0].m_CbQPoffset = 0;
m_GOPList[0].m_CrQPoffset = 0;
m_GOPList[0].m_QPFactor = 1.0;
m_GOPList[0].m_tcOffsetDiv2 = 0;
m_GOPList[0].m_betaOffsetDiv2 = 0;
m_GOPList[0].m_CbTcOffsetDiv2 = 0;
m_GOPList[0].m_CbBetaOffsetDiv2 = 0;
m_GOPList[0].m_CrTcOffsetDiv2 = 0;
m_GOPList[0].m_CrBetaOffsetDiv2 = 0;
m_GOPList[0].m_temporalId = 0;
m_GOPList[0].m_numRefPicsActive0 = 4;
m_GOPList[0].m_numRefPics0 = 4;
m_GOPList[0].m_deltaRefPics0[0] = 1;
m_GOPList[0].m_deltaRefPics0[1] = 2;
m_GOPList[0].m_deltaRefPics0[2] = 3;
m_GOPList[0].m_deltaRefPics0[3] = 4;
m_GOPList[0].m_numRefPicsActive1 = 4;
m_GOPList[0].m_numRefPics1 = 4;
m_GOPList[0].m_deltaRefPics1[0] = 1;
m_GOPList[0].m_deltaRefPics1[1] = 2;
m_GOPList[0].m_deltaRefPics1[2] = 3;
m_GOPList[0].m_deltaRefPics1[3] = 4;
m_BIO = false;
m_DMVR = false;
m_SMVD = false;
Seungwook Hong
committed
if (m_gdrPeriod < 0)
{
m_gdrPeriod = m_iFrameRate * 2;
}
Seungwook Hong
committed
if (m_gdrInterval < 0)
Seungwook Hong
committed
m_gdrInterval = m_iFrameRate;
Seungwook Hong
committed
if (m_gdrPocStart < 0)
Seungwook Hong
committed
m_gdrPocStart = m_gdrPeriod;
}
if (m_iIntraPeriod == -1)
{
m_iFrameRate = (m_iFrameRate == 0) ? 30 : m_iFrameRate;
if (m_gdrPocStart % m_iFrameRate != 0)
m_iIntraPeriod = -1;
else
Seungwook Hong
committed
m_iIntraPeriod = m_gdrPeriod;
}
}
#endif
Yago Sanchez de la Fuente
committed
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
m_bpDeltasGOPStructure = false;
if(m_iGOPSize == 16)
{
if ((m_GOPList[0].m_POC == 16 && m_GOPList[0].m_temporalId == 0 )
&& (m_GOPList[1].m_POC == 8 && m_GOPList[1].m_temporalId == 1 )
&& (m_GOPList[2].m_POC == 4 && m_GOPList[2].m_temporalId == 2 )
&& (m_GOPList[3].m_POC == 2 && m_GOPList[3].m_temporalId == 3 )
&& (m_GOPList[4].m_POC == 1 && m_GOPList[4].m_temporalId == 4 )
&& (m_GOPList[5].m_POC == 3 && m_GOPList[5].m_temporalId == 4 )
&& (m_GOPList[6].m_POC == 6 && m_GOPList[6].m_temporalId == 3 )
&& (m_GOPList[7].m_POC == 5 && m_GOPList[7].m_temporalId == 4 )
&& (m_GOPList[8].m_POC == 7 && m_GOPList[8].m_temporalId == 4 )
&& (m_GOPList[9].m_POC == 12 && m_GOPList[9].m_temporalId == 2 )
&& (m_GOPList[10].m_POC == 10 && m_GOPList[10].m_temporalId == 3 )
&& (m_GOPList[11].m_POC == 9 && m_GOPList[11].m_temporalId == 4 )
&& (m_GOPList[12].m_POC == 11 && m_GOPList[12].m_temporalId == 4 )
&& (m_GOPList[13].m_POC == 14 && m_GOPList[13].m_temporalId == 3 )
&& (m_GOPList[14].m_POC == 13 && m_GOPList[14].m_temporalId == 4 )
&& (m_GOPList[15].m_POC == 15 && m_GOPList[15].m_temporalId == 4 ))
{
m_bpDeltasGOPStructure = true;
}
}
else if(m_iGOPSize == 8)
{
if ((m_GOPList[0].m_POC == 8 && m_GOPList[0].m_temporalId == 0 )
&& (m_GOPList[1].m_POC == 4 && m_GOPList[1].m_temporalId == 1 )
&& (m_GOPList[2].m_POC == 2 && m_GOPList[2].m_temporalId == 2 )
&& (m_GOPList[3].m_POC == 1 && m_GOPList[3].m_temporalId == 3 )
&& (m_GOPList[4].m_POC == 3 && m_GOPList[4].m_temporalId == 3 )
&& (m_GOPList[5].m_POC == 6 && m_GOPList[5].m_temporalId == 2 )
&& (m_GOPList[6].m_POC == 5 && m_GOPList[6].m_temporalId == 3 )
&& (m_GOPList[7].m_POC == 7 && m_GOPList[7].m_temporalId == 3 ))
{
m_bpDeltasGOPStructure = true;
}
}
else
{
m_bpDeltasGOPStructure = false;
}
for (int i = 0; m_GOPList[i].m_POC != -1 && i < MAX_GOP + 1; i++)
{
m_RPLList0[i].m_POC = m_RPLList1[i].m_POC = m_GOPList[i].m_POC;
m_RPLList0[i].m_temporalId = m_RPLList1[i].m_temporalId = m_GOPList[i].m_temporalId;
m_RPLList0[i].m_refPic = m_RPLList1[i].m_refPic = m_GOPList[i].m_refPic;
m_RPLList0[i].m_sliceType = m_RPLList1[i].m_sliceType = m_GOPList[i].m_sliceType;
m_RPLList0[i].m_isEncoded = m_RPLList1[i].m_isEncoded = m_GOPList[i].m_isEncoded;
m_RPLList0[i].m_numRefPicsActive = m_GOPList[i].m_numRefPicsActive0;
m_RPLList1[i].m_numRefPicsActive = m_GOPList[i].m_numRefPicsActive1;
m_RPLList0[i].m_numRefPics = m_GOPList[i].m_numRefPics0;
m_RPLList1[i].m_numRefPics = m_GOPList[i].m_numRefPics1;
Philip Cowan
committed
m_RPLList0[i].m_ltrp_in_slice_header_flag = m_GOPList[i].m_ltrp_in_slice_header_flag;
m_RPLList1[i].m_ltrp_in_slice_header_flag = m_GOPList[i].m_ltrp_in_slice_header_flag;
for (int j = 0; j < m_GOPList[i].m_numRefPics0; j++)
m_RPLList0[i].m_deltaRefPics[j] = m_GOPList[i].m_deltaRefPics0[j];
for (int j = 0; j < m_GOPList[i].m_numRefPics1; j++)
m_RPLList1[i].m_deltaRefPics[j] = m_GOPList[i].m_deltaRefPics1[j];
}
for (int i = 0; i < m_iGOPSize; i++)
{
m_GOPList[i].m_POC *= 2;
m_RPLList0[i].m_POC *= 2;
m_RPLList1[i].m_POC *= 2;
for (int j = 0; j < m_RPLList0[i].m_numRefPics; j++)
{
m_RPLList0[i].m_deltaRefPics[j] *= 2;
}
for (int j = 0; j < m_RPLList1[i].m_numRefPics; j++)
{
m_RPLList1[i].m_deltaRefPics[j] *= 2;
}
}
}

Karsten Suehring
committed
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
for (list<const char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++)
{
msg( ERROR, "Unhandled argument ignored: `%s'\n", *it);
}
if (argc == 1 || do_help)
{
/* argc == 1: no options have been specified */
po::doHelp(cout, opts);
return false;
}
if (err.is_errored)
{
if (!warnUnknowParameter)
{
/* error report has already been printed on stderr */
return false;
}
}
g_verbosity = MsgLevel( m_verbosity );
/*
* Set any derived parameters
*/
#if EXTENSION_360_VIDEO
Yang Wang
committed
m_inputFileWidth = m_sourceWidth;
m_inputFileHeight = m_sourceHeight;

Karsten Suehring
committed
m_ext360.setMaxCUInfo(m_uiCTUSize, 1 << MIN_CU_LOG2);
#endif
if (!inputPathPrefix.empty() && inputPathPrefix.back() != '/' && inputPathPrefix.back() != '\\' )
{
inputPathPrefix += "/";
}
m_inputFileName = inputPathPrefix + m_inputFileName;
if( m_temporalSubsampleRatio < 1)
{
EXIT ( "Error: TemporalSubsampleRatio must be greater than 0" );
}

Karsten Suehring
committed
m_framesToBeEncoded = ( m_framesToBeEncoded + m_temporalSubsampleRatio - 1 ) / m_temporalSubsampleRatio;
m_adIntraLambdaModifier = cfg_adIntraLambdaModifier.values;
if(m_isField)
{
//Frame height
m_iSourceHeightOrg = m_sourceHeight;

Karsten Suehring
committed
//Field height
m_sourceHeight = m_sourceHeight >> 1;

Karsten Suehring
committed
//number of fields to encode
m_framesToBeEncoded *= 2;
}
Kui Fan
committed
if ( m_subPicInfoPresentFlag )
CHECK( m_numSubPics > MAX_NUM_SUB_PICS || m_numSubPics < 1, "Number of subpicture must be within 1 to 2^16" )
if (!m_subPicSameSizeFlag)
{
CHECK(cfg_subPicCtuTopLeftX.values.size() != m_numSubPics, "Number of SubPicCtuTopLeftX values must be equal to NumSubPics");
CHECK(cfg_subPicCtuTopLeftY.values.size() != m_numSubPics, "Number of SubPicCtuTopLeftY values must be equal to NumSubPics");
CHECK(cfg_subPicWidth.values.size() != m_numSubPics, "Number of SubPicWidth values must be equal to NumSubPics");
CHECK(cfg_subPicHeight.values.size() != m_numSubPics, "Number of SubPicHeight values must be equal to NumSubPics");
}
else
{
CHECK(cfg_subPicCtuTopLeftX.values.size() != 0, "Number of SubPicCtuTopLeftX values must be equal to 0");
CHECK(cfg_subPicCtuTopLeftY.values.size() != 0, "Number of SubPicCtuTopLeftY values must be equal to 0");
CHECK(cfg_subPicWidth.values.size() != 1, "Number of SubPicWidth values must be equal to 1");
CHECK(cfg_subPicHeight.values.size() != 1, "Number of SubPicHeight values must be equal to 1");
}
CHECK( cfg_subPicTreatedAsPicFlag.values.size() != m_numSubPics, "Number of SubPicTreatedAsPicFlag values must be equal to NumSubPics");
CHECK( cfg_loopFilterAcrossSubpicEnabledFlag.values.size() != m_numSubPics, "Number of LoopFilterAcrossSubpicEnabledFlag values must be equal to NumSubPics");
if (m_subPicIdMappingExplicitlySignalledFlag)
{
CHECK( cfg_subPicId.values.size() != m_numSubPics, "Number of SubPicId values must be equal to NumSubPics");
}
m_subPicCtuTopLeftX = cfg_subPicCtuTopLeftX.values;
m_subPicCtuTopLeftY = cfg_subPicCtuTopLeftY.values;
m_subPicWidth = cfg_subPicWidth.values;
m_subPicHeight = cfg_subPicHeight.values;
m_subPicTreatedAsPicFlag = cfg_subPicTreatedAsPicFlag.values;
m_loopFilterAcrossSubpicEnabledFlag = cfg_loopFilterAcrossSubpicEnabledFlag.values;
if (m_subPicIdMappingExplicitlySignalledFlag)
LI JINGYA
committed
{
for (int i=0; i < m_numSubPics; i++)
{
m_subPicId[i] = cfg_subPicId.values[i];
}
uint32_t tmpWidthVal = (m_sourceWidth + m_uiCTUSize - 1) / m_uiCTUSize;
uint32_t tmpHeightVal = (m_sourceHeight + m_uiCTUSize - 1) / m_uiCTUSize;
if (!m_subPicSameSizeFlag)
{
for (int i = 0; i < m_numSubPics; i++)
{
CHECK(m_subPicCtuTopLeftX[i] + m_subPicWidth[i] > tmpWidthVal, "Subpicture must not exceed picture boundary");
CHECK(m_subPicCtuTopLeftY[i] + m_subPicHeight[i] > tmpHeightVal, "Subpicture must not exceed picture boundary");
}
}
else
{
uint32_t numSubpicCols = tmpWidthVal / m_subPicWidth[0];
Martin Pettersson
committed
CHECK(tmpWidthVal % m_subPicWidth[0] != 0, "sps_subpic_width_minus1[0] is invalid.");
CHECK(tmpHeightVal % m_subPicHeight[0] != 0, "sps_subpic_height_minus1[0] is invalid.");
CHECK(numSubpicCols * (tmpHeightVal / m_subPicHeight[0]) != m_numSubPics, "when sps_subpic_same_size_flag is equal to, sps_num_subpics_minus1 is invalid");
}
// automatically determine subpicture ID lenght in case it is not specified
if (m_subPicIdLen == 0)
LI JINGYA
committed
{
if (m_subPicIdMappingExplicitlySignalledFlag)
{
// use the heighest specified ID
auto maxIdVal = std::max_element(m_subPicId.begin(),m_subPicId.end());
m_subPicIdLen = ceilLog2(*maxIdVal);
}
else
LI JINGYA
committed
{
// use the number of subpictures
m_subPicIdLen = ceilLog2(m_numSubPics);
CHECK( m_subPicIdLen > 16, "SubPicIdLen must not exceed 16 bits" );
CHECK(m_resChangeInClvsEnabled, "resolution change in CLVS and subpictures cannot be enabled together");
if (m_virtualBoundariesPresentFlag)
{
CHECK(m_numVerVirtualBoundaries != 0, "The number of vertical virtual boundaries shall be 0 when the picture width is less than or equal to 8");
CHECK(m_numHorVirtualBoundaries != 0, "The number of horizontal virtual boundaries shall be 0 when the picture height is less than or equal to 8");
}
if (m_cfgSubpictureLevelInfoSEI.m_enabled)
{
CHECK (m_numSubPics != m_cfgSubpictureLevelInfoSEI.m_numSubpictures, "NumSubPics must be equal to SEISubpicLevelInfoNumSubpics" );
CHECK (m_cfgSubpictureLevelInfoSEI.m_sliMaxSublayers != m_maxSublayers, "SEISubpicLevelInfoMaxSublayers must be equal to vps_max_sublayers");
if (m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag)
{
CHECK(cfg_sliRefLevels.values.size() < m_maxSublayers, "when sliSublayerInfoPresentFlag = 1, the number of reference levels must be greater than or equal to sublayers");
}
if (m_cfgSubpictureLevelInfoSEI.m_explicitFraction)
{
m_cfgSubpictureLevelInfoSEI.m_fractions = cfg_sliFractions.values;
m_cfgSubpictureLevelInfoSEI.m_refLevels = cfg_sliRefLevels.values;
if (m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag)
{
CHECK((int)cfg_sliRefLevels.values.size() / m_maxSublayers * m_cfgSubpictureLevelInfoSEI.m_numSubpictures * m_cfgSubpictureLevelInfoSEI.m_sliMaxSublayers != cfg_sliFractions.values.size(),
"when sliSublayerInfoPresentFlag = 1, the number of subpicture level fractions must be equal to the numer of subpictures times the number of reference levels times the number of sublayers");
}
else
{
CHECK((int)cfg_sliRefLevels.values.size() * m_cfgSubpictureLevelInfoSEI.m_numSubpictures != cfg_sliFractions.values.size(), "when sliSublayerInfoPresentFlag = 0, the number of subpicture level fractions must be equal to the numer of subpictures times the number of reference levels");
}
}
m_cfgSubpictureLevelInfoSEI.m_nonSubpicLayersFraction = cfg_sliNonSubpicLayersFractions.values;
if (m_cfgSubpictureLevelInfoSEI.m_sliSublayerInfoPresentFlag)
{
CHECK((int)cfg_sliNonSubpicLayersFractions.values.size() != ( cfg_sliRefLevels.values.size() * m_cfgSubpictureLevelInfoSEI.m_numSubpictures ),
"when sliSublayerInfoPresentFlag = 1, the number of non-subpicture level fractions must be equal to the numer of reference levels times the number of sublayers");
}
else
{
CHECK((int)cfg_sliNonSubpicLayersFractions.values.size() != ( cfg_sliRefLevels.values.size() ),
"when sliSublayerInfoPresentFlag = 0, the number of non-subpicture level fractions must be equal to the numer of reference levels");
}
}
if (m_costMode != COST_LOSSLESS_CODING && m_mixedLossyLossless)
m_mixedLossyLossless = 0;
msg(WARNING, "*************************************************************************\n");
msg(WARNING, "* Mixed lossy lossles coding cannot enable in lossy costMode *\n");
msg(WARNING, "* Forcely disabled m_mixedLossyLossless *\n");
msg(WARNING, "*************************************************************************\n");
if (!m_mixedLossyLossless && cfgSliceLosslessArray.values.size() > 0)
msg(WARNING, "*************************************************************************\n");
msg(WARNING, "* Mixed lossy lossles coding is not enabled *\n");
msg(WARNING, "* ignoring the value of SliceLosslessArray *\n");
msg(WARNING, "*************************************************************************\n");
}
if (m_costMode == COST_LOSSLESS_CODING && m_mixedLossyLossless)
{
m_sliceLosslessArray.resize(cfgSliceLosslessArray.values.size());
for (uint32_t i = 0; i < cfgSliceLosslessArray.values.size(); i++)
{
m_sliceLosslessArray[i] = cfgSliceLosslessArray.values[i];
}
}
if( m_picPartitionFlag )
{
// store tile column widths
m_tileColumnWidth.resize(cfgTileColumnWidth.values.size());
for(uint32_t i=0; i<cfgTileColumnWidth.values.size(); i++)
{
m_tileColumnWidth[i]=cfgTileColumnWidth.values[i];
}
// store tile row heights
m_tileRowHeight.resize(cfgTileRowHeight.values.size());
for(uint32_t i=0; i<cfgTileRowHeight.values.size(); i++)
{
m_tileRowHeight[i]=cfgTileRowHeight.values[i];
}
// store rectangular slice positions
if( !m_rasterSliceFlag )
{
m_rectSlicePos.resize(cfgRectSlicePos.values.size());
for(uint32_t i=0; i<cfgRectSlicePos.values.size(); i++)
{
m_rectSlicePos[i]=cfgRectSlicePos.values[i];
}
}
// store raster-scan slice sizes
{
m_rasterSliceSize.resize(cfgRasterSliceSize.values.size());
for(uint32_t i=0; i<cfgRasterSliceSize.values.size(); i++)
{
m_rasterSliceSize[i]=cfgRasterSliceSize.values[i];
}
}
}
{
m_tileColumnWidth.clear();
m_tileRowHeight.clear();
m_rectSlicePos.clear();
m_rasterSliceSize.clear();
m_rectSliceFixedWidth = 0;
m_rectSliceFixedHeight = 0;
}
m_numSubProfile = (uint8_t) cfg_SubProfile.values.size();
m_subProfile.resize(m_numSubProfile);
for (uint8_t i = 0; i < m_numSubProfile; ++i)
{
m_subProfile[i] = cfg_SubProfile.values[i];
}

Karsten Suehring
committed
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
/* rules for input, output and internal bitdepths as per help text */
if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0)
{
m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_inputBitDepth [CHANNEL_TYPE_LUMA ];
}
if (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0)
{
m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ];
}
if (m_internalBitDepth [CHANNEL_TYPE_LUMA ] == 0)
{
m_internalBitDepth [CHANNEL_TYPE_LUMA ] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ];
}
m_internalBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_LUMA ];
if (m_inputBitDepth [CHANNEL_TYPE_CHROMA] == 0)
{
m_inputBitDepth [CHANNEL_TYPE_CHROMA] = m_inputBitDepth [CHANNEL_TYPE_LUMA ];
}
if (m_outputBitDepth [CHANNEL_TYPE_LUMA ] == 0)
{
m_outputBitDepth [CHANNEL_TYPE_LUMA ] = m_internalBitDepth [CHANNEL_TYPE_LUMA ];
}
if (m_outputBitDepth [CHANNEL_TYPE_CHROMA] == 0)
{
m_outputBitDepth [CHANNEL_TYPE_CHROMA] = m_outputBitDepth [CHANNEL_TYPE_LUMA ];
}

Karsten Suehring
committed
m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
#if EXTENSION_360_VIDEO
m_ext360.processOptions(ext360CfgContext);
#endif
CHECK( !( tmpWeightedPredictionMethod >= 0 && tmpWeightedPredictionMethod <= WP_PER_PICTURE_WITH_HISTOGRAM_AND_PER_COMPONENT_AND_CLIPPING_AND_EXTENSION ), "Error in cfg" );
m_weightedPredictionMethod = WeightedPredictionMethod(tmpWeightedPredictionMethod);
CHECK( tmpFastInterSearchMode<0 || tmpFastInterSearchMode>FASTINTERSEARCH_MODE3, "Error in cfg" );
m_fastInterSearchMode = FastInterSearchMode(tmpFastInterSearchMode);
CHECK( tmpMotionEstimationSearchMethod < 0 || tmpMotionEstimationSearchMethod >= MESEARCH_NUMBER_OF_METHODS, "Error in cfg" );
m_motionEstimationSearchMethod=MESearchMethod(tmpMotionEstimationSearchMethod);
if (extendedProfile == ExtendedProfileName::AUTO)
{
if (xAutoDetermineProfile())
{
EXIT( "Unable to determine profile from configured settings");
}
}

Karsten Suehring
committed
else
{
switch (extendedProfile)
{
case ExtendedProfileName::NONE: m_profile = Profile::NONE; break;
case ExtendedProfileName::MAIN_10: m_profile = Profile::MAIN_10; break;
case ExtendedProfileName::MAIN_10_444: m_profile = Profile::MAIN_10_444; break;
case ExtendedProfileName::MAIN_10_STILL_PICTURE: m_profile = Profile::MAIN_10_STILL_PICTURE; break;
case ExtendedProfileName::MAIN_10_444_STILL_PICTURE: m_profile = Profile::MAIN_10_444_STILL_PICTURE; break;
case ExtendedProfileName::MULTILAYER_MAIN_10: m_profile = Profile::MULTILAYER_MAIN_10; break;
case ExtendedProfileName::MULTILAYER_MAIN_10_444: m_profile = Profile::MULTILAYER_MAIN_10_444; break;
case ExtendedProfileName::MULTILAYER_MAIN_10_STILL_PICTURE:
m_profile = Profile::MULTILAYER_MAIN_10_STILL_PICTURE;
break;
case ExtendedProfileName::MULTILAYER_MAIN_10_444_STILL_PICTURE:
m_profile = Profile::MULTILAYER_MAIN_10_444_STILL_PICTURE;
break;
default: EXIT("Unable to determine profile from configured settings"); break;

Karsten Suehring
committed
}
{
m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? m_chromaFormatIDC : numberToChromaFormat(tmpConstraintChromaFormat);
if (m_bitDepthConstraint == 0)
{
if (m_profile != Profile::NONE)
{
const ProfileFeatures *features = ProfileFeatures::getProfileFeatures(m_profile);
CHECK(features->profile != m_profile, "Profile not found");
m_bitDepthConstraint = features->maxBitDepth;
}
else // m_profile == Profile::NONE
{
m_bitDepthConstraint = 16; // max value - unconstrained.