From patchwork Sat Dec 30 21:23:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Tomas_H=C3=A4rdin?= X-Patchwork-Id: 45402 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6623:b0:194:e134:edd4 with SMTP id n35csp5486428pzh; Sat, 30 Dec 2023 13:24:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOD/+W440J43G5+7imWGOIZt/5laK+Oa8J6I9+RawlCSSnMTkbg9ASA5WKpX2mMg9/8CJR X-Received: by 2002:a17:906:2655:b0:a23:5076:763 with SMTP id i21-20020a170906265500b00a2350760763mr6492562ejc.123.1703971440699; Sat, 30 Dec 2023 13:24:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703971440; cv=none; d=google.com; s=arc-20160816; b=gzwsvirtuzrh5rMFnqnPX3DJHl/3eKjhqjLXpC0VZeZCZJVDE/bC9zDYQGPi3p28fk lEKQam9q1NL3bXnbvAkNr/hj6Sta1bckNAxyCHQmiyZBMId+vtvz3YjEkW6Zt5y+pSyh GALRMpmmDnXPKBmWo1OKskT6uaCvO1/Ldt1WfGnZBr2fHFlzy0/fpxGQiVGs2LDhET8U jcSIuOqh2cgjGGHF4IHt9Z1sXuyHmrTtro4cqqyq8Sx0OP/zisu4YFgjeHNh9jZbJAHR TE3ungtt3G25GcjW0jOaCrElNE91vAs/YqxkyeAI/ziY/cjBRXA+kxSzeeqZDwpqNRoB MBPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:user-agent:references:in-reply-to:date:to:from :message-id:delivered-to; bh=KxIKmUjnbGYSE5H/mv6uDjRNYcV72SLxcE1eW7iiJ7w=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=lQKmecYZkTYek2Vs9WF6+83d4NX2McHwb7SeCe7AidJ6b0rFssQ+vyiJBSmUYPXCy5 Q3f7s7u7tr38YmgN6TWqNyZXk8xIcqDaA5KWxXaOMEgGeEypIhaKK1Y3Vhy9DPOskIJP ejfWUZ4Vbcs9s3t9mJesRXgFUhUspDze8uWIgLKlRfHYq4L9RHvMUNTqkD+b+CtcAYsT UytzU8LcwuIZp9PEOvH406OKTlYzoLiBDd8psb0MHDnWlEbK6ncNxg2cEZL0nzaKca+8 8EdOKvSZmmxU7Zi2i0wgPw2ZaHA+OLAVngr+rZTh3kq5El8qGULalIVwGKjIVUfT1Y2I VMQw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u3-20020a170906780300b00a26e6b7bab7si5260499ejm.713.2023.12.30.13.24.00; Sat, 30 Dec 2023 13:24:00 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2BB1368CC4B; Sat, 30 Dec 2023 23:23:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from glom.nmugroup.com (glom.nmugroup.com [193.183.80.6]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 465C568CC4B for ; Sat, 30 Dec 2023 23:23:51 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by glom.nmugroup.com (Postfix) with ESMTP id DEFD35428493 for ; Sat, 30 Dec 2023 22:23:50 +0100 (CET) Received: from debian.lan (unknown [IPv6:2a00:66c0:a::72c]) (Authenticated sender: git01) by glom.nmugroup.com (Postfix) with ESMTPSA id 8D5DC5428441 for ; Sat, 30 Dec 2023 22:23:50 +0100 (CET) Message-ID: From: Tomas =?iso-8859-1?q?H=E4rdin?= To: FFmpeg development discussions and patches Date: Sat, 30 Dec 2023 22:23:49 +0100 In-Reply-To: References: User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/7] lavc/libcodec2: Report actual bitrate used both when decoding and encoding 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: KKMm80VHRGPn Without this it looks like the encoder runs at 128 kbit/s /Tomas From 5c913a3eaf5cf8c21edc119870b7fdc8251bd900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Fri, 29 Dec 2023 14:09:51 +0100 Subject: [PATCH 2/7] lavc/libcodec2: Report actual bitrate used both when decoding and encoding --- libavcodec/libcodec2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libcodec2.c b/libavcodec/libcodec2.c index 950d48685e..2e03236b81 100644 --- a/libavcodec/libcodec2.c +++ b/libavcodec/libcodec2.c @@ -72,6 +72,7 @@ static av_cold int libcodec2_init_common(AVCodecContext *avctx, int mode) } codec2_set_natural_or_gray(c2->codec, 1); + avctx->bit_rate = avctx->sample_rate / avctx->frame_size * avctx->block_align * 8; return 0; -- 2.39.2