Encoder parameter setting x264

Source: Internet
Author: User






Void
X1__param_default
(X1__param_t * PARAM)

{

......


 
/* Video properties */



Param-> I _csp
= X264_csp_i420;


Param-> I _width
= 352;



Param-> I _height
= 288;


Param-> VUI. I _sar_width = 0;


Param-> VUI. I _sar_height = 0;


Param-> I _fps_num
= 25;


Param-> I _fps_den
= 1;


Param-> I _level_idc
= 40;/* level 4.0 is sufficient for 720x576



16 reference frames */


 
/* Encoder parameters */



 


Param-> I _frame_reference = 1;
//

Number of reference frames


Param-> I _keyint_max = 250;
//


Max
IDR

Frame spacing, default
250


 
Param-> I _keyint_min = 25;


/
/

Minimum
IDR

Frame spacing, default
25


 
Param-> I _bframe = 0;
//


In
IP

Pluggable between frames
B

Maximum number of frames, Range
0 ~ 16

, Default
0


Param-> I _scenecut_threshold = 40;
//


Dynamic screen change limit. When this value is exceeded, insert
I

Frame, default
40


Param-> B _bframe_adaptive = 0 ;//


It seems adaptive.
B

Number of frames


Param-> I _bframe_bias = 0;
//


Insert Control
B

Frame determination, Range
-100 ~ + 100

, The higher the value, the easier it is to insert
B

Frame, default
0


Param-> B _bframe_pyramid = 0;
//


Allow
B

Frame Reference Frame

 

Param-> B _deblocking_filter = 0;

Param-> I _deblocking_filter_alphac0 = 0;


Param-> I _deblocking_filter_beta = 0;

 


Param-> B _cabac = 0;


Param-> I _cabac_init_idc =-1;

 


Param-> RC. B _cbr = 0 ;//


Whether to use bitrate Control


Param-> RC. I _bitrate = 1000;


Param-> RC. f_rate_tolerance = 1.0;


Param-> RC. I _vbv_max_bitrate = 0;


Param-> RC. I _vbv_buffer_size = 0;


Param-> RC. f_vbv_buffer_init = 0.9;

Param-> RC. I _qp_constant = 30;

Param-> RC. I _qp_min = 20;


Param-> RC. I _qp_max = 51;


Param-> RC. I _qp_step = 4;


Param-> RC. f_ip_factor = 1.4;


Param-> RC. f_pb_factor = 1.3;

 


Param-> RC. B _stat_write = 0;


Param-> RC. psz_stat_out = "x264_2pass.log ";


Param-> RC. B _stat_read = 0;


Param-> RC. psz_stat_in = "x264_2pass.log ";


Param-> RC. psz_rc_eq = "blurcplx ^ (1-qcomp )";


Param-> RC. f_qcompress = 1.0;


Param-> RC. f_qblur = 1.0;


Param-> RC. f_complexity_blur = 20;

 


/* Log */



Param-> pf_log = x264_log_default;


Param-> p_log_private = NULL;


Param-> I _log_level = x1__log_none;

 


 
/**/



Param-> analyze. Intra = x264_analyse_i4x4 ;//


Intra-frame prediction Mode


Param-> analyze. Inter = x264_analyse_i4x4 | x264_analyse_psub16x16 | x264_analyse_bsub16x16 ;//


Interframe prediction Mode


Param-> analyze. I _direct_mv_pred = x264_direct_pred_temporal;


Param-> analyze. I _me_method = x1__me_dia ;//


It seems to be the algorithm selection of motion compensation.


Param-> analyze. I _me_range = 8;
// Me


Is
Umh/ESA

Search radius (in pixels), maximum
64

, Default
16


Param-> analyze. I _subpel_refine = 3 ;//


Sub-pixel search range


Param-> analyze. B _chroma_me = 1;


Param-> analyze. I _mv_range = 512 ;//


Motion Vector search range


Param-> analyze. I _chroma_qp_offset = 0;
//


Quantization difference between the color and brightness
,

Range
-12 ~ + 12

, Default
0


Param-> analyze. B _snr = 0 ;//


Signal-to-Noise Ratio

 


Param-> B _aud = 0;

}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.