Hi All,

I am filling AVCodecContext structure with below given parameters and
their values.
Please suggest this is the right combination of parameters and their
values to acheive Constant Bit Rate.

                        (*apContext)->bit_rate = 60000;                         
                        (*apContext)->profile = 0;                  /* New */
                        (*apContext)->pix_fmt = PIX_FMT_YUV420P;
                        (*apContext)->codec_id = CODEC_ID_H263P;                
/* New */
                        (*apContext)->codec_type = CODEC_TYPE_VIDEO;
                        (*apContext)->width = 352;
                        (*apContext)->height = 288;
                        (*apContext)->time_base.den = 10;
                        (*apContext)->time_base.num = 1;                        
                        (*apContext)->gop_size = 100;           
                        
                        /* zero for h263 */
                        (*apContext)->mpeg_quant = 0;
                        //(*apContext)->flags|=CODEC_FLAG_INPUT_PRESERVED;
                        (*apContext)->flags|=CODEC_FLAG_PASS1;
                        (*apContext)->flags|=CODEC_FLAG_NORMALIZE_AQP;//    // 1
                        (*apContext)->flags&=~CODEC_FLAG_H263P_UMV;
                        (*apContext)->flags&=~CODEC_FLAG_4MV;
                        (*apContext)->rc_qsquish = 0;
                        (*apContext)->rc_eq = "tex^qComp";//"mv";
                        (*apContext)->qmin = 3;
                        (*apContext)->trellis = 1;
                        //(*apContext)->qmax = 15;
                        (*apContext)->me_cmp = 3;
                        (*apContext)->me_sub_cmp = 3;
                        (*apContext)->rc_min_rate = 60000;
                        (*apContext)->rc_max_rate = 60000;
                        (*apContext)->rc_buffer_size = 60000;

                        //(*apContext)->i_quant_factor = (float)-0.6;
                        /* qscale offset between P and I-frames */
                        //(*apContext)->i_quant_offset = (float)0.0;

                        /* Macro Block mb */
                        (*apContext)->mb_decision = FF_MB_DECISION_RD;          
        
                        (*apContext)->me_subpel_quality = 8;
                        /* motion estimation me*/       
                        (*apContext)->me_method =  
/*ME_FULL;/*ME_ZERO*/ME_EPZS;                
                        (*apContext)->me_range = 0;             

                        (*apContext)->scenechange_threshold = 100000000;        
        

                        avcodec_open (*apContext, apCodec);
Thanks in Advance
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to