- video_enc->qmin = video_qmin;
- video_enc->qmax = video_qmax;
- video_enc->max_qdiff = video_qdiff;
- video_enc->qblur = video_qblur;
- video_enc->qcompress = video_qcomp;
- video_enc->rc_eq = video_rc_eq;
- video_enc->rc_max_rate = video_rc_max_rate;
- video_enc->rc_min_rate = video_rc_min_rate;
- video_enc->rc_buffer_size = video_rc_buffer_size;
- video_enc->rc_buffer_aggressivity= video_rc_buffer_aggressivity;
- video_enc->i_quant_factor = video_i_qfactor;
- video_enc->b_quant_factor = video_b_qfactor;
- video_enc->i_quant_offset = video_i_qoffset;
- video_enc->b_quant_offset = video_b_qoffset;
- video_enc->dct_algo = dct_algo;
- video_enc->idct_algo = idct_algo;
- if(packet_size){
- video_enc->rtp_mode= 1;
- video_enc->rtp_payload_size= packet_size;
- }
-
- if (do_psnr)
- video_enc->get_psnr = 1;
- else
- video_enc->get_psnr = 0;
+ video_enc->qmin = video_qmin;
+ video_enc->qmax = video_qmax;
+ video_enc->mb_qmin = video_mb_qmin;
+ video_enc->mb_qmax = video_mb_qmax;
+ video_enc->max_qdiff = video_qdiff;
+ video_enc->qblur = video_qblur;
+ video_enc->qcompress = video_qcomp;
+ video_enc->rc_eq = video_rc_eq;
+ video_enc->debug= debug;
+
+ p= video_rc_override_string;
+ for(i=0; p; i++){
+ int start, end, q;
+ int e=sscanf(p, "%d,%d,%d", &start, &end, &q);
+ if(e!=3){
+ fprintf(stderr, "error parsing rc_override\n");
+ exit(1);
+ }
+ video_enc->rc_override=
+ av_realloc(video_enc->rc_override,
+ sizeof(RcOverride)*(i+1));
+ video_enc->rc_override[i].start_frame= start;
+ video_enc->rc_override[i].end_frame = end;
+ if(q>0){
+ video_enc->rc_override[i].qscale= q;
+ video_enc->rc_override[i].quality_factor= 1.0;
+ }
+ else{
+ video_enc->rc_override[i].qscale= 0;
+ video_enc->rc_override[i].quality_factor= -q/100.0;
+ }
+ p= strchr(p, '/');
+ if(p) p++;
+ }
+ video_enc->rc_override_count=i;
+
+ video_enc->rc_max_rate = video_rc_max_rate;
+ video_enc->rc_min_rate = video_rc_min_rate;
+ video_enc->rc_buffer_size = video_rc_buffer_size;
+ video_enc->rc_buffer_aggressivity= video_rc_buffer_aggressivity;
+ video_enc->rc_initial_cplx= video_rc_initial_cplx;
+ video_enc->i_quant_factor = video_i_qfactor;
+ video_enc->b_quant_factor = video_b_qfactor;
+ video_enc->i_quant_offset = video_i_qoffset;
+ video_enc->b_quant_offset = video_b_qoffset;
+ video_enc->dct_algo = dct_algo;
+ video_enc->idct_algo = idct_algo;
+ video_enc->strict_std_compliance = strict;
+ if(packet_size){
+ video_enc->rtp_mode= 1;
+ video_enc->rtp_payload_size= packet_size;
+ }