From patchwork Thu Aug 5 05:42:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29258 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6c0f:0:0:0:0:0 with SMTP id a15csp97385ioh; Wed, 4 Aug 2021 22:44:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3dtRNkIua1tI/DSoyDI4Ploy7oc0Stu/Kg69iMOsdI8EB+8teJZajt3iDlJPoKT23t/11 X-Received: by 2002:a17:906:d93a:: with SMTP id rn26mr3021111ejb.382.1628142264845; Wed, 04 Aug 2021 22:44:24 -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 eb8si2879507edb.231.2021.08.04.22.44.24; Wed, 04 Aug 2021 22:44:24 -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="Qpdw/GHU"; 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 0D32A68A278; Thu, 5 Aug 2021 08:43:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-oln040092066083.outbound.protection.outlook.com [40.92.66.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1538F68A370 for ; Thu, 5 Aug 2021 08:43:22 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EI1bJ8IGKo6ZRwE5kr/lBPQDsqi0bAYSK/43LTKk48+msvy/Micmqi6S+bR0anrDwQZtki44tV5UOcMrZkshGrV5NNgtY/38MVrlh4BDf98EfCOMiB3zzoh3Tv149Q9mrjIwY97aThXeJL2aNRfk8TYAcs/jX9cagxLkvDW8qfxuBfKoJmkfatjTYWCRQ050I4eHSIvyRWQ2GxqggypwLwUgBJvy1XRIdKl2Jz3IkWuXI/pXkgYh+S1LsYm4UoyHWgUBVi2v3s1yKDDuefxaRtWHH6MnxDPhPxzR+bNXEmbwOIHKbwnT3gj3CMwvlOlqcKc1KDoRrOk8qACVQArbmQ== 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-SenderADCheck; bh=NNuSmMyu/O+0OOB+ZLhuVpawIQ9LVWRKz3khtvLi6aY=; b=h+VwGT3wKGpaTusorrDw8tuxZyqdYNd0tTb5lQPjpv5xNQXuc1AqmRlnghwU7IizKhBrGTezF2zCMFuJN1JVRR56GB/gW4beG4O2QteHqO0aHMbTQ32TdEzd+VPKrfvSWm/7G4nkr75lTcOHgwK1NiiKYVvj5OQdHG2n3v7zK1+A8JW1T/4V0ZJAW7clCKXb94KhtkLSL3ZSO4pXF9Flxk+VD4WypCGa2bjGAENSgWTRI6h57GlMygRUV6OAXQjCXOFryr39h9ANcDW24Fhg9t0UZ5Tu7S+C7/VyPAXFDjLyXW7HICC4/FnResmiDPR6X7t1FhuD5zB9j1qdK4qb1g== 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=NNuSmMyu/O+0OOB+ZLhuVpawIQ9LVWRKz3khtvLi6aY=; b=Qpdw/GHUPrVpnnBRqAMho02+5d8ONXWgVAqwbrKc9PP1pwLkfhmc2ZId2N8Jkd6tCwkRMXoISo+9dTKiu/873sT9pViz2XuMkeozWpgQVYbgvhU69hBR1UPLdLHzd5mE89pVcoRnrVGc6C99d2hTlQGS8rMF82maceS0BzmqcFU6DjqCeG2772S5Ohyzhkqds4KbJQQ5OCHcPH/+AmXDKYMBCpXCQSNhowjQLzpCJVttHpbUOqMlyK9DaYFB6ZhYxp2rcpp0fwbxu7uImolNQJtYZwuSGH9gld41MJ+3zFBpkBNrsbheEyGYCVbAJnLVAZGnpB/RJQGnzhe5lGmYZA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4776.eurprd03.prod.outlook.com (2603:10a6:20b:9::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.26; Thu, 5 Aug 2021 05:43:21 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::c9b2:14f8:d555:6f2d%8]) with mapi id 15.20.4373.026; Thu, 5 Aug 2021 05:43:21 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 5 Aug 2021 07:42:44 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [dGlYyZEZ2CmGL1ZT4/VOYOcsO13XW++r] X-ClientProxiedBy: AM0PR01CA0164.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::33) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210805054244.2094251-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.94.230) by AM0PR01CA0164.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16 via Frontend Transport; Thu, 5 Aug 2021 05:43:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: afb9be35-e698-4c03-79ca-08d957d3ef6e X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UL28/k2NJzNtIacap2Pd4pu9N01P678eM1dMLTvIpKP3y1OIn0ENFJXzNoHhxfgimUDRCdDtf7tfLGccMtTzM0/lFQySLO3sTm9XEoS4fnAAHkVTnYiGHFyPoa7s3rOkTFC6oi6P0YYsaBhJ2Bq3DxurcvoAh4QAhHg00JJnCkXGSPQaHnDMmNe/b09gOhZ1N0I0Ge4OwuB9/441i8rvlvMwu+fdg9mnE6gctiC8LDl/zxnAH1t/azx24PDHE12hL5v4geg7Ii6h9U+tZM+HzVRRH5sZZR8yUEJ72MBm6I4ajDbpaearrr+RIEXfqebdZeWcVd0nHJHMP7yCLXHQsxJYTFnc/gCmVnXQ2MvK2GNiHfGT7+tN5B+38xOFr0X1Wk4mX7Ud8XWIOVuVfyM7z6Svy6GSWepbg9+G3MfaYRUpsxeHmDCsK/tLuSQXjQKS0aQa+qB6RUJu1WHptyrrPw//Am6wLIsKvKTGFpQm1JNH3mkDSf4c5yR2JxNSUcINibc+osPA6W9SG6VLtbeGQYA4Lm8q8/QMcc/+1ks0XNn3y3tIP25rYt3uS4mDui6E/TQvKoX3O1fl5Y5b7byqBQBd/g0I5WUZUrfg4jIulPBlE9hL4wAtkTDJJTe4foj+GrrYdS5UabKMhmt8r3jE96ypzgu3RiYKUP8iC0Wa3b8SnBDYjQ8KcIx2eX9xB7ne59amvsT23A5HQ== X-MS-TrafficTypeDiagnostic: AM6PR03MB4776: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4F9FiLHY5D9i+5tCWGCkvkT4bGYNCh5zPOZwsWp9WhToikJO7CxFWPMZsMmsxoWEGP79vM6mnRrb3fJvS6koCp4Jz6DhzM7Lu/MvG1/aOrc1+cNCeSDcSRa47fIyiptHuDvenx6hmB67S0+xfYJ10NwC2GLFMxSa7ehwSmQPl9fB7eiQzljjS0xKWTPXsiHD7ATn15KcellCTk43Xt91LZncFTa53wMip4m9uCrgsoTO4BwXaw3dS9yke+NWUYsWpUw/SFml+r0m/0gMCA0pEA541o6Ge/w3Edv3So4thbAeGwnn/azE+VERUeESw1mYZZFX/PIw0GA09jxr3NbSpoMJKCAINQy7+lgzXxoYfZ5XWPxx8/S3JWxxdEwM9G663BXGfy2oa+/6lAxTteWuNXOHH/JDwaACVrMeuBSLTFu3X4UU/sDLEDauV6X1rSQh X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ykLQRuEktGADRzcoySBXPkfLrcE0p7V96KxSnmXIk03/85iNMG8diwS+1Na4swXMDCEn91wcDvTyHkT/CHVQLtO+Xfch2qaV+G3kPH7KWFsta3hZbJgcOusmgwqC8UJgmFTew4yoIDymyk6AhGdvpQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: afb9be35-e698-4c03-79ca-08d957d3ef6e X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2021 05:43:21.8487 (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: AM6PR03MB4776 Subject: [FFmpeg-devel] [PATCH 9/9] avfilter/avfilter: Remove unused partial_buf 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: GUB+ynjITBkj It is unused since 02aa0701ae0dc2def8db640c9e3c06dc1b5de70c. The corresponding size field is write-only since then. Signed-off-by: Andreas Rheinhardt --- I was quite surprised to find this. libavfilter/af_firequalizer.c | 2 +- libavfilter/af_loudnorm.c | 6 ++---- libavfilter/af_lv2.c | 2 +- libavfilter/af_replaygain.c | 1 - libavfilter/avf_aphasemeter.c | 1 - libavfilter/avfilter.c | 1 - libavfilter/avfilter.h | 13 +------------ libavfilter/buffersink.c | 3 +-- libavfilter/f_ebur128.c | 3 +-- 9 files changed, 7 insertions(+), 25 deletions(-) diff --git a/libavfilter/af_firequalizer.c b/libavfilter/af_firequalizer.c index a4de76ee0f..77de69e3ef 100644 --- a/libavfilter/af_firequalizer.c +++ b/libavfilter/af_firequalizer.c @@ -837,7 +837,7 @@ static int config_input(AVFilterLink *inlink) inlink->sample_rate, inlink->channels, s->analysis_rdft_len, s->rdft_len, s->fir_len, s->nsamples_max); if (s->fixed) - inlink->min_samples = inlink->max_samples = inlink->partial_buf_size = s->nsamples_max; + inlink->min_samples = inlink->max_samples = s->nsamples_max; return generate_kernel(ctx, SELECT_GAIN(s), SELECT_GAIN_ENTRY(s)); } diff --git a/libavfilter/af_loudnorm.c b/libavfilter/af_loudnorm.c index 5a3e762b27..a07e8a3c93 100644 --- a/libavfilter/af_loudnorm.c +++ b/libavfilter/af_loudnorm.c @@ -504,8 +504,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) s->pts += out->nb_samples = inlink->min_samples = - inlink->max_samples = - inlink->partial_buf_size = subframe_length; + inlink->max_samples = subframe_length; s->frame_type = INNER_FRAME; break; @@ -761,8 +760,7 @@ static int config_input(AVFilterLink *inlink) if (s->frame_type != LINEAR_MODE) { inlink->min_samples = - inlink->max_samples = - inlink->partial_buf_size = frame_size(inlink->sample_rate, 3000); + inlink->max_samples = frame_size(inlink->sample_rate, 3000); } s->pts = AV_NOPTS_VALUE; diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c index cc5d702e27..28b729691d 100644 --- a/libavfilter/af_lv2.c +++ b/libavfilter/af_lv2.c @@ -380,7 +380,7 @@ static int config_output(AVFilterLink *outlink) lilv_plugin_has_feature(s->plugin, s->boundedBlockLength))) { AVFilterLink *inlink = ctx->inputs[0]; - inlink->partial_buf_size = inlink->min_samples = inlink->max_samples = 4096; + inlink->min_samples = inlink->max_samples = 4096; } return 0; diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c index a5f5959eb3..fd642297f8 100644 --- a/libavfilter/af_replaygain.c +++ b/libavfilter/af_replaygain.c @@ -359,7 +359,6 @@ static int config_input(AVFilterLink *inlink) s->yule_hist_i = 20; s->butter_hist_i = 4; - inlink->partial_buf_size = inlink->min_samples = inlink->max_samples = inlink->sample_rate / 20; diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c index ef7e50e657..a31805f204 100644 --- a/libavfilter/avf_aphasemeter.c +++ b/libavfilter/avf_aphasemeter.c @@ -131,7 +131,6 @@ static int config_input(AVFilterLink *inlink) if (s->do_video) { nb_samples = FFMAX(1, av_rescale(inlink->sample_rate, s->frame_rate.den, s->frame_rate.num)); - inlink->partial_buf_size = inlink->min_samples = inlink->max_samples = nb_samples; } diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 24de8ebee3..1655a21f46 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -177,7 +177,6 @@ void avfilter_link_free(AVFilterLink **link) if (!*link) return; - av_frame_free(&(*link)->partial_buf); ff_framequeue_free(&(*link)->fifo); ff_frame_pool_uninit((FFFramePool**)&(*link)->frame_pool); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b82f72d040..e0914a151e 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -548,20 +548,9 @@ struct AVFilterLink { */ AVRational frame_rate; - /** - * Buffer partially filled with samples to achieve a fixed/minimum size. - */ - AVFrame *partial_buf; - - /** - * Size of the partial buffer to allocate. - * Must be between min_samples and max_samples. - */ - int partial_buf_size; - /** * Minimum number of samples to filter at once. If filter_frame() is - * called with fewer samples, it will accumulate them in partial_buf. + * called with fewer samples, it will accumulate them in fifo. * This field and the related ones must not be changed after filtering * has started. * If 0, all related fields are ignored. diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index c4147bf732..07c4812f29 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -199,8 +199,7 @@ void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size) { AVFilterLink *inlink = ctx->inputs[0]; - inlink->min_samples = inlink->max_samples = - inlink->partial_buf_size = frame_size; + inlink->min_samples = inlink->max_samples = frame_size; } #define MAKE_AVFILTERLINK_ACCESSOR(type, field) \ diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index bf7bb3af68..47ea9b59d7 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -413,8 +413,7 @@ static int config_audio_input(AVFilterLink *inlink) * filter_frame()). */ if (ebur128->metadata || (ebur128->peak_mode & PEAK_MODE_TRUE_PEAKS)) inlink->min_samples = - inlink->max_samples = - inlink->partial_buf_size = inlink->sample_rate / 10; + inlink->max_samples = inlink->sample_rate / 10; return 0; }