Message ID | CACQca=ehMfafFBkMiaa52Vys4=7Qc4RBop_ishuHcFhJurU_2A@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] Allow to modify max qp configuration parameter in libvpx without reseting the encoder | expand |
Context | Check | Description |
---|---|---|
yinshiyou/configure_loongarch64 | warning | Failed to apply patch |
andriy/configure_armv7_RPi4 | warning | Failed to apply patch |
andriy/configure_aarch64_jetson | warning | Failed to apply patch |
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); + } + memset(&layer_id, 0, sizeof(layer_id));
Signed-off-by: Danil Chapovalov <danilchap@webrtc.org> --- libavcodec/libvpxenc.c | 7 +++++++ 1 file changed, 7 insertions(+) en = av_dict_get(frame->metadata, "temporal_id", NULL, 0);