From patchwork Fri Oct 7 20:25:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38608 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:789c:b0:9c:c2cd:5584 with SMTP id bf28csp205951pzc; Fri, 7 Oct 2022 13:25:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PxxBdlmzDlqqvAWPDLAn2+vqaesAY7alnRgJtVMqb56a0H5MgCXukQGNgaBcfpyA+/knB X-Received: by 2002:a17:907:7fa1:b0:782:7c58:5341 with SMTP id qk33-20020a1709077fa100b007827c585341mr5506379ejc.368.1665174333170; Fri, 07 Oct 2022 13:25:33 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k16-20020a170906159000b007396bf19f8csi3034487ejd.137.2022.10.07.13.25.28; Fri, 07 Oct 2022 13:25:33 -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=@outlook.com header.s=selector1 header.b=Q2ergwjM; arc=fail (body hash mismatch); 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=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 931E368B2BC; Fri, 7 Oct 2022 23:25:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072055.outbound.protection.outlook.com [40.92.72.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 417C368B2BC for ; Fri, 7 Oct 2022 23:25:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KDtDpOo9EDmseqtev47ncCLLAimC3KaWKwGqeYa/a3xG84uI8XybRUPIr7LHFlbD//lh1//cGTO0A2PSOWzHYy91nZCHEsEBNhHMIwKPHawoOxikPHzHNypu3foE5NiOwXW7JkIIGorV2F1nEP8bR1np90lFFHzcMcc56KSPx9/ocAUnSO/WiUOwyKfvGu22fw8SsT7MBtW1C9EFCwdnI/69HP3G3KPxFjNRhjeeIknVZ0BsDL6xek853tUsBOmAl5NHM0cXt2BrePzgnfkqM0ExlGhps1XrqxdhhUw0WKni+vl0p/7xOnf+I1FZLaONjm9UCRKcfwbQ3eQ5vO8hEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=B7xmRF8j4oHEaJ0UQfZOLN4QA3XcLilLTuNIw17X/ck=; b=fBVNz3emxxmCETZO583ySuxbeOnE9xzpuibCKl0jbtAQX1efEDFk0oNgX5TVagBB9Z9yUrqfQ2DK31MvAq77bPo525m6LPc4NINfUmQ7XRp1Fh+V0AlSkW7itDs0x71fzkPPt/KsSbuvIK7U0sdMXN+ovOD7PI3juE2n+uPdn0+emvfPethS3Jyltc1FwdEdyGenkcwLZuTbaEW+j6TMW3D/rizFAQVe7sOPs3dxgEVtfhJJq5/0A3LFTmEdoN+k09l67Mk92JWu9qZoQm8cBovEdpsRVfaiT3CaiLBylFE7v7hTfcVvJDT4q9x/B3mwyHLW5NfESt26pspmbsH+dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B7xmRF8j4oHEaJ0UQfZOLN4QA3XcLilLTuNIw17X/ck=; b=Q2ergwjMMMYbI5Hob5m3xYCSIsb4rpDfR1gwfi4SLTFf03vu+QlDKEv+sQCqmYXsoOWaL0oKVBaVIMdK3BZR8eWqIWJAn1d8kuSU7Qbs6S6Wg0bEWa663CbBNxa0tBc2RMxjyIeUeSFAjlqELXgOtc9abG586U973dWiP4QEFInM++qE9CgX6Lq+HyvlqzNhFDW0bWRUmv3EgrDjJC+HqyUV8H25s6qwnAyWlhtWz4sIw5PZor5D1AQBJbjoipmAn3fW1ygaFG/X6+ewGnHm7dnc4QXCgQmilaFzpUgfPop4Ar4ZC0PBolKLYYNgFQZFOiCI5qMvZq/lpPINg8QqgA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU2P250MB0285.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15; Fri, 7 Oct 2022 20:25:13 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5676.028; Fri, 7 Oct 2022 20:25:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Oct 2022 22:25:02 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [hZVqrNH7DfE6UVzORmr3yEAkL/0GIXwnZTF4VwOA0fw=] X-ClientProxiedBy: ZR0P278CA0106.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::21) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221007202508.4188148-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU2P250MB0285:EE_ X-MS-Office365-Filtering-Correlation-Id: bbbde35e-a58e-4416-3c46-08daa8a209b2 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmpXYlgiiriwpqBJSiirmy7K+k4H6GtwpE6jRqkApit/L8BeA8LRBZb/k2/e6Ns1vn+XyyzpCmE/leRuT4scQA9mwcdPZGGfqKqYwUTBX+I7fvYNFqZR432c4KNKZFZzx/Hkrp66TmvnLXvewhsaemZOAxlfrldLyqujyIRY33AA0toOGn1xLaqpaievohMPVZKh37SOZE0dUtaINWXJPwJbY372gc33qO0LzBVdltBk0VirGLkywKPtNgiOpQUO8Q6nkvXZmGjCqNt+Dd3y8fPIv5rj5JkzEvz2b8atVAOvrqcetSn9YL2/Twpxh8PldZBFA7gFZfhK3JNGUAB5Phstp0iMENIlhFgOB8+GVJ5G4JFCZnnwfx4TPJFNSOdMCBlSAi86AuuTDWsal1De7B9B/2cpqfmLDWItR2MXzNES/2ZT5sIOAHaNFGGxTYFKo6wFYNofqw7AfO0aMN2cAQL/sy00n+aocK9XsSGFXWJ3wxR8686QaSlZqOEclorCqtZnodmxqo3VUnN1kFFWJWFSQkMPYymAE829E65K2e+RBbt9flNRJoLDydJxPvoAJwV5yQHzScGUyM5lfw8kw31gFxNvAu+XZpzkCBHVwWBCzGfj5KZ6o0dbWua61rAUEySd0Ius+3dcLdZKABucfBOZyaHmtGp/99acjZC3LDuC4bqh/orNVYd94mVPqeBe3Jj1+ptF7/nQ1Q8LpQ8BchBgGGkHs1bKF2Vp8QO3+sAFqMSVYKvRV7MTT+0UtVvLfDo= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fV9itOmBD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anyEeYFT+4FL5Clg6ehOshnUi8S6L8C2cUxJwlb2nK4RzRoPMW2MRoO+Crka7ew8SxhZPmm3kQ6cBtZMWmJyv8TOM2jFbF/K5oTllhLf1Qx6xRIxyUWB1awKdDi4hgvwYWiy15Q7axRq8X5SMqSYaD1w6/H6YFb8rS3jEIL0SRcvEgqu2vAyBsbimnZYU2a9KuIADjAVIvm2ZFtTMC6U+psez5z70ezXtK/+SkqQay5ObOuUYWAanh0UqxphtvqBZcgq131Zzl5h3aeEjqtSU8i8vgTsK9Tw7nM1Y3b8JpUjwvvjxAp72uJVatHAinOmmY70Gy864IkSdJc8P8EsolDYIcNbYdumGSsYNykM/bnqZUrkNf1VESpQhSbMt/qLoKCjOqBQ2mILbdnK4M46clQNGvN/09vOFG3DhpuS6BvaAxWmPDKWnMdkYZ+8zvV+EOOOnAAAbZge7udNWIQWr1HDSwqS2SNa7zfhH9yzEthpwueptML/JfpNwSTMUC4WOrKHAczB31YtCF+eOST5/q9pu2tRPUyMYjap+6V2llpmctBr5+G6CersX01zNJwy3xHdkufHEHPKGSV6fFWNgDKLVedsnBesQGwfePg041ZJASWzZcYe6JMip4zfnNG1XINubmKpFRgtH7GWvlVuhgyxAxRljq7WCj0yCUaaLK340tAMsDoNLBFkW/s7M791F9kvcOTWn7nd7CWrml6Bi29InD+aEaGTI0hcLQAY9AHZzqkDQorBIZ9pliTJ8bdR+JAQYuid9ATF/XqSuKI2M1CgF5DybsrXNYkgpMdZIA08bfguo2Ym/8HSFNaK/cpYyRMgd073zq9QfxmxsuvwS6q8mqV+XpQFAtBMnFNU6uLNk9W6dXrmXh9m2HiZQ3qjw2Y87CWnSNY+oziXvgA95jA/eIlxVdI5IBvSccqX03E7moL+4xwknjUHjSDZuRTa3cCEojOaHeqJM2Iar+f6HroG8W9ts= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbbde35e-a58e-4416-3c46-08daa8a209b2 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2022 20:25:12.9065 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2P250MB0285 Subject: [FFmpeg-devel] [PATCH 3/9] avcodec/opusenc_psy: Remove unused/write-only context members 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: J3FOh8RZosP8 Signed-off-by: Andreas Rheinhardt --- libavcodec/opusenc_psy.c | 5 ----- libavcodec/opusenc_psy.h | 11 ----------- 2 files changed, 16 deletions(-) diff --git a/libavcodec/opusenc_psy.c b/libavcodec/opusenc_psy.c index 94c37fb8b1..5c768ae68e 100644 --- a/libavcodec/opusenc_psy.c +++ b/libavcodec/opusenc_psy.c @@ -470,12 +470,9 @@ int ff_opus_psy_celt_frame_process(OpusPsyContext *s, CeltFrame *f, int index) if (f->transient != start_transient_flag) { f->blocks = f->transient ? OPUS_BLOCK_SIZE(s->p.framesize)/CELT_OVERLAP : 1; - s->redo_analysis = 1; return 1; } - s->redo_analysis = 0; - return 0; } @@ -509,7 +506,6 @@ void ff_opus_psy_postencode_update(OpusPsyContext *s, CeltFrame *f) s->avg_is_band /= (s->p.frames + 1); - s->cs_num = 0; s->steps_to_process = 0; s->buffered_steps -= steps_out; s->total_packets_out += s->p.frames; @@ -521,7 +517,6 @@ av_cold int ff_opus_psy_init(OpusPsyContext *s, AVCodecContext *avctx, { int i, ch, ret; - s->redo_analysis = 0; s->lambda = 1.0f; s->options = options; s->avctx = avctx; diff --git a/libavcodec/opusenc_psy.h b/libavcodec/opusenc_psy.h index ee58b0cdf9..bc1a88c03d 100644 --- a/libavcodec/opusenc_psy.h +++ b/libavcodec/opusenc_psy.h @@ -49,20 +49,12 @@ typedef struct OpusBandExcitation { float excitation_init; } OpusBandExcitation; -typedef struct PsyChain { - int start; - int end; -} PsyChain; - typedef struct OpusPsyContext { AVCodecContext *avctx; AVFloatDSPContext *dsp; struct FFBufQueue *bufqueue; OpusEncOptions *options; - PsyChain cs[128]; - int cs_num; - OpusBandExcitation ex[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; FFBesselFilter bfilter_lo[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; FFBesselFilter bfilter_hi[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; @@ -78,15 +70,12 @@ typedef struct OpusPsyContext { DECLARE_ALIGNED(32, float, scratch)[2048]; /* Stats */ - float rc_waste; float avg_is_band; int64_t dual_stereo_used; int64_t total_packets_out; /* State */ - FFBesselFilter lambda_lp; OpusPacketInfo p; - int redo_analysis; int buffered_steps; int steps_to_process; int eof;