1# New Input File Format is as follows 2# <ParameterName> = <ParameterValue> # Comment 3# 4# See configfile.h for a list of supported ParameterNames 5# 6# For bug reporting and known issues see: 7# https://ipbt.hhi.fraunhofer.de 8 9 10########################################################################################## 11# Files 12########################################################################################## 13InputFile = "D:\origCfP\BQSquare_416x240_60.yuv" # Input sequence 14InputHeaderLength = 0 # If the inputfile has a header, state it's length in byte here 15StartFrame = 0 # Start frame for encoding. (0-N) 16FramesToBeEncoded = 30 # Number of frames to be coded 17FrameRate = 60.0 # Frame Rate per second (0.1-100.0) 18Enable32Pulldown = 0 # Enable 'hard' 3:2 pulldown (modifying the inpur data) 19 # 0 = disabled 20 # 1 = A, B, Bt|Cb, Ct|Db, D 21 # 2 = A, B, C, Ct|Db, D 22SEIVUI32Pulldown = 0 # Enable 3:2 pulldown through VUI and SEI metadata signaling. Five methods are supported: 23 # 0 = disabled 24 # 1 = A, Bt|Bb, Bt|Cb, Ct|Cb, D 25 # 2 = A, B, C, C, D 26 # 3 = At|Ab, Bt|Bb, Bt|Cb, Ct|Cb, Dt|Db 27 # 4 = A, Bt|Bb, Bt|Cb, Ct|Db, Dt|Db 28 # 5 = At|Ab, Bt|Bb, Bt|Cb, Ct|Db, Dt|Db 29 30SourceWidth = 416 # Source frame width 31SourceHeight = 240 # Source frame height 32SourceResize = 0 # Resize source size for output 33OutputWidth = 416 # Output frame width 34OutputHeight = 240 # Output frame height 35ProcessInput = 0 # Filter Input Sequence 36Interleaved = 0 # 0: Planar input, 1: Packed input 37StandardRange = 0 # 0: Standard range 1: Full range (RGB input) 38VideoCode = 1 # Video codes for RGB ==> YUV conversions 39 # 0 = NULL, 40 # 1 = ITU_REC709, 41 # 2 = CCIR_601, 42 # 3 = FCC, 43 # 4 = ITU_REC624BG, 44 # 5 = SMPTE_170M, 45 # 6 = SMPTE_240M, 46 # 7 = SMPTE_260M, 47 # 8 = ITU_REC709_EXACT 48 49TraceFile = "" # Trace file 50ReconFile = "test_rec.yuv" # Reconstruction YUV file 51OutputFile = "test.264" # Bitstream 52StatsFile = "" # Coding statistics file 53 54NumberOfViews = 1 # Number of views to encode (1=1 view, 2=2 views) 55View1ConfigFile = "encoder_view1.cfg" # Config file name for second view 56########################################################################################## 57# Encoder Control 58########################################################################################## 59Grayscale = 0 # Encode in grayscale (Currently only works for 8 bit YUV 420 input) 60ProfileIDC = 100 # Profile IDC (66=baseline, 77=main, 88=extended; FREXT Profiles: 100=High, 110=High 10, 122=High 4:2:2, 244=High 4:4:4, 44=CAVLC 4:4:4 Intra, 118=Multiview High Profile, 128=Stereo High Profile) 61IntraProfile = 0 # Activate Intra Profile for FRExt (0: false, 1: true) 62 # (e.g. ProfileIDC=110, IntraProfile=1 => High 10 Intra Profile) 63LevelIDC = 51 # Level IDC (e.g. 20 = level 2.0) 64 65IntraPeriod = 1 # Period of I-pictures (0=only first) 66IDRPeriod = 1 # Period of IDR pictures (0=only first) 67AdaptiveIntraPeriod = 0 # Adaptive intra period 68AdaptiveIDRPeriod = 0 # Adaptive IDR period 69IntraDelay = 0 # Intra (IDR) picture delay (i.e. coding structure of PPIPPP... ) 70EnableIDRGOP = 0 # Support for IDR closed GOPs (0: disabled, 1: enabled) 71EnableOpenGOP = 0 # Support for open GOPs (0: disabled, 1: enabled) 72QPISlice = 32 # Quant. param for I Slices (0-51) 73QPPSlice = 33 # Quant. param for P Slices (0-51) 74FrameSkip = 0 # Number of frames to be skipped in input (e.g 2 will code every third frame). 75 # Note that this now excludes intermediate (i.e. B) coded pictures 76ChromaQPOffset = 0 # Chroma QP offset (-51..51) 77 78DisableSubpelME = 0 # Disable Subpixel Motion Estimation (0=off/default, 1=on) 79SearchRange = 128 # Max search range 80 81MEDistortionFPel = 0 # Select error metric for Full-Pel ME (0: SAD, 1: SSE, 2: Hadamard SAD) 82MEDistortionHPel = 2 # Select error metric for Half-Pel ME (0: SAD, 1: SSE, 2: Hadamard SAD) 83MEDistortionQPel = 2 # Select error metric for Quarter-Pel ME (0: SAD, 1: SSE, 2: Hadamard SAD) 84MDDistortion = 2 # Select error metric for Mode Decision (0: SAD, 1: SSE, 2: Hadamard SAD) 85SkipDeBlockNonRef = 0 # Skip Deblocking (regardless of DFParametersFlag) for non-reference frames (0: off, 1: on) 86ChromaMCBuffer = 1 # Calculate Color component interpolated values in advance and store them. 87 # Provides a trade-off between memory and computational complexity 88 # (0: disabled/default, 1: enabled) 89ChromaMEEnable = 0 # Take into account Color component information during ME 90 # (0: only first component/default, 91 # 1: All Color components - Integer refinement only 92 # 2: All Color components - All refinements) 93ChromaMEWeight = 1 # Weighting for chroma components. This parameter should have a relationship with color format. 94 95NumberReferenceFrames = 4 # Number of previous frames used for inter motion search (0-16) 96 97PList0References = 0 # P slice List 0 reference override (0 disable, N <= NumberReferenceFrames) 98Log2MaxFNumMinus4 = 0 # Sets log2_max_frame_num_minus4 (-1 : based on FramesToBeEncoded/Auto, >=0 : Log2MaxFNumMinus4) 99Log2MaxPOCLsbMinus4 = -1 # Sets log2_max_pic_order_cnt_lsb_minus4 (-1 : Auto, >=0 : Log2MaxPOCLsbMinus4) 100 101GenerateMultiplePPS = 1 # Transmit multiple parameter sets. Currently parameters basically enable all WP modes (0: diabled, 1: enabled) 102SendAUD = 0 # Send Access Delimiter Unit NALU (for every access unit) 103ResendSPS = 0 # Resend SPS (0: disabled, 1: all Intra pictures, 2: only for IDR, 3: for IDR and OpenGOP I) 104ResendPPS = 0 # Resend PPS (with pic_parameter_set_id 0) for every coded Frame/Field pair (0: disabled, 1: enabled) 105 106MbLineIntraUpdate = 0 # Error robustness(extra intra macro block updates)(0=off, N: One GOB every N frames are intra coded) 107RandomIntraMBRefresh = 0 # Forced intra MBs per picture 108 109########################################################################################## 110# PSlice Mode types 111########################################################################################## 112PSliceSkip = 1 # P-Slice Skip mode consideration (0=disable, 1=enable) 113PSliceSearch16x16 = 1 # P-Slice Inter block search 16x16 (0=disable, 1=enable) 114PSliceSearch16x8 = 1 # P-Slice Inter block search 16x8 (0=disable, 1=enable) 115PSliceSearch8x16 = 1 # P-Slice Inter block search 8x16 (0=disable, 1=enable) 116PSliceSearch8x8 = 1 # P-Slice Inter block search 8x8 (0=disable, 1=enable) 117PSliceSearch8x4 = 1 # P-Slice Inter block search 8x4 (0=disable, 1=enable) 118PSliceSearch4x8 = 1 # P-Slice Inter block search 4x8 (0=disable, 1=enable) 119PSliceSearch4x4 = 1 # P-Slice Inter block search 4x4 (0=disable, 1=enable) 120 121########################################################################################## 122# BSlice Mode types 123########################################################################################## 124 125BSliceDirect = 1 # B-Slice Skip mode consideration (0=disable, 1=enable) 126BSliceSearch16x16 = 1 # B-Slice Inter block search 16x16 (0=disable, 1=enable) 127BSliceSearch16x8 = 1 # B-Slice Inter block search 16x8 (0=disable, 1=enable) 128BSliceSearch8x16 = 1 # B-Slice Inter block search 8x16 (0=disable, 1=enable) 129BSliceSearch8x8 = 1 # B-Slice Inter block search 8x8 (0=disable, 1=enable) 130BSliceSearch8x4 = 1 # B-Slice Inter block search 8x4 (0=disable, 1=enable) 131BSliceSearch4x8 = 1 # B-Slice Inter block search 4x8 (0=disable, 1=enable) 132BSliceSearch4x4 = 1 # B-Slice Inter block search 4x4 (0=disable, 1=enable) 133 134BiPredSearch16x16 = 1 # B-Slice Bi-prediction block search 16x16 (0=disable, 1=enable) 135BiPredSearch16x8 = 1 # B-Slice Bi-prediction block search 16x8 (0=disable, 1=enable) 136BiPredSearch8x16 = 1 # B-Slice Bi-prediction block search 8x16 (0=disable, 1=enable) 137BiPredSearch8x8 = 0 # B-Slice Bi-prediction block search 8x8 (0=disable, 1=enable) 138 139DisableIntra4x4 = 0 # Disable Intra 4x4 modes 140DisableIntra16x16 = 0 # Disable Intra 16x16 modes 141DisableIntraInInter = 0 # Disable Intra modes for inter slices 142IntraDisableInterOnly = 0 # Apply Disabling Intra conditions only to Inter Slices (0:disable/default,1: enable) 143Intra4x4ParDisable = 0 # Disable Vertical & Horizontal 4x4 144Intra4x4DiagDisable = 0 # Disable Diagonal 45degree 4x4 145Intra4x4DirDisable = 0 # Disable Other Diagonal 4x4 146Intra16x16ParDisable = 0 # Disable Vertical & Horizontal 16x16 147Intra16x16PlaneDisable = 0 # Disable Planar 16x16 148ChromaIntraDisable = 0 # Disable Intra Chroma modes other than DC 149EnableIPCM = 1 # Enable IPCM macroblock mode 150 151DisposableP = 0 # Enable Disposable P slices in the primary layer (0: disable/default, 1: enable) 152DispPQPOffset = 0 # Quantizer offset for disposable P slices (0: default) 153 154PreferDispOrder = 1 # Prefer display order when building the prediction structure as opposed to coding order (affects intra and IDR periodic insertion, among others) 155PreferPowerOfTwo = 0 # Prefer prediction structures that have lengths expressed as powers of two 156FrmStructBufferLength = 16 # Length of the frame structure unit buffer; it can be overriden for certain cases 157 158ChangeQPFrame = 0 # Frame in display order from which to apply the Change QP offsets 159ChangeQPI = 0 # Change QP offset value for I_SLICE 160ChangeQPP = 0 # Change QP offset value for P_SLICE 161ChangeQPB = 0 # Change QP offset value for B_SLICE 162ChangeQPSI = 0 # Change QP offset value for SI_SLICE 163ChangeQPSP = 0 # Change QP offset value for SP_SLICE 164 165########################################################################################## 166# B Slices 167########################################################################################## 168 169NumberBFrames = 0 # Number of B coded frames inserted (0=not used) 170PReplaceBSlice = 0 # Replace B-coded slices with P-coded slices when NumberBFrames>0 171QPBSlice = 33 # Quant. param for B slices (0-51) 172BRefPicQPOffset = 0 # Quantization offset for reference B coded pictures (-51..51) 173DirectModeType = 1 # Direct Mode Type (0:Temporal 1:Spatial) 174DirectInferenceFlag = 1 # Direct Inference Flag (0: Disable 1: Enable) 175BList0References = 4 # B slice List 0 reference override (0 disable, N <= NumberReferenceFrames) 176BList1References = 4 # B slice List 1 reference override (0 disable, N <= NumberReferenceFrames) 177 # 1 List1 reference is usually recommended for normal GOP Structures. 178 # A larger value is usually more appropriate if a more flexible 179 # structure is used (i.e. using HierarchicalCoding) 180 181BReferencePictures = 2 # Referenced B coded pictures (0=off, 1=B references for secondary layer, 2=B references for primary layer) 182 183HierarchicalCoding = 0 # B hierarchical coding (0= off, 1= 2 layers, 2= 2 full hierarchy, 3 = explicit) 184HierarchyLevelQPEnable = 0 # Adjust QP based on hierarchy level (in increments of 1). Overrides BRefPicQPOffset behavior.(0=off, 1=on) 185ExplicitHierarchyFormat = "B0r2B1r3B2r2" # Explicit Enhancement GOP. Format is {FrameDisplay_orderReferenceQP}. 186 # Valid values for reference type is r:reference, e:non reference. 187ExplicitSeqCoding = 0 # Enable support for explicit sequence coding 188ExplicitSeqFile = "explicit_seq.cfg" 189LowDelay = 1 # Apply HierarchicalCoding without delay (i.e., encode in the captured/display order) 190ReferenceReorder = 0 # Reorder References according to Poc distance for HierarchicalCoding (0=off, 1=enable, 2=use when LowDelay is set) 191PocMemoryManagement = 0 # Memory management based on Poc Distances for HierarchicalCoding (0=off, 1=on, 2=use when LowDelay is set) 192SetFirstAsLongTerm = 0 # Set first frame as long term 193 194BiPredMotionEstimation = 1 # Enable Bipredictive based Motion Estimation (0:disabled, 1:enabled) 195BiPredMERefinements = 3 # Bipredictive ME extra refinements (0: single, N: N extra refinements (1 default) 196BiPredMESearchRange = 64 # Bipredictive ME Search range (8 default). Note that range is halved for every extra refinement. 197BiPredMESubPel = 2 # Bipredictive ME Subpixel Consideration (0: disabled, 1: single level, 2: dual level) 198 199########################################################################################## 200# HM like coding structures 201########################################################################################## 202BLevel0MoreRef = 0 # 0: Use the same number of reference pictures as the other B pictures 203 # 1: Use more reference frame pictures for B pictures at level 0 204BIdenticalList = 0 # 0: not used; 1: used for B pictures at level 0; 2: used for all B pictures 205 # 1 and 2 need to set ReferenceReorder to 1 206CRA = 0 # 0: do not use CRA like random access support; 1 use CRA like random access support 207 # only used for random access cases, LowDelay != 1 208HM50RefStructure = 0 # 0: do not use HM-5.0 like referencing structure; 1 use HM-5.0 like referencing structure for random access 209LDRefSetting = 0 # 0: use nearest pictures as reference frames 210 # 1: use one nearest + POC%4==0 pictures as reference frames, as JCTVC-F701 211 # Only low delay is support, please do not use it for other coding structure 212 213########################################################################################## 214# SP Frames 215########################################################################################## 216 217SPPicturePeriodicity = 0 # SP-Picture Periodicity (0=not used) 218SPSwitchPeriod = 0 # Switch period (in terms of switching SP/SI frames) between bitstream 1 and bitstream 2 219QPSPSlice = 36 # Quant. param of SP-Slices for Prediction Error (0-51) 220QPSISlice = 36 # Quant. param of SI-Slices for Prediction Error (0-51) 221QPSP2Slice = 35 # Quant. param of SP/SI-Slices for Predicted Blocks (0-51) 222SI_FRAMES = 0 # SI frame encoding flag (0=not used, 1=used) 223SP_output = 0 # Controls whether coefficients will be output to encode switching SP frames (0=no, 1=yes) 224SP_output_name = "low_quality.dat" # Filename for SP output coefficients 225SP2_FRAMES = 0 # switching SP frame encoding flag (0=not used, 1=used) 226SP2_input_name1 = "high_quality.dat" # Filename for the first swithed bitstream coefficients 227SP2_input_name2 = "low_quality.dat" # Filename for the second switched bitstream coefficients 228 229########################################################################################## 230# Output Control, NALs 231########################################################################################## 232 233SymbolMode = 1 # Symbol mode (Entropy coding method: 0=UVLC, 1=CABAC) 234OutFileMode = 0 # Output file mode, 0:Annex B, 1:RTP 235PartitionMode = 0 # Partition Mode, 0: no DP, 1: 3 Partitions per Slice 236 237########################################################################################## 238# CABAC context initialization 239########################################################################################## 240 241ContextInitMethod = 1 # Context init (0: fixed, 1: adaptive) 242FixedModelNumber = 0 # model number for fixed decision for inter slices ( 0, 1, or 2 ) 243 244########################################################################################## 245# Interlace Handling 246######################################################################################### 247 248PicInterlace = 0 # Picture AFF (0: frame coding, 1: field coding, 2:adaptive frame/field coding) 249MbInterlace = 0 # Macroblock AFF (0: frame coding, 1: field coding, 2:adaptive frame/field coding, 3: frame MB-only AFF) 250IntraBottom = 0 # Force Intra Bottom at GOP Period 251 252########################################################################################## 253# Weighted Prediction 254######################################################################################### 255 256WeightedPrediction = 1 # P picture Weighted Prediction (0=off, 1=explicit mode) 257WeightedBiprediction = 1 # B picture Weighted Prediciton (0=off, 1=explicit mode, 2=implicit mode) 258ChromaWeightSupport = 1 # Enable consideration of weights for Chroma components 259UseWeightedReferenceME = 1 # Use weighted reference for ME (0=off, 1=on) 260WPMethod = 1 # WP method (0: DC based, 1: LMS based) 261WPIterMC = 0 # Iterative Motion compensated based weighted prediction method 262EnhancedBWeightSupport = 0 # Enhanced B Weight support (needs revisit if we wish to merge with WPMethod) 263WPMCPrecision = 0 # Improved Motion Compensation Precision using WP based methods. 264 # Clones WP references with slightly modified rounding offsets (Requires RDPictureDecision and GenerateMultiplePPS) : 265 # 0: disabled (default) 266 # 1: Up to one additional coding pass. Ref0 is 0, ref1 is 0 with a -1 offset 267 # 2: Up to two additional coding passes. (1) Ref0 is 0, ref1 is 0 with a -1 offset, (1) Ref0 is 0 with a -1 offset, ref1 is 0 268WPMCPrecFullRef = 0 # Increases the number of references in the reference picture lists to account 269 # for the lost reference slot when reordering is used during a coding pass in WPMCPrecision for reference replication. 270 # The number of references in non-reordered passes stays unchanged 271WPMCPrecBSlice = 1 # 2: Apply rounding on every B slice. This efectively disables the evaluation of alternative QPs during RDPictureDecision. 272 # 1: Disable rounding for non-reference B slices. Non-reference B slices are evaluated for alternative QPs during RDPictureDecision. 273 # 0: Disable rounding for B slices. 274 275########################################################################################## 276# Picture based Multi-pass encoding 277######################################################################################### 278 279RDPictureDecision = 1 # Perform multiple pass coding and make RD optimal decision among them 280RDPSliceBTest = 0 # Perform Slice level RD decision between P and B slices. 281RDPSliceITest = 1 # Perform Slice level RD decision between P and I slices. Default value is 1 (enabled). 282RDPictureMaxPassISlice = 1 # Max number of coding passes for I slices, valid values [1,3], default is 1 283RDPictureMaxPassPSlice = 2 # Max number of coding passes for P slices, valid values [1,6], default is 2 284RDPictureMaxPassBSlice = 3 # Max number of coding passes for B slices, valid values [1,6], default is 3 285RDPictureFrameQPPSlice = 0 # Perform additional frame level QP check (QP+/-1) for P slices, 0: disabled (default), 1: enabled 286RDPictureFrameQPBSlice = 0 # Perform additional frame level QP check (QP+/-1) for B slices, 0: disabled, 1: enabled (default) 287RDPictureDeblocking = 0 # Perform another coding pass to check non-deblocked picture, 0: disabled (default), 1: enabled 288RDPictureDirectMode = 0 # Perform another coding pass to check the alternative direct mode for B slices, , 0: disabled (default), 1: enabled 289 290########################################################################################## 291# Deblocking filter parameters 292########################################################################################## 293 294DFParametersFlag = 0 # Configure deblocking filter (0=parameters below ignored, 1=parameters sent) 295 # Note that for pictures with multiple slice types, 296 # only the type of the first slice will be considered. 297DFDisableRefISlice = 0 # Disable deblocking filter in reference I coded pictures (0=Filter, 1=No Filter). 298DFAlphaRefISlice = 0 # Reference I coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6} 299DFBetaRefISlice = 0 # Reference I coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6} 300DFDisableNRefISlice = 0 # Disable deblocking filter in non reference I coded pictures (0=Filter, 1=No Filter). 301DFAlphaNRefISlice = 0 # Non Reference I coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6} 302DFBetaNRefISlice = 0 # Non Reference I coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6} 303DFDisableRefPSlice = 0 # Disable deblocking filter in reference P coded pictures (0=Filter, 1=No Filter). 304DFAlphaRefPSlice = 0 # Reference P coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6} 305DFBetaRefPSlice = 0 # Reference P coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6} 306DFDisableNRefPSlice = 0 # Disable deblocking filter in non reference P coded pictures (0=Filter, 1=No Filter). 307DFAlphaNRefPSlice = 0 # Non Reference P coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6} 308DFBetaNRefPSlice = 0 # Non Reference P coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6} 309DFDisableRefBSlice = 0 # Disable deblocking filter in reference B coded pictures (0=Filter, 1=No Filter). 310DFAlphaRefBSlice = 0 # Reference B coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6} 311DFBetaRefBSlice = 0 # Reference B coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6} 312DFDisableNRefBSlice = 0 # Disable deblocking filter in non reference B coded pictures (0=Filter, 1=No Filter). 313DFAlphaNRefBSlice = 0 # Non Reference B coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6} 314DFBetaNRefBSlice = 0 # Non Reference B coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6} 315 316########################################################################################## 317# Error Resilience / Slices 318########################################################################################## 319 320SliceMode = 0 # Slice mode (0=off 1=fixed #mb in slice 2=fixed #bytes in slice 3=use callback) 321SliceArgument = 50 # Slice argument (Arguments to modes 1 and 2 above) 322 323num_slice_groups_minus1 = 0 # Number of Slice Groups Minus 1, 0 == no FMO, 1 == two slice groups, etc. 324slice_group_map_type = 0 # 0: Interleave, 1: Dispersed, 2: Foreground with left-over, 325 # 3: Box-out, 4: Raster Scan 5: Wipe 326 # 6: Explicit, slice_group_id read from SliceGroupConfigFileName 327slice_group_change_direction_flag = 0 # 0: box-out clockwise, raster scan or wipe right, 328 # 1: box-out counter clockwise, reverse raster scan or wipe left 329slice_group_change_rate_minus1 = 85 # 330SliceGroupConfigFileName = "sg0conf.cfg" # Used for slice_group_map_type 0, 2, 6 331 332UseRedundantPicture = 0 # 0: not used, 1: enabled 333NumRedundantHierarchy = 1 # 0-4 334PrimaryGOPLength = 10 # GOP length for redundant allocation (1-16) 335 # NumberReferenceFrames must be no less than PrimaryGOPLength when redundant slice enabled 336NumRefPrimary = 1 # Actually used number of references for primary slices (1-16) 337 338########################################################################################## 339# Search Range Restriction / RD Optimization 340########################################################################################## 341 342RestrictSearchRange = 2 # restriction for (0: blocks and ref, 1: ref, 2: no restrictions) 343RDOptimization = 1 # rd-optimized mode decision 344 # 0: RD-off (Low complexity mode) 345 # 1: RD-on (High complexity mode) 346 # 2: RD-on (Fast high complexity mode - not work in FREX Profiles) 347 # 3: with losses 348I16RDOpt = 0 # perform rd-optimized mode decision for Intra 16x16 MB 349 # 0: SAD-based mode decision for Intra 16x16 MB 350 # 1: RD-based mode decision for Intra 16x16 MB 351SubMBCodingState = 2 # submacroblock coding state 352 # 0: lowest complexity, do not store or reset coding state during sub-MB mode decision 353 # 1: medium complexity, reset to master coding state (for current mode) during sub-MB mode decision 354 # 2: highest complexity, store and reset coding state during sub-MB mode decision 355DistortionSSIM = 0 # Compute SSIM distortion. (0: disabled/default, 1: enabled) 356DistortionMS_SSIM = 0 # Compute Multiscale SSIM distortion. (0: disabled/default, 1: enabled) 357SSIMOverlapSize = 8 # Overlap size to calculate SSIM distortion (1: pixel by pixel, 8: no overlap) 358DistortionYUVtoRGB = 0 # Calculate distortion in RGB domain after conversion from YCbCr (0:off, 1:on) 359CtxAdptLagrangeMult = 0 # Context Adaptive Lagrange Multiplier 360 # 0: disabled (default) 361 # 1: enabled (works best when RDOptimization=0) 362FastCrIntraDecision = 0 # Fast Chroma intra mode decision (0:off, 1:on) 363DisableThresholding = 0 # Disable Thresholding of Transform Coefficients (0:off, 1:on) 364DisableBSkipRDO = 0 # Disable B Skip Mode consideration from RDO Mode decision (0:off, 1:on) 365BiasSkipRDO = 0 # Negative Bias for Skip/DirectSkip modes (0: off, 1: on) 366ForceTrueRateRDO = 0 # Force true rate (even zero values) during RDO process 367SkipIntraInInterSlices = 0 # Skips Intra mode checking in inter slices if certain mode decisions are satisfied (0: off, 1: on) 368WeightY = 1 # Luma weight for RDO 369WeightCb = 1 # Cb weight for RDO 370WeightCr = 1 # Cr weight for RDO 371 372########################################################################################## 373# Explicit Lambda Usage 374########################################################################################## 375UseExplicitLambdaParams = 0 # Use explicit lambda scaling parameters (0:disabled, 1:enable lambda weight, 2: use explicit lambda value) 376UpdateLambdaChromaME = 0 # Update lambda given Chroma ME consideration 377FixedLambdaISlice = 0.1 # Fixed Lambda value for I slices 378FixedLambdaPSlice = 0.1 # Fixed Lambda value for P slices 379FixedLambdaBSlice = 0.1 # Fixed Lambda value for B slices 380FixedLambdaRefBSlice = 0.1 # Fixed Lambda value for Referenced B slices 381FixedLambdaSPSlice = 0.1 # Fixed Lambda value for SP slices 382FixedLambdaSISlice = 0.1 # Fixed Lambda value for SI slices 383 384LambdaWeightISlice = 0.65 # scaling param for I slices. This will be used as a multiplier i.e. lambda=LambdaWeightISlice * 2^((QP-12)/3) 385LambdaWeightPSlice = 0.68 # scaling param for P slices. This will be used as a multiplier i.e. lambda=LambdaWeightPSlice * 2^((QP-12)/3) 386LambdaWeightBSlice = 0.68 # scaling param for B slices. This will be used as a multiplier i.e. lambda=LambdaWeightBSlice * 2^((QP-12)/3) 387LambdaWeightRefBSlice = 0.68 # scaling param for Referenced B slices. This will be used as a multiplier i.e. lambda=LambdaWeightRefBSlice * 2^((QP-12)/3) 388LambdaWeightSPSlice = 0.68 # scaling param for SP slices. This will be used as a multiplier i.e. lambda=LambdaWeightSPSlice * 2^((QP-12)/3) 389LambdaWeightSISlice = 0.65 # scaling param for SI slices. This will be used as a multiplier i.e. lambda=LambdaWeightSISlice * 2^((QP-12)/3) 390 391LossRateA = 5 # expected packet loss rate of the channel for the first partition, only valid if RDOptimization = 3 392LossRateB = 0 # expected packet loss rate of the channel for the second partition, only valid if RDOptimization = 3 393LossRateC = 0 # expected packet loss rate of the channel for the third partition, only valid if RDOptimization = 3 394FirstFrameCorrect = 0 # If 1, the first frame is encoded under the assumption that it is always correctly received. 395NumberOfDecoders = 30 # Numbers of decoders used to simulate the channel, only valid if RDOptimization = 3 396RestrictRefFrames = 0 # Doesnt allow reference to areas that have been intra updated in a later frame. 397 398########################################################################################## 399# Additional Stuff 400######################################################################################### 401 402UseConstrainedIntraPred = 0 # If 1, Inter pixels are not used for Intra macroblock prediction. 403 404NumberofLeakyBuckets = 8 # Number of Leaky Bucket values 405LeakyBucketRateFile = "leakybucketrate.cfg" # File from which encoder derives rate values 406LeakyBucketParamFile = "leakybucketparam.cfg" # File where encoder stores leakybucketparams 407 408NumFramesInELayerSubSeq = 0 # number of frames in the Enhanced Scalability Layer(0: no Enhanced Layer) 409 410SparePictureOption = 0 # (0: no spare picture info, 1: spare picture available) 411SparePictureDetectionThr = 6 # Threshold for spare reference pictures detection 412SparePicturePercentageThr = 92 # Threshold for the spare macroblock percentage 413 414PicOrderCntType = 0 # (0: POC mode 0, 1: POC mode 1, 2: POC mode 2) 415 416######################################################################################## 417#Rate control 418######################################################################################## 419 420RateControlEnable = 0 # 0 Disable, 1 Enable 421Bitrate = 45020 # Bitrate(bps) 422InitialQP = 0 # Initial Quantization Parameter for the first I frame 423 # InitialQp depends on two values: Bits Per Picture, 424 # and the GOP length 425BasicUnit = 0 # Number of MBs in the basic unit 426 # should be a fraction of the total number 427 # of MBs in a frame ("0" sets a BU equal to a frame) 428ChannelType = 0 # type of channel( 1=time varying channel; 0=Constant channel) 429RCUpdateMode = 0 # Rate Control type. Modes supported : 430 # 0 = original JM rate control, 431 # 1 = rate control that is applied to all frames regardless of the slice type, 432 # 2 = original plus intelligent QP selection for I and B slices (including Hierarchical), 433 # 3 = original + hybrid quadratic rate control for I and B slice using bit rate statistics 434 # 435RCISliceBitRatio = 1.0 # target ratio of bits for I-coded pictures compared to P-coded Pictures (for RCUpdateMode=3) 436RCBSliceBitRatio0 = 0.5 # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 0 (for RCUpdateMode=3) 437RCBSliceBitRatio1 = 0.25 # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 1 (for RCUpdateMode=3) 438RCBSliceBitRatio2 = 0.25 # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 2 (for RCUpdateMode=3) 439RCBSliceBitRatio3 = 0.25 # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 3 (for RCUpdateMode=3) 440RCBSliceBitRatio4 = 0.25 # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 4 (for RCUpdateMode=3) 441RCBoverPRatio = 0.45 # ratio of bit rate usage of a B-coded picture over a P-coded picture for the SAME QP (for RCUpdateMode=3) 442RCIoverPRatio = 3.80 # ratio of bit rate usage of an I-coded picture over a P-coded picture for the SAME QP (for RCUpdateMode=3) 443RCMinQPPSlice = 8 # minimum P Slice QP value for rate control 444RCMaxQPPSlice = 42 # maximum P Slice QP value for rate control 445RCMinQPBSlice = 8 # minimum B Slice QP value for rate control 446RCMaxQPBSlice = 42 # maximum B Slice QP value for rate control 447RCMinQPISlice = 8 # minimum I Slice QP value for rate control 448RCMaxQPISlice = 42 # maximum I Slice QP value for rate control 449RCMinQPSPSlice = 8 # minimum SP Slice QP value for rate control 450RCMaxQPSPSlice = 40 # maximum SP Slice QP value for rate control 451RCMinQPSISlice = 8 # minimum SI Slice QP value for rate control 452RCMaxQPSISlice = 42 # maximum SI Slice QP value for rate control 453RCMaxQPChange = 4 # maximum QP change for frames of the base layer 454 455######################################################################################## 456#Fast Mode Decision 457######################################################################################## 458EarlySkipEnable = 1 # Early skip detection (0: Disable 1: Enable) 459SelectiveIntraEnable = 1 # Selective Intra mode decision (0: Disable 1: Enable) 460 461######################################################################################## 462#FREXT stuff 463######################################################################################## 464 465YUVFormat = 1 # YUV format (0=4:0:0, 1=4:2:0, 2=4:2:2, 3=4:4:4) 466RGBInput = 0 # 1=RGB input, 0=GBR or YUV input 467SeparateColourPlane = 0 # 4:4:4 coding: 0=Common mode, 1=Independent mode 468SourceBitDepthLuma = 8 # Source Bit Depth for Luma color component (8...14 bits) 469SourceBitDepthChroma = 8 # Source Bit Depth for Chroma color components (8...14 bits) 470SourceBitDepthRescale = 1 # Rescale bit depth of source for output (0: Disable 1: Enable) 471OutputBitDepthLuma = 8 # Output Bit Depth for Luma color component (8...14 bits) 472OutputBitDepthChroma = 8 # Output Bit Depth for Chroma color components (8...14 bits) 473 474CbQPOffset = 0 # Chroma QP offset for Cb-part (-51..51) 475CrQPOffset = 0 # Chroma QP offset for Cr-part (-51..51) 476Transform8x8Mode = 1 # (0: only 4x4 transform, 1: allow using 8x8 transform additionally, 2: only 8x8 transform) 477ReportFrameStats = 0 # (0:Disable Frame Statistics 1: Enable) 478DisplayEncParams = 0 # (0:Disable Display of Encoder Params 1: Enable) 479Verbose = 1 # level of display verboseness 480 # 0: short, 1: normal (default), 2: detailed, 3: detailed/nvb 481SkipGlobalStats = 0 # Disable global stat accumulation (Set to 1 to avoid bipred core dump) 482 483######################################################################################## 484#Q-Matrix (FREXT) 485######################################################################################## 486QmatrixFile = "q_matrix.cfg" 487 488ScalingMatrixPresentFlag = 0 # Enable Q_Matrix (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 489ScalingListPresentFlag0 = 3 # Intra4x4_Luma (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 490ScalingListPresentFlag1 = 3 # Intra4x4_ChromaU (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 491ScalingListPresentFlag2 = 3 # Intra4x4_chromaV (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 492ScalingListPresentFlag3 = 3 # Inter4x4_Luma (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 493ScalingListPresentFlag4 = 3 # Inter4x4_ChromaU (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 494ScalingListPresentFlag5 = 3 # Inter4x4_ChromaV (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 495ScalingListPresentFlag6 = 3 # Intra8x8_Luma (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 496ScalingListPresentFlag7 = 3 # Inter8x8_Luma (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 497ScalingListPresentFlag8 = 3 # Intra8x8_ChromaU for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 498ScalingListPresentFlag9 = 3 # Inter8x8_ChromaU for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 499ScalingListPresentFlag10 = 3 # Intra8x8_ChromaV for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 500ScalingListPresentFlag11 = 3 # Inter8x8_ChromaV for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS) 501 502######################################################################################## 503#Rounding Offset control 504######################################################################################## 505 506OffsetMatrixPresentFlag = 0 # Enable Explicit Offset Quantization Matrices (0: disable 1: enable) 507QOffsetMatrixFile = "q_offset.cfg" # Explicit Quantization Matrices file 508 509AdaptiveRounding = 0 # Enable Adaptive Rounding based on JVT-N011 (0: disable, 1: enable) 510AdaptRoundingFixed = 0 # Enable Global Adaptive rounding for all qps (0: disable, 1: enable - default/old) 511AdaptRndPeriod = 1 # Period in terms of MBs for updating rounding offsets. 512 # 0 performs update at the picture level. Default is 16. 1 is as in JVT-N011. 513AdaptRndChroma = 1 # Enables coefficient rounding adaptation for chroma 514 515AdaptRndWFactorIRef = 8 # Adaptive Rounding Weight for I/SI slices in reference pictures /4096 516AdaptRndWFactorPRef = 8 # Adaptive Rounding Weight for P/SP slices in reference pictures /4096 517AdaptRndWFactorBRef = 8 # Adaptive Rounding Weight for B slices in reference pictures /4096 518AdaptRndWFactorINRef = 8 # Adaptive Rounding Weight for I/SI slices in non reference pictures /4096 519AdaptRndWFactorPNRef = 8 # Adaptive Rounding Weight for P/SP slices in non reference pictures /4096 520AdaptRndWFactorBNRef = 8 # Adaptive Rounding Weight for B slices in non reference pictures /4096 521 522AdaptRndCrWFactorIRef = 8 # Chroma Adaptive Rounding Weight for I/SI slices in reference pictures /4096 523AdaptRndCrWFactorPRef = 8 # Chroma Adaptive Rounding Weight for P/SP slices in reference pictures /4096 524AdaptRndCrWFactorBRef = 8 # Chroma Adaptive Rounding Weight for B slices in reference pictures /4096 525AdaptRndCrWFactorINRef = 8 # Chroma Adaptive Rounding Weight for I/SI slices in non reference pictures /4096 526AdaptRndCrWFactorPNRef = 8 # Chroma Adaptive Rounding Weight for P/SP slices in non reference pictures /4096 527AdaptRndCrWFactorBNRef = 8 # Chroma Adaptive Rounding Weight for B slices in non reference pictures /4096 528 529################################################################ 530# Rate Distortion Optimized Quantization 531################################################################ 532UseRDOQuant = 1 # Use Rate Distortion Optimized Quantization (0=disable, 1=enable) 533RDOQ_DC = 1 # Enable Rate Distortion Optimized Quantization for DC components (0=disable, 1=enable) 534RDOQ_CR = 1 # Enable Rate Distortion Optimized Quantization for Chroma components (0=disable, 1=enable) 535RDOQ_DC_CR = 1 # Enable Rate Distortion Optimized Quantization for Chroma DC components (0=disable, 1=enable) 536RDOQ_QP_Num = 1 # 1-9: Number of QP tested in RDO_Q (I/P/B slice) 537RDOQ_CP_Mode = 0 # copy Mode from first QP tested 538RDOQ_CP_MV = 0 # copy MV from first QP tested 539RDOQ_Fast = 1 # Fast RDOQ decision method for multiple QPs 540 541######################################################################################## 542#Lossless Coding (FREXT) 543######################################################################################## 544 545LosslessCoding = 0 # Enable lossless coding when qpprime_y is zero (0 Disabled, 1 Enabled) 546 547######################################################################################## 548#Fast Motion Estimation Control Parameters 549######################################################################################## 550 551SearchMode = 3 # Motion estimation mode 552 # -1 = Full Search 553 # 0 = Fast Full Search (default) 554 # 1 = UMHexagon Search 555 # 2 = Simplified UMHexagon Search 556 # 3 = Enhanced Predictive Zonal Search (EPZS) 557 558UMHexDSR = 1 # Use Search Range Prediction. Only for UMHexagonS method 559 # (0:disable, 1:enabled/default) 560UMHexScale = 3 # Use Scale_factor for different image sizes. Only for UMHexagonS method 561 # (0:disable, 3:/default) 562 # Increasing value can speed up Motion Search. 563 564EPZSPattern = 2 # Select EPZS primary refinement pattern. 565 # (0: small diamond, 1: square, 2: extended diamond/default, 566 # 3: large diamond, 4: SBP Large Diamond, 567 # 5: PMVFAST ) 568EPZSDualRefinement = 3 # Enables secondary refinement pattern. 569 # (0:disabled, 1: small diamond, 2: square, 570 # 3: extended diamond/default, 4: large diamond, 571 # 5: SBP Large Diamond, 6: PMVFAST ) 572EPZSFixedPredictors = 2 # Enables Window based predictors 573 # (0:disabled, 1: P only, 2: P and B/default) 574EPZSTemporal = 1 # Enables temporal predictors 575 # (0: disabled, 1: enabled/default) 576EPZSSpatialMem = 1 # Enables spatial memory predictors 577 # (0: disabled, 1: enabled/default) 578EPZSBlockType = 1 # Enables block type Predictors 579 # (0: disabled, 1: enabled/default) 580EPZSMinThresScale = 0 # Scaler for EPZS minimum threshold (0 default). 581 # Increasing value can speed up encoding. 582EPZSMedThresScale = 1 # Scaler for EPZS median threshold (1 default). 583 # Increasing value can speed up encoding. 584EPZSMaxThresScale = 1 # Scaler for EPZS maximum threshold (1 default). 585 # Increasing value can speed up encoding. 586 587EPZSSubPelME = 1 # EPZS Subpel ME consideration 588EPZSSubPelMEBiPred = 1 # EPZS Subpel ME consideration for BiPred partitions 589EPZSSubPelThresScale = 2 # EPZS Subpel ME Threshold scaler 590EPZSSubPelGrid = 1 # Perform EPZS using a subpixel grid 591 592######################################################################################## 593# SEI Parameters 594######################################################################################## 595 596ToneMappingSEIPresentFlag = 0 # Enable Tone mapping SEI (0 Not present, 1 Present) 597ToneMappingFile = "ToneMapping.cfg" 598 599GenerateSEIMessage = 0 # Generate an SEI Text Message 600SEIMessageText = "H.264/AVC Encoder" # Text SEI Message 601 602UseMVLimits = 0 # Use MV Limits 603SetMVXLimit = 512 # Horizontal MV Limit (in integer units) 604SetMVYLimit = 512 # Vertical MV Limit (in integer units) 605 606######################################################################################## 607# VUI Parameters 608######################################################################################## 609# the variables below do not affect encoding and decoding 610# (many are dummy variables but others can be useful when supported by the decoder) 611 612EnableVUISupport = 0 # Enable VUI Parameters 613 614# display parameters 615VUI_aspect_ratio_info_present_flag = 0 616VUI_aspect_ratio_idc = 1 617VUI_sar_width = 0 618VUI_sar_height = 0 619VUI_overscan_info_present_flag = 0 620VUI_overscan_appropriate_flag = 0 621VUI_video_signal_type_present_flag = 0 622VUI_video_format = 5 623VUI_video_full_range_flag = 0 624VUI_colour_description_present_flag = 0 625VUI_colour_primaries = 2 626VUI_transfer_characteristics = 2 627VUI_matrix_coefficients = 2 628VUI_chroma_location_info_present_flag = 0 629VUI_chroma_sample_loc_type_top_field = 0 630VUI_chroma_sample_loc_type_bottom_field = 0 631VUI_timing_info_present_flag = 0 632VUI_num_units_in_tick = 1000 633VUI_time_scale = 60000 634VUI_fixed_frame_rate_flag = 0 635 636# nal hrd parameters 637VUI_nal_hrd_parameters_present_flag = 0 638VUI_nal_cpb_cnt_minus1 = 0 639VUI_nal_bit_rate_scale = 0 640VUI_nal_cpb_size_scale = 0 641VUI_nal_bit_rate_value_minus1 = 0 642VUI_nal_cpb_size_value_minus1 = 0 643VUI_nal_vbr_cbr_flag = 0 644VUI_nal_initial_cpb_removal_delay_length_minus1 = 23 645VUI_nal_cpb_removal_delay_length_minus1 = 23 646VUI_nal_dpb_output_delay_length_minus1 = 23 647VUI_nal_time_offset_length = 24 648 649# vlc hrd parameters 650VUI_vcl_hrd_parameters_present_flag = 0 651VUI_vcl_cpb_cnt_minus1 = 0 652VUI_vcl_bit_rate_scale = 0 653VUI_vcl_cpb_size_scale = 0 654VUI_vcl_bit_rate_value_minus1 = 0 655VUI_vcl_cpb_size_value_minus1 = 0 656VUI_vcl_vbr_cbr_flag = 0 657VUI_vcl_initial_cpb_removal_delay_length_minus1 = 23 658VUI_vcl_cpb_removal_delay_length_minus1 = 23 659VUI_vcl_dpb_output_delay_length_minus1 = 23 660VUI_vcl_time_offset_length = 24 661VUI_low_delay_hrd_flag = 0 662 663# other parameters (i.e. bitsream restrictions) 664VUI_pic_struct_present_flag = 0 665VUI_bitstream_restriction_flag = 0 666VUI_motion_vectors_over_pic_boundaries_flag = 1 667VUI_max_bytes_per_pic_denom = 0 668VUI_max_bits_per_mb_denom = 0 669VUI_log2_max_mv_length_vertical = 16 670VUI_log2_max_mv_length_horizontal = 16 671VUI_num_reorder_frames = 16 672VUI_max_dec_frame_buffering = 16 673 674