⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 encoder.cfg

📁 H.264编码解码器源码(c语言).zip
💻 CFG
字号:
# New Input File Format is as follows
# <ParameterName> = <ParameterValue> # Comment
#
# See configfile.h for a list of supported ParameterNames


##########################################################################################
# Files
##########################################################################################
InputFile             = "foreman_part_qcif.yuv"       # Input sequence, YUV 4:2:0
InputHeaderLength     = 0      # If the inputfile has a header, state it's length in byte here 
FramesToBeEncoded     = 2      # Number of frames to be coded
SourceWidth           = 176    # Image width in Pels, must be multiple of 16
SourceHeight          = 144    # Image height in Pels, must be multiple of 16
TraceFile             = "trace_enc.txt"
ReconFile             = "test_rec.yuv"
OutputFile            = "test.264"


##########################################################################################
# Encoder Control
##########################################################################################

IntraPeriod           =  0  # Period of I-Frames (0=only first)
QPFirstFrame          = 28  # Quant. param for first frame (intra) (0-51)
QPRemainingFrame      = 28  # Quant. param for remaining frames (0-51)
FrameSkip             =  1  # Number of frames to be skipped in input (e.g 2 will code every third frame)
UseHadamard           =  1  # Hadamard transform (0=not used, 1=used)
SearchRange           = 16  # Max search range
NumberReferenceFrames =  5  # Number of previous frames used for inter motion search (1-5)
MbLineIntraUpdate     =  0  # Error robustness(extra intra macro block updates)(0=off, N: One GOB every N frames are intra coded)
RandomIntraMBRefresh  =  0  # Forced intra MBs per picture
InterSearch16x16      =  1  # Inter block search 16x16 (0=disable, 1=enable)
InterSearch16x8       =  1  # Inter block search 16x8  (0=disable, 1=enable)
InterSearch8x16       =  1  # Inter block search  8x16 (0=disable, 1=enable)
InterSearch8x8        =  1  # Inter block search  8x8  (0=disable, 1=enable)
InterSearch8x4        =  1  # Inter block search  8x4  (0=disable, 1=enable)
InterSearch4x8        =  1  # Inter block search  4x8  (0=disable, 1=enable)
InterSearch4x4        =  1  # Inter block search  4x4  (0=disable, 1=enable)

##########################################################################################
# Error Resilience / Slices
##########################################################################################

SliceMode             =  0   # Slice mode (0=off 1=fixed #mb in slice 2=fixed #bytes in slice 3=use callback 4=FMO)
SliceArgument         = 50   # Slice argument (Arguments to modes 1 and 2 above)
num_slice_groups_minus1 = 0  # Number of Slice Groups Minus 1, 0 == no FMO, 1 == two slice groups, etc.
FmoType               =  0   # 0:  Slice interleave, 1: Scatter, 2: fully flexible, data in FmoConfigFileName, 
                             # 3:  rectangle defined by FmoTopLeftMB and FmoBottomRightMB,
                             #     (only one rectangular slice group supported currently, i.e. FmoNumSliceGroups = 1)
                             # 4-6:evolving slice groups, FmoNumSliceGroups = 1, the evolving method is defined by 
                             #     FmoChangeDirection and FmoChangeRate.
FmoTopLeftMB          = 24   # the top left MB of the rectangular shape for slice groups, MB counted in raster scan order
FmoBottomRightMB      = 74   # the bottom right MB of the rectangular shape for slice groups
FmoChangeDirection    = 1    # 0: box-out clockwise, raster scan or wipe right, 
                             # 1: box-out counter clockwise, reverse raster scan or wipe left
FmoChangeRate         = 4    # SLICE_GROUP_CHANGE_RATE minus 1

FmoConfigFileName     = "fmoconf.cfg"   # not yet used, for future fully flexible MBAmaps

UseRedundantSlice     = 0    # 0: not used, 1: one redundant slice used for each slice (other modes not supported yet)

##########################################################################################
# B Frames
##########################################################################################

NumberBFrames         =  1  # Number of B frames inserted (0=not used)  
QPBPicture            =  30 # Quant. param for B frames (0-51)
DirectModeType        =  0  # Direct Mode Type (0:Temporal 1:Spatial)

##########################################################################################
# SP Frames
##########################################################################################

