[FFmpeg-devel] [PATCH] avcodec/libvpxenc: enable dynamic max quantizer parameter reconfiguration
Lynne
dev at lynne.ee
Wed Mar 16 14:39:42 EET 2022
16 Mar 2022, 13:07 by danilchap-at-google.com at ffmpeg.org:
> ---
> libavcodec/libvpxenc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
> index 8f94ba15dc..45baeed435 100644
> --- a/libavcodec/libvpxenc.c
> +++ b/libavcodec/libvpxenc.c
> @@ -1658,6 +1658,13 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
> flags |= strtoul(en->value, NULL, 10);
> }
>
> + en = av_dict_get(frame->metadata, "max-quantizer", NULL, 0);
> + if (en) {
> + struct vpx_codec_enc_cfg cfg = *enccfg;
> + cfg.rc_max_quantizer = strtoul(en->value, NULL, 10);
> + vpx_codec_enc_config_set(&ctx->encoder, &cfg);
> + }
>
I was going to NAK the earlier patch, but forgot.
Please think of a better way than stuffing random data in
inappropriate fields, and fix the earlier patch that was mistakenly
merged to not do that.
More information about the ffmpeg-devel
mailing list