From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id BD482425A3 for ; Sun, 20 Nov 2022 19:19:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EB65968BBAD; Sun, 20 Nov 2022 21:19:22 +0200 (EET) Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 65FA368AF32 for ; Sun, 20 Nov 2022 21:19:16 +0200 (EET) Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-142612a5454so10967797fac.2 for ; Sun, 20 Nov 2022 11:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=xyIDaOBF0BM3FPg7tv+/CFa+h7M5C6hKRCSt+FCprBs=; b=DYYOTNbkOsoSahH4w/GyceymuwYA1OrD3SL4bTOMf3d9cXaGQwlQJp36/k20+lTYnO h+hHG1rZ0XRGCozo3vLtOYC8YCwBCMRGgfPj1AZjtZsnkKwcmzpDkrdyFl2FFeIkQtCA fxtAGfzIyvmCmg6gUnVK++EFCmpW+otTGIg6qoUBso6ecEKLBl8du/GvpqVPKawmjqQj GsgG/nTYqT30j/CEJ96huRaxAzOEny8xnespgKiG+UA4PuUayRMLXOLh6Yu47XnLMwY+ NUCMelj1eFFVDVk+GtgCSpxHOJVTcs9VjF+5seBGGsT/yd3srs7vz0nTKlagZlgYna+c 18Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xyIDaOBF0BM3FPg7tv+/CFa+h7M5C6hKRCSt+FCprBs=; b=nb4xIElk3UaJpKGP6UykXz9QTb/hNgrttFGLyCrEFLvL6j29S+sBb/FcOWdBEV6CfF 2rkbHpAEcGnmS4e1CdyyhyapshqcLybVibwBOdHPjzh4Goe2esLlC+qGHn5D0y/2A5O9 70+apaTFcpG7+yYUDf2+etIYb2t2LUSTIr2CNbKJK2zr+u1xKCATR87Y8bN5U7x/Xwps riFGg1klM8B/eaEwtbSlU3PXsIrp8xl37lnlOyY2UEnS8E19UtbnzRObp8T+V6NFm+6P pUE5y+ovAVTDkPcpsOCkLadfcpBCzN4N6X1RAkFl6BTyPugRDUYLK91EYMr0iQAbNSm6 0Tew== X-Gm-Message-State: ANoB5pkO8tiGOS5OZ0eEkJ9Ukd2gdHHjIWc9SoocevvrYzhws1Dipoaf kn/8swZ2txPwnP1LCVDZdKP49QXE20I= X-Google-Smtp-Source: AA0mqf6X6HpAbi0SLhw//0w1hEmhDsZA7/h2TnpNDk2U0XN0koPodOUUKS/zvG1n58H9Y+cxnayfCQ== X-Received: by 2002:a05:6870:c895:b0:13a:dd7e:7bda with SMTP id er21-20020a056870c89500b0013add7e7bdamr11433001oab.222.1668971954526; Sun, 20 Nov 2022 11:19:14 -0800 (PST) Received: from [192.168.0.15] ([181.85.72.69]) by smtp.gmail.com with ESMTPSA id y9-20020a4ac409000000b0049e9a80c690sm3510549oop.1.2022.11.20.11.19.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Nov 2022 11:19:14 -0800 (PST) Message-ID: Date: Sun, 20 Nov 2022 16:19:47 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20221120023350.1684083-1-ccom@randomderp.com> <20221120190736.1781675-1-ccom@randomderp.com> From: James Almer In-Reply-To: <20221120190736.1781675-1-ccom@randomderp.com> Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 > --- > 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".