Lines Matching defs:avctx
39 snprintf(s->avctx->stats_out, 256,
58 static double get_fps(AVCodecContext *avctx)
60 return 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1);
82 AVCodecContext *a = s->avctx;
127 qmin = (int)(qmin * FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset + 0.5);
128 qmax = (int)(qmax * FFABS(s->avctx->b_quant_factor) + s->avctx->b_quant_offset + 0.5);
131 qmin = (int)(qmin * FFABS(s->avctx->i_quant_factor) + s->avctx->i_quant_offset + 0.5);
132 qmax = (int)(qmax * FFABS(s->avctx->i_quant_factor) + s->avctx->i_quant_offset + 0.5);
150 const double buffer_size = s->avctx->rc_buffer_size;
151 const double fps = get_fps(s->avctx);
152 const double min_rate = s->avctx->rc_min_rate / fps;
153 const double max_rate = s->avctx->rc_max_rate / fps;
180 s->avctx->rc_min_vbv_overflow_use, 1));
183 if (s->avctx->debug & FF_DEBUG_RC)
184 av_log(s->avctx, AV_LOG_DEBUG,
200 s->avctx->rc_max_available_vbv_use,
203 if (s->avctx->debug & FF_DEBUG_RC)
204 av_log(s->avctx, AV_LOG_DEBUG,
241 AVCodecContext *a = s->avctx;
273 av_log(s->avctx, AV_LOG_ERROR, "Error evaluating rc_eq \"%s\"\n", s->rc_eq);
284 for (i = 0; i < s->avctx->rc_override_count; i++) {
285 RcOverride *rco = s->avctx->rc_override;
300 if (pict_type == AV_PICTURE_TYPE_I && s->avctx->i_quant_factor < 0.0)
301 q = -q * s->avctx->i_quant_factor + s->avctx->i_quant_offset;
302 else if (pict_type == AV_PICTURE_TYPE_B && s->avctx->b_quant_factor < 0.0)
303 q = -q * s->avctx->b_quant_factor + s->avctx->b_quant_offset;
313 AVCodecContext *a = s->avctx;
315 double fps = get_fps(s->avctx);
347 av_log(s->avctx, AV_LOG_ERROR, "requested bitrate is too low\n");
364 rcc->buffer_index = s->avctx->rc_buffer_size / 2;
424 ff_dlog(s->avctx,
443 s->avctx->qmin, s->avctx->qmax);
446 av_log(s->avctx, AV_LOG_DEBUG,
450 av_log(s->avctx, AV_LOG_DEBUG,
454 av_log(s->avctx, AV_LOG_INFO,
458 av_log(s->avctx, AV_LOG_ERROR,
463 av_log(s->avctx, AV_LOG_ERROR,
510 if (!s->avctx->rc_max_available_vbv_use && s->avctx->rc_buffer_size) {
511 if (s->avctx->rc_max_rate) {
512 s->avctx->rc_max_available_vbv_use = av_clipf(s->avctx->rc_max_rate/(s->avctx->rc_buffer_size*get_fps(s->avctx)), 1.0/3, 1.0);
514 s->avctx->rc_max_available_vbv_use = 1.0;
520 NULL, NULL, 0, s->avctx);
522 av_log(s->avctx, AV_LOG_ERROR, "Error parsing rc_eq \"%s\"\n", s->rc_eq);
539 rcc->buffer_index = s->avctx->rc_initial_buffer_occupancy;
541 rcc->buffer_index = s->avctx->rc_buffer_size * 3 / 4;
543 if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
548 p = s->avctx->stats_in;
571 p = s->avctx->stats_in;
596 av_log(s->avctx, AV_LOG_ERROR,
611 if (!(s->avctx->flags & AV_CODEC_FLAG_PASS2)) {
618 if (s->avctx->qblur > 1.0) {
619 av_log(s->avctx, AV_LOG_ERROR, "qblur too large\n");
663 rcc->pass1_wanted_bits += s->bit_rate / get_fps(s->avctx);
683 const double fps = get_fps(s->avctx);
684 const int buffer_size = s->avctx->rc_buffer_size;
685 const double min_rate = s->avctx->rc_min_rate / fps;
686 const double max_rate = s->avctx->rc_max_rate / fps;
696 av_log(s->avctx, AV_LOG_ERROR, "rc buffer underflow\n");
697 if (frame_size > max_rate && s->qscale == s->avctx->qmax) {
698 av_log(s->avctx, AV_LOG_ERROR, "max bitrate possibly too small or try trellis with large lmax or increase qmax\n");
713 if (s->avctx->debug & FF_DEBUG_RC)
714 av_log(s->avctx, AV_LOG_DEBUG, "stuffing %d bytes\n", stuffing);
742 const float lumi_masking = s->avctx->lumi_masking / (128.0 * 128.0);
743 const float dark_masking = s->avctx->dark_masking / (128.0 * 128.0);
744 const float temp_cplx_masking = s->avctx->temporal_cplx_masking;
745 const float spatial_cplx_masking = s->avctx->spatial_cplx_masking;
746 const float p_masking = s->avctx->p_masking;
752 const int qmin = s->avctx->mb_lmin;
753 const int qmax = s->avctx->mb_lmax;
878 AVCodecContext *a = s->avctx;
889 fps = get_fps(s->avctx);
902 if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
936 if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
999 if (s->avctx->debug & FF_DEBUG_RC) {
1000 av_log(s->avctx, AV_LOG_DEBUG,