Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/libvpxenc: enable dynamic max quantizer parameter reconfiguration
@ 2022-03-16 12:07 Danil Chapovalov
  2022-03-16 12:39 ` Lynne
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Danil Chapovalov @ 2022-03-16 12:07 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Danil Chapovalov

---
 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);
+            }
+
             memset(&layer_id, 0, sizeof(layer_id));
 
             en = av_dict_get(frame->metadata, "temporal_id", NULL, 0);
-- 
2.35.1.723.g4982287a31-goog

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-04-06  1:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 12:07 [FFmpeg-devel] [PATCH] avcodec/libvpxenc: enable dynamic max quantizer parameter reconfiguration Danil Chapovalov
2022-03-16 12:39 ` Lynne
2022-03-16 23:53   ` James Zern
2022-03-17 18:45     ` Jan Ekström
2022-03-17 19:07 ` Danil Chapovalov
2022-03-24 13:11 ` Danil Chapovalov
2022-03-24 18:27   ` James Zern
2022-03-28 14:04     ` Danil Chapovalov
2022-03-29 20:58       ` James Zern
2022-03-30 18:24   ` Danil Chapovalov
2022-03-31 17:31     ` James Zern
2022-04-06  1:04       ` James Zern

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git