Lines Matching refs:enccfg
218 struct vpx_codec_enc_cfg enccfg;
224 if ((res = vpx_codec_enc_config_default(iface, &enccfg, 0)) != VPX_CODEC_OK) {
229 dump_enc_cfg(avctx, &enccfg);
231 enccfg.g_w = avctx->width;
232 enccfg.g_h = avctx->height;
233 enccfg.g_timebase.num = avctx->time_base.num;
234 enccfg.g_timebase.den = avctx->time_base.den;
235 enccfg.g_threads = avctx->thread_count;
238 enccfg.g_lag_in_frames = ctx->lag_in_frames;
241 enccfg.g_pass = VPX_RC_FIRST_PASS;
243 enccfg.g_pass = VPX_RC_LAST_PASS;
245 enccfg.g_pass = VPX_RC_ONE_PASS;
249 enccfg.rc_end_usage = VPX_CBR;
250 enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000,
253 enccfg.rc_min_quantizer = avctx->qmin;
255 enccfg.rc_max_quantizer = avctx->qmax;
256 enccfg.rc_dropframe_thresh = avctx->frame_skip_threshold;
259 enccfg.rc_2pass_vbr_bias_pct = round(avctx->qcompress * 100);
260 enccfg.rc_2pass_vbr_minsection_pct =
263 enccfg.rc_2pass_vbr_maxsection_pct =
267 enccfg.rc_buf_sz =
270 enccfg.rc_buf_initial_sz =
272 enccfg.rc_buf_optimal_sz = enccfg.rc_buf_sz * 5 / 6;
276 enccfg.kf_min_dist = avctx->keyint_min;
278 enccfg.kf_max_dist = avctx->gop_size;
280 if (enccfg.g_pass == VPX_RC_FIRST_PASS)
281 enccfg.g_lag_in_frames = 0;
282 else if (enccfg.g_pass == VPX_RC_LAST_PASS) {
306 enccfg.rc_twopass_stats_in = ctx->twopass_stats;
313 enccfg.g_profile = avctx->profile;
315 enccfg.g_error_resilient = ctx->error_resilient;
317 dump_enc_cfg(avctx, &enccfg);
319 res = vpx_codec_enc_init(&ctx->encoder, iface, &enccfg, 0);