Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set
Date: Sun, 20 Nov 2022 16:19:47 -0300
Message-ID: <bc943bca-b100-2d4c-caac-40e547d62a92@gmail.com> (raw)
In-Reply-To: <20221120190736.1781675-1-ccom@randomderp.com>

On 11/20/2022 4:07 PM, Christopher Degawa wrote:
> maximum_buffer_size_ms should only be set if both are specified or if
> the user sets it through -svtav1-params buf-sz=val
> 
> Signed-off-by: Christopher Degawa <ccom@randomderp.com>
> ---
>   libavcodec/libsvtav1.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
> index 48cd58a0b3..7605baddfe 100644
> --- a/libavcodec/libsvtav1.c
> +++ b/libavcodec/libsvtav1.c
> @@ -179,7 +179,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
>           param->min_qp_allowed       = avctx->qmin;
>       }
>       param->max_bit_rate             = avctx->rc_max_rate;
> -    param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000LL / avctx->bit_rate;
> +    if (avctx->bit_rate && avctx->rc_buffer_size)
> +        param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / avctx->bit_rate;

Will apply.

>   
>       if (svt_enc->crf > 0) {
>           param->qp                   = svt_enc->crf;
_______________________________________________
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-11-20 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20  2:33 [FFmpeg-devel] [PATCH] avcodec/libsvtav1: guard against bit_rate being zero Christopher Degawa
2022-11-20 11:50 ` James Almer
2022-11-20 19:07 ` [FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set Christopher Degawa
2022-11-20 19:19   ` James Almer [this message]

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=bc943bca-b100-2d4c-caac-40e547d62a92@gmail.com \
    --to=jamrial@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