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 <c...@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-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to