On Wed, 13 Jul 2011, Anton Khirnov wrote:
> if (avctx->level > 0)
> x4->params.i_level_idc = avctx->level;
>
> + if (x4->preset || x4->tune)
> + if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) <
> 0) {
> + av_log(avctx, AV_LOG_ERROR, "Error setting preset/tune
> %s/%s.\n", x4->preset, x4->tune);
> + return AVERROR(EINVAL);
> + }
> +
> + x4->params.pf_log = X264_log;
> + x4->params.p_log_private = avctx;
> + x4->params.i_log_level = X264_LOG_DEBUG;
> +
> + x4->params.b_intra_refresh = avctx->flags2 &
> CODEC_FLAG2_INTRA_REFRESH;
> + x4->params.rc.i_bitrate = avctx->bit_rate / 1000;
> + x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
> + x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000;
> + x4->params.rc.b_stat_write = avctx->flags & CODEC_FLAG_PASS1;
Doesn't this first set the x264 preset, the override all the individual
options according to what's set in avctx, making this kinda useless? The
other extreme of course isn't useful either - in my usecases I need to
override invidiual options but still want to set the bulk of them via a
preset.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel