encoder_baseline.cfg
上传用户:hjq518
上传日期:2021-12-09
资源大小:5084k
文件大小:24k
源码类别:

Audio

开发平台:

Visual C++

  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.de
  8. ##########################################################################################
  9. # Files
  10. ##########################################################################################
  11. InputFile             = "foreman_part_qcif.yuv"       # Input sequence
  12. InputHeaderLength     = 0      # If the inputfile has a header, state it's length in byte here
  13. StartFrame            = 0      # Start frame for encoding. (0-N)
  14. FramesToBeEncoded     = 3      # Number of frames to be coded
  15. FrameRate             = 30.0   # Frame Rate per second (0.1-100.0)
  16. SourceWidth           = 176    # Source frame width
  17. SourceHeight          = 144    # Source frame height
  18. SourceResize          = 0      # Resize source size for output
  19. OutputWidth           = 176    # Output frame width
  20. OutputHeight          = 144    # Output frame height
  21. TraceFile             = "trace_enc.txt"      # Trace file 
  22. ReconFile             = "test_rec.yuv"       # Recontruction YUV file
  23. OutputFile            = "test.264"           # Bitstream
  24. StatsFile             = "stats.dat"          # Coding statistics file
  25. ##########################################################################################
  26. # Encoder Control
  27. ##########################################################################################
  28. ProfileIDC            = 66  # 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)
  29. IntraProfile          = 0   # Activate Intra Profile for FRExt (0: false, 1: true)
  30.                             # (e.g. ProfileIDC=110, IntraProfile=1  =>  High 10 Intra Profile)
  31. LevelIDC              = 40  # Level IDC   (e.g. 20 = level 2.0)
  32. IntraPeriod           = 0   # Period of I-pictures   (0=only first)
  33. IDRPeriod             = 0   # Period of IDR pictures (0=only first)
  34. AdaptiveIntraPeriod   = 1   # Adaptive intra period
  35. AdaptiveIDRPeriod     = 1   # Adaptive IDR period
  36. IntraDelay            = 0   # Intra (IDR) picture delay (i.e. coding structure of PPIPPP... )
  37. EnableIDRGOP          = 0   # Support for IDR closed GOPs (0: disabled, 1: enabled)
  38. EnableOpenGOP         = 0   # Support for open GOPs (0: disabled, 1: enabled)
  39. QPISlice              = 28  # Quant. param for I Slices (0-51)
  40. QPPSlice              = 28  # Quant. param for P Slices (0-51)
  41. FrameSkip             = 0   # Number of frames to be skipped in input (e.g 2 will code every third frame)
  42. ChromaQPOffset        = 0   # Chroma QP offset (-51..51)
  43. DisableSubpelME       = 0   # Disable Subpixel Motion Estimation (0=off/default, 1=on)
  44. SearchRange           = 32  # Max search range
  45. MEDistortionFPel      = 0   # Select error metric for Full-Pel ME    (0: SAD, 1: SSE, 2: Hadamard SAD)
  46. MEDistortionHPel      = 2   # Select error metric for Half-Pel ME    (0: SAD, 1: SSE, 2: Hadamard SAD)
  47. MEDistortionQPel      = 2   # Select error metric for Quarter-Pel ME (0: SAD, 1: SSE, 2: Hadamard SAD)
  48. MDDistortion          = 2   # Select error metric for Mode Decision  (0: SAD, 1: SSE, 2: Hadamard SAD)
  49. SkipDeBlockNonRef     = 0   # Skip Deblocking (regardless of DFParametersFlag) for non-reference frames (0: off, 1: on)
  50. ChromaMCBuffer        = 1   # Calculate Color component interpolated values in advance and store them.
  51.                             # Provides a trade-off between memory and computational complexity
  52.                             # (0: disabled/default, 1: enabled)
  53. ChromaMEEnable        = 0   # Take into account Color component information during ME
  54.                             # (0: only first component/default, 
  55.                             #  1: All Color components - Integer refinement only
  56.                             #  2: All Color components - All refinements)
  57. ChromaMEWeight        = 1   # Weighting for chroma components. This parameter should have a relationship with color format.
  58. NumberReferenceFrames = 5   # Number of previous frames used for inter motion search (0-16)
  59. PList0References      = 0   # P slice List 0 reference override (0 disable, N <= NumberReferenceFrames)
  60. Log2MaxFNumMinus4     = 0   # Sets log2_max_frame_num_minus4 (-1 : based on FramesToBeEncoded/Auto, >=0 : Log2MaxFNumMinus4)
  61. Log2MaxPOCLsbMinus4   = -1  # Sets log2_max_pic_order_cnt_lsb_minus4 (-1 : Auto, >=0 : Log2MaxPOCLsbMinus4)
  62. GenerateMultiplePPS   = 0   # Transmit multiple parameter sets. Currently parameters basically enable all WP modes (0: diabled, 1: enabled)
  63. ResendPPS             = 0   # Resend PPS (with pic_parameter_set_id 0) for every coded Frame/Field pair (0: disabled, 1: enabled)
  64. MbLineIntraUpdate     = 0   # Error robustness(extra intra macro block updates)(0=off, N: One GOB every N frames are intra coded)
  65. RandomIntraMBRefresh  = 0   # Forced intra MBs per picture
  66. PSliceSkip            = 1   # P-Slice Skip mode consideration  (0=disable, 1=enable)
  67. PSliceSearch16x16     = 1   # P-Slice Inter block search 16x16 (0=disable, 1=enable)
  68. PSliceSearch16x8      = 1   # P-Slice Inter block search 16x8  (0=disable, 1=enable)
  69. PSliceSearch8x16      = 1   # P-Slice Inter block search  8x16 (0=disable, 1=enable)
  70. PSliceSearch8x8       = 1   # P-Slice Inter block search  8x8  (0=disable, 1=enable)
  71. PSliceSearch8x4       = 1   # P-Slice Inter block search  8x4  (0=disable, 1=enable)
  72. PSliceSearch4x8       = 1   # P-Slice Inter block search  4x8  (0=disable, 1=enable)
  73. PSliceSearch4x4       = 1   # P-Slice Inter block search  4x4  (0=disable, 1=enable)
  74. DisableIntra4x4        = 0  # Disable Intra 4x4 modes
  75. DisableIntra16x16      = 0  # Disable Intra 16x16 modes
  76. DisableIntraInInter    = 0  # Disable Intra modes for inter slices
  77. IntraDisableInterOnly  = 0  # Apply Disabling Intra conditions only to Inter Slices (0:disable/default,1: enable)
  78. Intra4x4ParDisable     = 0  # Disable Vertical & Horizontal 4x4
  79. Intra4x4DiagDisable    = 0  # Disable Diagonal 45degree 4x4
  80. Intra4x4DirDisable     = 0  # Disable Other Diagonal 4x4
  81. Intra16x16ParDisable   = 0  # Disable Vertical & Horizontal 16x16
  82. Intra16x16PlaneDisable = 0  # Disable Planar 16x16
  83. ChromaIntraDisable     = 0  # Disable Intra Chroma modes other than DC
  84. EnableIPCM             = 1  # Enable IPCM macroblock mode
  85. DisposableP            = 0  # Enable Disposable P slices in the primary layer (0: disable/default, 1: enable)
  86. DispPQPOffset          = 0  # Quantizer offset for disposable P slices (0: default)
  87. ##########################################################################################
  88. # Output Control, NALs
  89. ##########################################################################################
  90. OutFileMode            =  0  # Output file mode, 0:Annex B, 1:RTP
  91. ##########################################################################################
  92. # Picture based Multi-pass encoding
  93. #########################################################################################
  94. RDPictureDecision        =  0     # Perform RD optimal decision between different coded picture versions.
  95.                                   # If GenerateMultiplePPS is enabled then this will test different WP methods.
  96.                                   # Otherwise it will test QP +-1 (0: disabled, 1: enabled)
  97. RDPictureIntra           =  0     # Perform RD optimal decision also for intra coded pictures (0: disabled (default), 1: enabled).
  98. RDPSliceWeightOnly       =  1     # Only consider Weighted Prediction for P slices in Picture RD decision. (0: disabled, 1: enabled (default))
  99. ##########################################################################################
  100. # Deblocking filter parameters
  101. ##########################################################################################
  102. DFParametersFlag         = 0      # Configure deblocking filter (0=parameters below ignored, 1=parameters sent)
  103.      # Note that for pictures with multiple slice types, 
  104.                                   # only the type of the first slice will be considered.
  105. DFDisableRefISlice       = 0      # Disable deblocking filter in reference I coded pictures (0=Filter, 1=No Filter). 
  106. DFAlphaRefISlice         = 0      # Reference I coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
  107. DFBetaRefISlice          = 0      # Reference I coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
  108. DFDisableNRefISlice      = 0      # Disable deblocking filter in non reference I coded pictures (0=Filter, 1=No Filter). 
  109. DFAlphaNRefISlice        = 0      # Non Reference I coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
  110. DFBetaNRefISlice         = 0      # Non Reference I coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
  111. DFDisableRefPSlice       = 0      # Disable deblocking filter in reference P coded pictures (0=Filter, 1=No Filter). 
  112. DFAlphaRefPSlice         = 0      # Reference P coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
  113. DFBetaRefPSlice          = 0      # Reference P coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
  114. DFDisableNRefPSlice      = 0      # Disable deblocking filter in non reference P coded pictures (0=Filter, 1=No Filter). 
  115. DFAlphaNRefPSlice        = 0      # Non Reference P coded pictures Alpha offset div. 2, {-6, -5, ... 0, +1, .. +6}
  116. DFBetaNRefPSlice         = 0      # Non Reference P coded pictures Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}
  117. ##########################################################################################
  118. # Error Resilience / Slices
  119. ##########################################################################################
  120. SliceMode             =  0   # Slice mode (0=off 1=fixed #mb in slice 2=fixed #bytes in slice 3=use callback)
  121. SliceArgument         = 50   # Slice argument (Arguments to modes 1 and 2 above)
  122. num_slice_groups_minus1 = 0  # Number of Slice Groups Minus 1, 0 == no FMO, 1 == two slice groups, etc.
  123. slice_group_map_type    = 0  # 0:  Interleave, 1: Dispersed,    2: Foreground with left-over,
  124.                              # 3:  Box-out,    4: Raster Scan   5: Wipe
  125.                              # 6:  Explicit, slice_group_id read from SliceGroupConfigFileName
  126. slice_group_change_direction_flag = 0    # 0: box-out clockwise, raster scan or wipe right,
  127.                                          # 1: box-out counter clockwise, reverse raster scan or wipe left
  128. slice_group_change_rate_minus1    = 85   #
  129. SliceGroupConfigFileName          = "sg0conf.cfg"   # Used for slice_group_map_type 0, 2, 6
  130. UseRedundantPicture   = 0    # 0: not used, 1: enabled
  131. NumRedundantHierarchy = 1    # 0-4
  132. PrimaryGOPLength      = 10   # GOP length for redundant allocation (1-16)
  133.                              # NumberReferenceFrames must be no less than PrimaryGOPLength when redundant slice enabled
  134. NumRefPrimary         = 1    # Actually used number of references for primary slices (1-16)
  135. ##########################################################################################
  136. # Search Range Restriction / RD Optimization
  137. ##########################################################################################
  138. RestrictSearchRange    =  2  # restriction for (0: blocks and ref, 1: ref, 2: no restrictions)
  139. RDOptimization         =  1  # rd-optimized mode decision
  140.                              # 0: RD-off (Low complexity mode)
  141.                              # 1: RD-on (High complexity mode)
  142.                              # 2: RD-on (Fast high complexity mode - not work in FREX Profiles)
  143.                              # 3: with losses
  144. DistortionSSIM         =  0  # Compute SSIM distortion. (0: disabled/default, 1: enabled)
  145. SSIMOverlapSize        =  8  # Overlap size to calculate SSIM distortion (1: pixel by pixel, 8: no overlap)
  146. DistortionYUVtoRGB     =  0  # Calculate distortion in RGB domain after conversion from YCbCr (0:off, 1:on)
  147. CtxAdptLagrangeMult    =  0  # Context Adaptive Lagrange Multiplier
  148.                              # 0: disabled (default)
  149.                              # 1: enabled (works best when RDOptimization=0)
  150. FastCrIntraDecision    =  1  # Fast Chroma intra mode decision (0:off, 1:on)
  151. DisableThresholding    =  0  # Disable Thresholding of Transform Coefficients (0:off, 1:on)
  152. SkipIntraInInterSlices =  0  # Skips Intra mode checking in inter slices if certain mode decisions are satisfied (0: off, 1: on)
  153. WeightY                =  1  # Luma weight for RDO
  154. WeightCb               =  1  # Cb weight for RDO
  155. WeightCr               =  1  # Cr weight for RDO
  156. ##########################################################################################
  157. # Explicit Lambda Usage
  158. ##########################################################################################
  159. UseExplicitLambdaParams  =  0    # Use explicit lambda scaling parameters (0:disabled, 1:enable lambda weight, 2: use explicit lambda value)
  160. UpdateLambdaChromaME     =  0    # Update lambda given Chroma ME consideration
  161. FixedLambdaIslice        =  0.1  # Fixed Lambda value for I slices
  162. FixedLambdaPslice        =  0.1  # Fixed Lambda value for P slices
  163. LambdaWeightIslice       =  0.65 # scaling param for I slices. This will be used as a multiplier i.e. lambda=LambdaWeightISlice * 2^((QP-12)/3)
  164. LambdaWeightPslice       =  0.68 # scaling param for P slices. This will be used as a multiplier i.e. lambda=LambdaWeightPSlice * 2^((QP-12)/3)
  165. LossRateA                =  5  # expected packet loss rate of the channel for the first partition, only valid if RDOptimization = 3
  166. LossRateB                =  0  # expected packet loss rate of the channel for the second partition, only valid if RDOptimization = 3
  167. LossRateC                =  0  # expected packet loss rate of the channel for the third partition, only valid if RDOptimization = 3
  168. NumberOfDecoders         = 30  # Numbers of decoders used to simulate the channel, only valid if RDOptimization = 3
  169. RestrictRefFrames        =  0  # Doesnt allow reference to areas that have been intra updated in a later frame.
  170. ##########################################################################################
  171. # Additional Stuff
  172. #########################################################################################
  173. UseConstrainedIntraPred  =  0  # If 1, Inter pixels are not used for Intra macroblock prediction.
  174. LastFrameNumber          =  0  # Last frame number that have to be coded (0: no effect)
  175. ChangeQPI                = 16  # QP (I-slices)  for second part of sequence (0-51)
  176. ChangeQPP                = 16  # QP (P-slices)  for second part of sequence (0-51)
  177. ChangeQPStart            =  0  # Frame no. for second part of sequence (0: no second part)
  178. NumberofLeakyBuckets     =  8                      # Number of Leaky Bucket values
  179. LeakyBucketRateFile      =  "leakybucketrate.cfg"  # File from which encoder derives rate values
  180. LeakyBucketParamFile     =  "leakybucketparam.cfg" # File where encoder stores leakybucketparams
  181. NumFramesInELayerSubSeq  = 0  # number of frames in the Enhanced Scalability Layer(0: no Enhanced Layer)
  182. SparePictureOption        =  0   # (0: no spare picture info, 1: spare picture available)
  183. SparePictureDetectionThr  =  6   # Threshold for spare reference pictures detection
  184. SparePicturePercentageThr = 92   # Threshold for the spare macroblock percentage
  185. PicOrderCntType           = 0    # (0: POC mode 0, 1: POC mode 1, 2: POC mode 2)
  186. ########################################################################################
  187. #Rate control
  188. ########################################################################################
  189. RateControlEnable       = 0     # 0 Disable, 1 Enable
  190. Bitrate                 = 45020 # Bitrate(bps)
  191. InitialQP               = 0     # Initial Quantization Parameter for the first I frame
  192.                                 # InitialQp depends on two values: Bits Per Picture,
  193.                                 # and the GOP length
  194. BasicUnit               = 11    # Number of MBs in the basic unit
  195.                                 # should be a fraction of the total number
  196.                                 # of MBs in a frame
  197. ChannelType             = 0     # type of channel( 1=time varying channel; 0=Constant channel)
  198. RCUpdateMode            = 0     # Rate Control type. Modes supported :
  199.                                 # 0 = original JM rate control,
  200.                                 # 1 = rate control that is applied to all frames regardless of the slice type,
  201.                                 # 2 = original plus intelligent QP selection for I and B slices (including Hierarchical),
  202.                                 # 3 = original + hybrid quadratic rate control for I and B slice using bit rate statistics
  203.                                 #
  204. RCISliceBitRatio        = 1.0   # target ratio of bits for I-coded pictures compared to P-coded Pictures (for RCUpdateMode=3)
  205. RCBSliceBitRatio0       = 0.5   # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 0 (for RCUpdateMode=3)
  206. RCBSliceBitRatio1       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 1 (for RCUpdateMode=3)
  207. RCBSliceBitRatio2       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 2 (for RCUpdateMode=3)
  208. RCBSliceBitRatio3       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 3 (for RCUpdateMode=3)
  209. RCBSliceBitRatio4       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 4 (for RCUpdateMode=3)
  210. RCBoverPRatio           = 0.45  # ratio of bit rate usage of a B-coded picture over a P-coded picture for the SAME QP (for RCUpdateMode=3)
  211. RCIoverPRatio           = 3.80  # ratio of bit rate usage of an I-coded picture over a P-coded picture for the SAME QP (for RCUpdateMode=3)
  212. RCMinQPPSlice           =  8    # minimum P Slice QP value for rate control
  213. RCMaxQPPSlice           = 44    # maximum P Slice QP value for rate control
  214. RCMinQPISlice           =  8    # minimum I Slice QP value for rate control
  215. RCMaxQPISlice           = 36    # maximum I Slice QP value for rate control
  216. ########################################################################################
  217. #Fast Mode Decision
  218. ########################################################################################
  219. EarlySkipEnable         = 0     # Early skip detection (0: Disable 1: Enable)
  220. SelectiveIntraEnable    = 0     # Selective Intra mode decision (0: Disable 1: Enable)
  221. ReportFrameStats        = 0     # (0:Disable Frame Statistics 1: Enable)
  222. DisplayEncParams        = 0     # (0:Disable Display of Encoder Params 1: Enable)
  223. Verbose                 = 1     # level of display verboseness (0:short, 1:normal, 2:detailed)
  224. ########################################################################################
  225. #Rounding Offset control
  226. ########################################################################################
  227. OffsetMatrixPresentFlag  = 0    # Enable Explicit Offset Quantization Matrices  (0: disable 1: enable)
  228. QOffsetMatrixFile        = "q_offset.cfg" # Explicit Quantization Matrices file
  229. AdaptiveRounding         = 1    # Enable Adaptive Rounding based on JVT-N011 (0: disable, 1: enable)
  230. AdaptRoundingFixed       = 1    # Enable Global Adaptive rounding for all qps (0: disable, 1: enable - default/old)
  231. AdaptRndPeriod           = 16   # Period in terms of MBs for updating rounding offsets. 
  232.                                 # 0 performs update at the picture level. Default is 16. 1 is as in JVT-N011.
  233. AdaptRndChroma           = 1    # Enables coefficient rounding adaptation for chroma
  234. AdaptRndWFactorIRef      = 4    # Adaptive Rounding Weight for I/SI slices in reference pictures /4096
  235. AdaptRndWFactorPRef      = 4    # Adaptive Rounding Weight for P/SP slices in reference pictures /4096
  236. AdaptRndWFactorINRef     = 4    # Adaptive Rounding Weight for I/SI slices in non reference pictures /4096
  237. AdaptRndWFactorPNRef     = 4    # Adaptive Rounding Weight for P/SP slices in non reference pictures /4096
  238. AdaptRndCrWFactorIRef    = 4    # Chroma Adaptive Rounding Weight for I/SI slices in reference pictures /4096
  239. AdaptRndCrWFactorPRef    = 4    # Chroma Adaptive Rounding Weight for P/SP slices in reference pictures /4096
  240. AdaptRndCrWFactorINRef   = 4    # Chroma Adaptive Rounding Weight for I/SI slices in non reference pictures /4096
  241. AdaptRndCrWFactorPNRef   = 4    # Chroma Adaptive Rounding Weight for P/SP slices in non reference pictures /4096
  242. ########################################################################################
  243. #Fast Motion Estimation Control Parameters
  244. ########################################################################################
  245. SearchMode               = 0    # Motion estimation mode
  246.                                 # -1 = Full Search
  247.                                 #  0 = Fast Full Search (default)
  248.                                 #  1 = UMHexagon Search
  249.                                 #  2 = Simplified UMHexagon Search
  250.                                 #  3 = Enhanced Predictive Zonal Search (EPZS)
  251. UMHexDSR                 = 1    # Use Search Range Prediction. Only for UMHexagonS method
  252.                                 # (0:disable, 1:enabled/default)
  253. UMHexScale               = 3    # Use Scale_factor for different image sizes. Only for UMHexagonS method
  254.                                 # (0:disable, 3:/default)
  255.                                 # Increasing value can speed up Motion Search.
  256. EPZSPattern              = 2    # Select EPZS primary refinement pattern.
  257.                                 # (0: small diamond, 1: square, 2: extended diamond/default,
  258.                                 # 3: large diamond, 4: SBP Large Diamond,
  259.                                 # 5: PMVFAST )
  260. EPZSDualRefinement       = 3    # Enables secondary refinement pattern.
  261.                                 # (0:disabled, 1: small diamond, 2: square,
  262.                                 # 3: extended diamond/default, 4: large diamond,
  263.                                 # 5: SBP Large Diamond, 6: PMVFAST )
  264. EPZSFixedPredictors      = 2    # Enables Window based predictors
  265.                                 # (0:disabled, 1: P only, 2: P and B/default)
  266. EPZSTemporal             = 1    # Enables temporal predictors
  267.                                 # (0: disabled, 1: enabled/default)
  268. EPZSSpatialMem           = 1    # Enables spatial memory predictors
  269.                                 # (0: disabled, 1: enabled/default)
  270. EPZSBlockType            = 1    # Enables block type Predictors
  271.                                 # (0: disabled, 1: enabled/default)
  272. EPZSMinThresScale        = 0    # Scaler for EPZS minimum threshold (0 default).
  273.                                 # Increasing value can speed up encoding.
  274. EPZSMedThresScale        = 1    # Scaler for EPZS median threshold (1 default).
  275.                                 # Increasing value can speed up encoding.
  276. EPZSMaxThresScale        = 2    # Scaler for EPZS maximum threshold (1 default).
  277.                                 # Increasing value can speed up encoding.
  278. EPZSSubPelME             = 1    # EPZS Subpel ME consideration
  279. EPZSSubPelMEBiPred       = 1    # EPZS Subpel ME consideration for BiPred partitions
  280. EPZSSubPelThresScale     = 2    # EPZS Subpel ME Threshold scaler
  281. EPZSSubPelGrid           = 1    # Perform EPZS using a subpixel grid
  282. ########################################################################################
  283. # SEI Parameters
  284. ########################################################################################
  285. GenerateSEIMessage        = 0                    # Generate an SEI Text Message
  286. SEIMessageText            = "H.264/AVC Encoder"  # Text SEI Message
  287. ########################################################################################
  288. # VUI Parameters
  289. ########################################################################################
  290. # the variables below do not affect encoding and decoding
  291. # (many are dummy variables but others can be useful when supported by the decoder)
  292. EnableVUISupport                                = 0      # Enable VUI Parameters