Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Jan Ekström" <jeebjp@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Allow to modify max qp configuration parameter in libvpx without reseting the encoder
Date: Mon, 14 Mar 2022 17:27:36 +0200
Message-ID: <CAEu79SaTfOsmttxMH4nCHhY4NU5b2zKB33n31=rbH_Zy-XW_ZA@mail.gmail.com> (raw)
In-Reply-To: <20220314130459.88494-1-danilchap@google.com>

On Mon, Mar 14, 2022 at 3:05 PM Danil Chapovalov
<danilchap-at-google.com@ffmpeg.org> wrote:
>
> ---

Probably something a la

avcodec/libvpxenc: enable dynamic quantizer reconfiguration

?

>  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);
> +            }
> +

There is side data already defined for quantizers, AVVideoEncParams /
AV_FRAME_DATA_VIDEO_ENC_PARAMS .

In other words, this should be handled in a similar manner to ROI, not
as an ad-hoc metadata key in the AVFrame.

Cheers,
Jan
_______________________________________________
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".

  reply	other threads:[~2022-03-14 15:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 13:04 Danil Chapovalov
2022-03-14 15:27 ` Jan Ekström [this message]
2022-03-16 12:13   ` Danil Chapovalov
2022-03-16 12:37     ` Lynne
2022-03-19 14:25       ` Anton Khirnov
  -- strict thread matches above, loose matches on Subject: below --
2022-03-09 13:27 Danil Chapovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEu79SaTfOsmttxMH4nCHhY4NU5b2zKB33n31=rbH_Zy-XW_ZA@mail.gmail.com' \
    --to=jeebjp@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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