SPPicturePeriodicity  =  0  # SP-Picture Periodicity (0=not used)
QPSPPicture           = 28  # Quant. param of SP-Pictures for Prediction Error (0-51)
QPSP2Picture          = 27  # Quant. param of SP-Pictures for Predicted Blocks (0-51)


##########################################################################################
# Output Control, NALs
##########################################################################################

SymbolMode             =  1  # Symbol mode (Entropy coding method: 0=UVLC, 1=CABAC)
OutFileMode            =  0  # Output file mode, 0:Annex B, 1:RTP
PartitionMode          =  0  # Partition Mode, 0: no DP, 1: 3 Partitions per Slice

##########################################################################################
# Search Range Restriction / RD Optimization 
##########################################################################################

RestrictSearchRange  =  2  # restriction for (0: blocks and ref, 1: ref, 2: no restrictions)
RDOptimization       =  1  # rd-optimized mode decision (0:off, 1:on, 2: with losses)
LossRateA            = 10  # expected packet loss rate of the channel for the first partition, only valid if RDOptimization = 2
LossRateB            =  0  # expected packet loss rate of the channel for the second partition, only valid if RDOptimization = 2
LossRateC            =  0  # expected packet loss rate of the channel for the third partition, only valid if RDOptimization = 2
NumberOfDecoders     = 30  # Numbers of decoders used to simulate the channel, only valid if RDOptimization = 2
RestrictRefFrames    =  0  # Doesnt allow reference to areas that have been intra updated in a later frame.

##########################################################################################
# Additional Stuff
#########################################################################################

UseConstrainedIntraPred  =  0  # If 1, Inter pixels are not used for Intra macroblock prediction.
LastFrameNumber          =  0  # Last frame number that have to be coded (0: no effect)
ChangeQPP                = 16  # QP (P-frame) for second part of sequence (0-51)
ChangeQPB                = 18  # QP (B-frame) for second part of sequence (0-51)
ChangeQPStart            =  0  # Frame no. for second part of sequence (0: no second part)
AdditionalReferenceFrame =  0  # Additional ref. frame to check (news_a: 16; news_b,c: 24)

NumberofLeakyBuckets     =  8                      # Number of Leaky Bucket values
LeakyBucketRateFile      =  "leakybucketrate.cfg"  # File from which encoder derives rate values
LeakyBucketParamFile     =  "leakybucketparam.cfg" # File where encoder stores leakybucketparams

InterlaceCodingOption    =  0  # (0: frame coding, 1: adaptive frame/field coding, 2:field coding, 3:mb adaptive f/f)

NumberFramesInEnhancementLayerSubSequence  = 0  # number of frames in the Enhanced Scalability Layer(0: no Enhanced Layer)
NumberOfFrameInSecondIGOP                  = 0  # Number of frames to be coded in the second IGOP

WeightedPrediction    = 0   # P picture Weighted Prediction (0=off, 1=explicit mode)  
WeightedBiprediction  = 0   # B picture Weighted Prediciton (0=off, 1=explicit mode,  2=implicit mode)  
StoredBPictures    = 0   # Stored B pictures (0=off, 1=on)

SparePictureOption = 0         # (0: no spare picture info, 1: spare picture available)
SparePictureDetectionThr = 6   # Threshold for spare reference pictures detection
SparePicturePercentageThr = 92    # Threshold for the spare macroblock percentage

PicOrderCntType = 0       # (0: POC mode 0, 1: POC mode 1, 2: POC mode 2)

##########################################################################################
# Loop filter parameters
##########################################################################################
LoopFilterParametersFlag = 0  # Configure loop filter (0=parameter below ingored, 1=parameters sent)
LoopFilterDisable        = 0  # Disable loop filter in slice header (0=Filter, 1=No Filter)
LoopFilterAlphaC0Offset  = -2  # Alpha & C0 offset div. 2, {-6, -5, ... 0, +1, .. +6}
LoopFilterBetaOffset     = -1  # Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}



##########################################################################################
# CABAC context initialization
##########################################################################################
ContextInitMethod   = 1   # Context init (0: fixed, 1: adaptive)
FixedModelNumber    = 0   # model number for fixed decision for inter slices ( 0, 1, or 2 )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -