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

📄 encoder.cfg

📁 H.264编码实现
💻 CFG
📖 第 1 页 / 共 3 页
字号:
OutputBitDepthLuma      = 8     # Output Bit Depth for Luma color component (8...14 bits)
OutputBitDepthChroma    = 8     # Output Bit Depth for Chroma color components (8...14 bits)

CbQPOffset              = 0     # Chroma QP offset for Cb-part (-51..51)
CrQPOffset              = 0     # Chroma QP offset for Cr-part (-51..51)
Transform8x8Mode        = 1     # (0: only 4x4 transform, 1: allow using 8x8 transform additionally, 2: only 8x8 transform)
ReportFrameStats        = 0     # (0:Disable Frame Statistics 1: Enable)
DisplayEncParams        = 0     # (0:Disable Display of Encoder Params 1: Enable)
Verbose                 = 1     # level of display verboseness (0:short, 1:normal, 2:detailed)

########################################################################################
#Q-Matrix (FREXT)
########################################################################################
QmatrixFile              = "q_matrix.cfg"

ScalingMatrixPresentFlag = 0    # Enable Q_Matrix  (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag0  = 3    # Intra4x4_Luma    (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag1  = 3    # Intra4x4_ChromaU (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag2  = 3    # Intra4x4_chromaV (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag3  = 3    # Inter4x4_Luma    (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag4  = 3    # Inter4x4_ChromaU (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag5  = 3    # Inter4x4_ChromaV (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag6  = 3    # Intra8x8_Luma    (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag7  = 3    # Inter8x8_Luma    (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag8  = 1    # Intra8x8_ChromaU for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag9  = 3    # Inter8x8_ChromaU for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag10 = 2    # Intra8x8_ChromaV for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)
ScalingListPresentFlag11 = 3    # Inter8x8_ChromaV for 4:4:4 (0 Not present, 1 Present in SPS, 2 Present in PPS, 3 Present in both SPS & PPS)

########################################################################################
#Rounding Offset control
########################################################################################

OffsetMatrixPresentFlag  = 1    # Enable Explicit Offset Quantization Matrices  (0: disable 1: enable)
QOffsetMatrixFile        = "q_offset.cfg" # Explicit Quantization Matrices file

AdaptiveRounding         = 1    # Enable Adaptive Rounding based on JVT-N011 (0: disable, 1: enable)
AdaptRoundingFixed       = 1    # Enable Global Adaptive rounding for all qps (0: disable, 1: enable - default/old)
AdaptRndPeriod           = 16   # Period in terms of MBs for updating rounding offsets. 
                                # 0 performs update at the picture level. Default is 16. 1 is as in JVT-N011.
AdaptRndChroma           = 1    # Enables coefficient rounding adaptation for chroma

AdaptRndWFactorIRef      = 4    # Adaptive Rounding Weight for I/SI slices in reference pictures /4096
AdaptRndWFactorPRef      = 4    # Adaptive Rounding Weight for P/SP slices in reference pictures /4096
AdaptRndWFactorBRef      = 4    # Adaptive Rounding Weight for B slices in reference pictures /4096
AdaptRndWFactorINRef     = 4    # Adaptive Rounding Weight for I/SI slices in non reference pictures /4096
AdaptRndWFactorPNRef     = 4    # Adaptive Rounding Weight for P/SP slices in non reference pictures /4096
AdaptRndWFactorBNRef     = 4    # Adaptive Rounding Weight for B slices in non reference pictures /4096

AdaptRndCrWFactorIRef    = 4    # Chroma Adaptive Rounding Weight for I/SI slices in reference pictures /4096
AdaptRndCrWFactorPRef    = 4    # Chroma Adaptive Rounding Weight for P/SP slices in reference pictures /4096
AdaptRndCrWFactorBRef    = 4    # Chroma Adaptive Rounding Weight for B slices in reference pictures /4096
AdaptRndCrWFactorINRef   = 4    # Chroma Adaptive Rounding Weight for I/SI slices in non reference pictures /4096
AdaptRndCrWFactorPNRef   = 4    # Chroma Adaptive Rounding Weight for P/SP slices in non reference pictures /4096
AdaptRndCrWFactorBNRef   = 4    # Chroma Adaptive Rounding Weight for B slices in non reference pictures /4096

################################################################
# Rate Distortion Optimized Quantization
################################################################
UseRDOQuant              =  0 # Use Rate Distortion Optimized Quantization (0=disable, 1=enable)
RDOQ_CR                  =  0 # Enable Rate Distortion Optimized Quantization for Chroma components (0=disable, 1=enable)
RDOQ_QP_Num              =  1 # 1-5: Number of QP tested in RDO_Q (I/P/B slice)
RDOQ_CP_Mode             =  1 # copy Mode from first QP tested
RDOQ_CP_MV               =  0 # copy MV from first QP tested
RDOQ_Fast                =  0 # Fast RDOQ decision method for multiple QPs

########################################################################################
#Lossless Coding (FREXT)
########################################################################################

QPPrimeYZeroTransformBypassFlag = 0    # Enable lossless coding when qpprime_y is zero (0 Disabled, 1 Enabled)

########################################################################################
#Fast Motion Estimation Control Parameters
########################################################################################

SearchMode               = 0    # Motion estimation mode
                                # -1 = Full Search
                                #  0 = Fast Full Search (default)
                                #  1 = UMHexagon Search
                                #  2 = Simplified UMHexagon Search
                                #  3 = Enhanced Predictive Zonal Search (EPZS)
UMHexDSR                 = 1    # Use Search Range Prediction. Only for UMHexagonS method
                                # (0:disable, 1:enabled/default)
UMHexScale               = 3    # Use Scale_factor for different image sizes. Only for UMHexagonS method
                                # (0:disable, 3:/default)
                                # Increasing value can speed up Motion Search.

EPZSPattern              = 2    # Select EPZS primary refinement pattern.
                                # (0: small diamond, 1: square, 2: extended diamond/default,
                                # 3: large diamond, 4: SBP Large Diamond,
                                # 5: PMVFAST )
EPZSDualRefinement       = 3    # Enables secondary refinement pattern.
                                # (0:disabled, 1: small diamond, 2: square,
                                # 3: extended diamond/default, 4: large diamond,
                                # 5: SBP Large Diamond, 6: PMVFAST )
EPZSFixedPredictors      = 2    # Enables Window based predictors
                                # (0:disabled, 1: P only, 2: P and B/default)
EPZSTemporal             = 1    # Enables temporal predictors
                                # (0: disabled, 1: enabled/default)
EPZSSpatialMem           = 1    # Enables spatial memory predictors
                                # (0: disabled, 1: enabled/default)
EPZSBlockType            = 1    # Enables block type Predictors
                                # (0: disabled, 1: enabled/default)
EPZSMinThresScale        = 0    # Scaler for EPZS minimum threshold (0 default).
                                # Increasing value can speed up encoding.
EPZSMedThresScale        = 1    # Scaler for EPZS median threshold (1 default).
                                # Increasing value can speed up encoding.
EPZSMaxThresScale        = 2    # Scaler for EPZS maximum threshold (1 default).
                                # Increasing value can speed up encoding.
EPZSSubPelME             = 1    # EPZS Subpel ME consideration
EPZSSubPelMEBiPred       = 1    # EPZS Subpel ME consideration for BiPred partitions
EPZSSubPelThresScale     = 2    # EPZS Subpel ME Threshold scaler
EPZSSubPelGrid           = 1    # Perform EPZS using a subpixel grid

########################################################################################
# SEI Parameters
########################################################################################

ToneMappingSEIPresentFlag = 0    # Enable Tone mapping SEI  (0 Not present, 1 Present)
ToneMappingFile           = "ToneMapping.cfg"

GenerateSEIMessage        = 0                    # Generate an SEI Text Message
SEIMessageText            = "H.264/AVC Encoder"  # Text SEI Message

########################################################################################
# VUI Parameters
########################################################################################
# the variables below do not affect encoding and decoding
# (many are dummy variables but others can be useful when supported by the decoder)

EnableVUISupport                                = 0      # Enable VUI Parameters

# display parameters
VUI_aspect_ratio_info_present_flag              = 0
VUI_aspect_ratio_idc                            = 1
VUI_sar_width                                   = 0
VUI_sar_height                                  = 0
VUI_overscan_info_present_flag                  = 0
VUI_overscan_appropriate_flag                   = 0
VUI_video_signal_type_present_flag              = 0
VUI_video_format                                = 5
VUI_video_full_range_flag                       = 0
VUI_colour_description_present_flag             = 0
VUI_colour_primaries                            = 2
VUI_transfer_characteristics                    = 2
VUI_matrix_coefficients                         = 2
VUI_chroma_location_info_present_flag           = 0
VUI_chroma_sample_loc_type_top_field            = 0
VUI_chroma_sample_loc_type_bottom_field         = 0
VUI_timing_info_present_flag                    = 0
VUI_num_units_in_tick                           = 1000
VUI_time_scale                                  = 60000
VUI_fixed_frame_rate_flag                       = 0

# nal hrd parameters
VUI_nal_hrd_parameters_present_flag             = 0
VUI_nal_cpb_cnt_minus1                          = 0
VUI_nal_bit_rate_scale                          = 0
VUI_nal_cpb_size_scale                          = 0
VUI_nal_bit_rate_value_minus1                   = 0
VUI_nal_cpb_size_value_minus1                   = 0
VUI_nal_vbr_cbr_flag                            = 0
VUI_nal_initial_cpb_removal_delay_length_minus1 = 23
VUI_nal_cpb_removal_delay_length_minus1         = 23
VUI_nal_dpb_output_delay_length_minus1          = 23
VUI_nal_time_offset_length                      = 24

# vlc hrd parameters
VUI_vcl_hrd_parameters_present_flag             = 0
VUI_vcl_cpb_cnt_minus1                          = 0
VUI_vcl_bit_rate_scale                          = 0
VUI_vcl_cpb_size_scale                          = 0
VUI_vcl_bit_rate_value_minus1                   = 0
VUI_vcl_cpb_size_value_minus1                   = 0
VUI_vcl_vbr_cbr_flag                            = 0
VUI_vcl_initial_cpb_removal_delay_length_minus1 = 23
VUI_vcl_cpb_removal_delay_length_minus1         = 23
VUI_vcl_dpb_output_delay_length_minus1          = 23
VUI_vcl_time_offset_length                      = 24
VUI_low_delay_hrd_flag                          = 0

# other params (i.e. bitsream restrictions)
VUI_pic_struct_present_flag                     = 0
VUI_bitstream_restriction_flag                  = 0
VUI_motion_vectors_over_pic_boundaries_flag     = 1
VUI_max_bytes_per_pic_denom                     = 0
VUI_max_bits_per_mb_denom                       = 0
VUI_log2_max_mv_length_vertical                 = 16
VUI_log2_max_mv_length_horizontal               = 16
VUI_num_reorder_frames                          = 16
VUI_max_dec_frame_buffering                     = 16

⌨️ 快捷键说明

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