From patchwork Wed Oct 19 22:47:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Degawa X-Patchwork-Id: 38828 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp603033pzb; Wed, 19 Oct 2022 15:50:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6iEB8cKPCEFmbqtQm2tj5tL88+PM8JidFk7e1dHZxErlgCykEJi3oIgmoF0nvuPmGb9z4G X-Received: by 2002:a17:907:3f04:b0:741:4bf4:fe42 with SMTP id hq4-20020a1709073f0400b007414bf4fe42mr8806884ejc.664.1666219837940; Wed, 19 Oct 2022 15:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666219837; cv=none; d=google.com; s=arc-20160816; b=U4pDqRw37Vv+3OQDE61W2qBnKhl95Qu84hS/HV77YYogEPf/GZ1mctrtxfPnxzoV0q JbkiTI/+ynx5a8zVbgijTMWKrQWiwzyjtdmwfjI5EF5JlP5N8HWJr4ybBeqkFV10xDdp ucamjJ82nUXS8Qecl7A0cloTulq4Tw5wHD9zVSDLBHA8R8tR8wURt6G8fKr8cJF55uFH appIq1x14OC459rg8KyIzKRQjrbsqO/ogocR7Kz4EGkVh6lC2fXK+vO9uh52izwjX0bM gCQSvcz/Q6CIzCOYkTm4pzvlx6aKCKpxbp2oNwuZyahLB5+StX8Ntz4JqYCo5IdY9V8D ORfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=o4cM8yEmn5mGwSEmTblpt3wgq0OzaQ2p7VUDZykOKFI=; b=ZV7tc6Zg+9fRFCKWlISWn5nV7VWY9j36E2p5p+YcOJR/wwgljREIG5Ut2sgc6dKyWJ 6mCqO5P6WyN3EiZciOWNtjtAf54s3YsQLaVnwn3TwVJHxaUe+OHe1nb60Ba7PlxVQlHV FipTmM/JCm6Mzj3daD/Y8/H07DfEyzXq4/pzClwlXhLHztaGIhTskchA1izQTKZoh3u4 th3aMHOeK3+BIgazJ202Z8bPxoq5+864MFEiZDSQeZuUrBoY6Fm7M1TnHgclBveh8gqs g7iKvW6E49dauMhk+bzyHW7jYd6I+r/wxiVygAvdO62M2oIQp8IYfvMOvxtAROFxUfG8 wrYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@randomderp.com header.s=default header.b="f/i+EwfL"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=randomderp.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g12-20020a056402114c00b00451e0d930dfsi13663625edw.497.2022.10.19.15.50.37; Wed, 19 Oct 2022 15:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@randomderp.com header.s=default header.b="f/i+EwfL"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=randomderp.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A8FD68BD9E; Thu, 20 Oct 2022 01:50:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from degawa.com (174-127-109-95.slc.westdc.net [174.127.109.95]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E567268B76F for ; Thu, 20 Oct 2022 01:50:28 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomderp.com; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oex2wVFVt41PoGzOfdX6ZFEkZkMh+FBMDdET+K14NEg=; b=f/i+EwfLB2y123CA0rB2LKKXbq w9GiUnyoWvUjUb7PBu19glGfn4Z2xwnx/a2m5QNMx4u9+qcHtyrhKjukisisY8ygu1j59KEq/A1ak C+9t9dByKMrEj7dR4SsLtjuLj1tvIb9/T0R03pCM+eJBL1xeCmZVbac4E21vF2T21CV1y5rLpNXPM DYxyLkjDtFYt30+6W/F0h2/FsmOmQoG7sqVwPZ+YU5oA2O4QQ1QpqHDS0+zIdomqpM/8RxIK9+2vR XHL4yAq4WJeSUG7PA+AtT/BlsZAVy9Xe6BaNzkXvdEZtnibZ1ntWmpQkNrS3SEieAn55d2oNBz3ty DxfY0eYQ==; Received: from c-75-64-74-17.hsd1.tn.comcast.net ([75.64.74.17]:49782 helo=localhost.localdomain) by slmp-550-1.slc.westdc.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1olHtM-0002CA-AN; Wed, 19 Oct 2022 16:50:26 -0600 From: Christopher Degawa To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Oct 2022 17:47:12 -0500 Message-Id: <20221019224712.194658-2-ccom@randomderp.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019224712.194658-1-ccom@randomderp.com> References: <20221019224712.194658-1-ccom@randomderp.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - slmp-550-1.slc.westdc.net X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - randomderp.com X-Get-Message-Sender-Via: slmp-550-1.slc.westdc.net: authenticated_id: ccom/from_h X-Authenticated-Sender: slmp-550-1.slc.westdc.net: ccom@randomderp.com X-Source: X-Source-Args: X-Source-Dir: Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/libsvtav1: replace vbv_bufsize with maximum_buffer_size_ms 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 Cc: Christopher Degawa Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 5WL7tBEAj60k From: Christopher Degawa svt-av1 v1.2.0 has deprecated vbv_bufsize in favor of using - maximum_buffer_size_ms (--buf-sz) - starting_buffer_level_ms (--buf-initial-sz) - optimal_buffer_level_ms (--buf-optimal-sz) and vbv_bufsize has not been in use since svt-av1 v0.8.6 Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 28da206cf8..74dad9892b 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -179,7 +179,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->min_qp_allowed = avctx->qmin; } param->max_bit_rate = avctx->rc_max_rate; - param->vbv_bufsize = avctx->rc_buffer_size; + param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000 / avctx->bit_rate; if (svt_enc->crf > 0) { param->qp = svt_enc->crf; @@ -296,7 +296,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, avctx->bit_rate = param->rate_control_mode > 0 ? param->target_bit_rate : 0; avctx->rc_max_rate = param->max_bit_rate; - avctx->rc_buffer_size = param->vbv_bufsize; + avctx->rc_buffer_size = param->maximum_buffer_size_ms * avctx->bit_rate / 1000; if (avctx->bit_rate || avctx->rc_max_rate || avctx->rc_buffer_size) { AVCPBProperties *cpb_props = ff_add_cpb_side_data(avctx);