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 55D1842D57 for ; Thu, 5 May 2022 01:56:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E2EB868B31C; Thu, 5 May 2022 04:56:06 +0300 (EEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068018.outbound.protection.outlook.com [40.92.68.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6C6668B2B0 for ; Thu, 5 May 2022 04:56:00 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SxZh8Z+fn/N6Gx53eaLwvCFovuCsKZdyAwK62k3Ky7Lz99awyAsRpIgOCqy8M15Slfr3gYCt43WiuHtDg8UlC6UYTbfUGHEMYnbM4bDv5vYestVWa81Wbe9KD6u8SaWxvTMaibqnq31LEsDHY9O1DqElCxgDSF02jvrBckeVKpLWG/yhrLh7OINgTGGRVdWr1DEiTymWt+drmTAr4GoPAd02qRdZd8cE74IHzyy046pJfndWVrFkS8kj4NNJTdYZLvGUJM4Yg2gpV6PBLn5hCpDtlQkhLZ6DwaBukdzas8JoUEvTpoyYu0gE6Nj8LP/zdT/0EW+ubzXbHuHW18+LZA== 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=NgkPO1vwZ2psjrzamACNGPmTyJHHLmGEl3jU6kGGkKk=; b=gNq9Fv8KnBrdT0qe7Zl5KU8C5YP8V9BacAyIlzYBJ5Bi7TAP33D/HA3vEYOmJcmISk83mBnG4X0xGaFUUmdptkmB/IkEdKAwQ4ZaGFp2rxT6e7MSiIsBDaS1LgnRTnRQdlecmh9RE1Vb8vPEOGTZAt2U6klR91rjFdfwMQyM5aAlFvG89/fgSp4Jd+XJJ0w6Sx+idskF8ic+U36Gize3gaNVdJY8hi9NZpNKtaoXgtizc3+2iGjaZtuT2ijnU/CrhRUlhA95f50OEUjcrJlr2jFvf70ZYzdSMoZgOTJCpCDzXS0DQ7Cymh++6I2ualQgZKUpdPD6D2Ci0NFupcusog== 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=NgkPO1vwZ2psjrzamACNGPmTyJHHLmGEl3jU6kGGkKk=; b=pfL6lWDjfGecn18W7eMLwnc2PHBb9N71JwJd9yF9Mata7l/Y2ap9UsIZ6nRBuWOGTik/anOvrAKvoKXUdXsyalKXunJ5tRApS+fTfioswk6P3nb8hryExWwaXhreOaFbTHv4nqQNU9nKD+KhAt81oZsgRWug5wzJ8FzIDYrsVqaNO/OHXgEexH30dry5BhSSX/RBsxVsdbB4eZ2+2wgEgiDoIe04BpifdS/76kfhvOAMKkViaojuab42G0QEogCvGE5aCu4YgvXJ4Cj1oM03IQTBGJ8VNaHqgo1cLqxFmb2Ml3soAUkbDlmCfsPCAAPfilsk6ORC5sM9Vf6ydDTHlA== Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) by AM9PR01MB7428.eurprd01.prod.exchangelabs.com (2603:10a6:20b:2c9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.12; Thu, 5 May 2022 01:55:58 +0000 Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431]) by AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431%6]) with mapi id 15.20.5206.024; Thu, 5 May 2022 01:55:58 +0000 Message-ID: Date: Thu, 5 May 2022 03:55:55 +0200 Content-Language: en-US To: FFmpeg development discussions and patches References: From: Andreas Rheinhardt In-Reply-To: X-TMN: [9CxOfP/k8KnbsmWjH0PEnm/hZSE2irY3] X-ClientProxiedBy: ZR0P278CA0101.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::16) To AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2097c052-5267-4c5a-b485-08da2e3a6517 X-MS-TrafficTypeDiagnostic: AM9PR01MB7428:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jd/BMxQKq5x+7mUUkozjf66ce4sccq0zcPI0BD95hThB3NwpHPmr0CtdvaY3zFM0zNwtJLQgcRdcjxDEFa5az9tMdLvEn+HbAIOIR40U8g+y/VRbnqWXqchWsXgmdahurBSRP3u4lhRHLEslSWXapR2TqmDeLVMhLscC/SED8wNH35wPNIbsFUepf+YObzmiU7zKpuW7IdsljxGR10uza/OpYlzBRnCUJ3Nbscf94BDFptFsWrswkxlH7t7pRZB3Yb519U+uc2uGmd6ZRfBj65cFUpgal9Kuc6N315grpSxYx9/9l1NVAFmil4+uh9Br5zzPtZ86GfCKmsN8vHqzkAb1EypuK3Yylcl4z+gWykYH2rVJf4pkMLCZ0L1nZIp6h8gH6xAsI71QCxLAtbCx1J5vAOMM8WDgPM6afuiLksxz0z8gRc8zPPIa4D3v45aV3jp+unFRexDzY0CuTJDx4+TDzXMLFY3AlK3BeTOvpT6+R1Mw6pYZCOllAOGYCQ1c07IxSo8D9//aM24Vvc+WV2iaLEtDFlR+RG/HYifNCy1fARvar8AqzMl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ZV0pwRmZrSjVua0lLYmt4T3BPYmhMSXR4?= =?utf-8?B?b2VuaUZocWE1TFp4NE1la0kvaXNRQW5DT0I3VytxLzltZ0EzV2RwcEtzQkJ3?= =?utf-8?B?cWNRYmY0L0kwL2IrRjFJbEliZWZRMkxUVGFSVTZXMjJqeDdBMldkdllKUklJ?= =?utf-8?B?M3ZRVGkyNklMcmNRanlJUXhicTVMdHJLd3lmSndTRmRoQ3lXZWtoTm9rVHJN?= =?utf-8?B?ZWVydVVtNEpXWDRqbVpBaDQ5OGxvM01PdVF0bG9sdlREb1RLQ3FOYVdvdWlK?= =?utf-8?B?eGxzMnliSlVYTWhka3g5VFNQMlFHNFNsMm9qVWVtL1BFWkhiWU1Qb3p0SnJF?= =?utf-8?B?d04yRUlwZDhRPT0=?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2097c052-5267-4c5a-b485-08da2e3a6517 X-MS-Exchange-CrossTenant-AuthSource: AS8PR01MB7944.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2022 01:55:57.9765 (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: AM9PR01MB7428 Subject: Re: [FFmpeg-devel] [PATCH 01/10] avfilter/af_afir: Only keep DSP stuff in header 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Andreas Rheinhardt: > Only the AudioFIRDSPContext and the functions for its initialization > are needed outside of lavfi/af_afir.c. > Also rename the header to af_afirdsp.h to reflect the change. > > Signed-off-by: Andreas Rheinhardt > --- > libavfilter/af_afir.c | 71 +++++++++++++++++++++- > libavfilter/af_afir.h | 108 --------------------------------- > libavfilter/af_afirdsp.h | 34 +++++++++++ > libavfilter/x86/af_afir_init.c | 2 +- > tests/checkasm/af_afir.c | 2 +- > 5 files changed, 106 insertions(+), 111 deletions(-) > delete mode 100644 libavfilter/af_afir.h > create mode 100644 libavfilter/af_afirdsp.h > > diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c > index 72e77eda19..d7ae468428 100644 > --- a/libavfilter/af_afir.c > +++ b/libavfilter/af_afir.c > @@ -30,8 +30,11 @@ > #include "libavutil/channel_layout.h" > #include "libavutil/common.h" > #include "libavutil/float_dsp.h" > +#include "libavutil/frame.h" > #include "libavutil/intreadwrite.h" > +#include "libavutil/log.h" > #include "libavutil/opt.h" > +#include "libavutil/rational.h" > #include "libavutil/xga_font_data.h" > > #include "audio.h" > @@ -39,7 +42,73 @@ > #include "filters.h" > #include "formats.h" > #include "internal.h" > -#include "af_afir.h" > +#include "af_afirdsp.h" > + > +typedef struct AudioFIRSegment { > + int nb_partitions; > + int part_size; > + int block_size; > + int fft_length; > + int coeff_size; > + int input_size; > + int input_offset; > + > + int *output_offset; > + int *part_index; > + > + AVFrame *sumin; > + AVFrame *sumout; > + AVFrame *blockin; > + AVFrame *blockout; > + AVFrame *buffer; > + AVFrame *coeff; > + AVFrame *input; > + AVFrame *output; > + > + AVTXContext **tx, **itx; > + av_tx_fn tx_fn, itx_fn; > +} AudioFIRSegment; > + > +typedef struct AudioFIRContext { > + const AVClass *class; > + > + float wet_gain; > + float dry_gain; > + float length; > + int gtype; > + float ir_gain; > + int ir_format; > + float max_ir_len; > + int response; > + int w, h; > + AVRational frame_rate; > + int ir_channel; > + int minp; > + int maxp; > + int nb_irs; > + int selir; > + > + float gain; > + > + int eof_coeffs[32]; > + int have_coeffs; > + int nb_taps; > + int nb_channels; > + int nb_coef_channels; > + int one2many; > + > + AudioFIRSegment seg[1024]; > + int nb_segments; > + > + AVFrame *in; > + AVFrame *ir[32]; > + AVFrame *video; > + int min_part_size; > + int64_t pts; > + > + AudioFIRDSPContext afirdsp; > + AVFloatDSPContext *fdsp; > +} AudioFIRContext; > > static void fcmul_add_c(float *sum, const float *t, const float *c, ptrdiff_t len) > { > diff --git a/libavfilter/af_afir.h b/libavfilter/af_afir.h > deleted file mode 100644 > index cf00dbfc66..0000000000 > --- a/libavfilter/af_afir.h > +++ /dev/null > @@ -1,108 +0,0 @@ > -/* > - * Copyright (c) 2017 Paul B Mahol > - * > - * This file is part of FFmpeg. > - * > - * FFmpeg is free software; you can redistribute it and/or > - * modify it under the terms of the GNU Lesser General Public > - * License as published by the Free Software Foundation; either > - * version 2.1 of the License, or (at your option) any later version. > - * > - * FFmpeg is distributed in the hope that it will be useful, > - * but WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * Lesser General Public License for more details. > - * > - * You should have received a copy of the GNU Lesser General Public > - * License along with FFmpeg; if not, write to the Free Software > - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > - */ > - > -#ifndef AVFILTER_AFIR_H > -#define AVFILTER_AFIR_H > - > -#include > -#include > - > -#include "libavutil/tx.h" > -#include "libavutil/float_dsp.h" > -#include "libavutil/frame.h" > -#include "libavutil/log.h" > -#include "libavutil/rational.h" > - > -typedef struct AudioFIRSegment { > - int nb_partitions; > - int part_size; > - int block_size; > - int fft_length; > - int coeff_size; > - int input_size; > - int input_offset; > - > - int *output_offset; > - int *part_index; > - > - AVFrame *sumin; > - AVFrame *sumout; > - AVFrame *blockin; > - AVFrame *blockout; > - AVFrame *buffer; > - AVFrame *coeff; > - AVFrame *input; > - AVFrame *output; > - > - AVTXContext **tx, **itx; > - av_tx_fn tx_fn, itx_fn; > -} AudioFIRSegment; > - > -typedef struct AudioFIRDSPContext { > - void (*fcmul_add)(float *sum, const float *t, const float *c, > - ptrdiff_t len); > -} AudioFIRDSPContext; > - > -typedef struct AudioFIRContext { > - const AVClass *class; > - > - float wet_gain; > - float dry_gain; > - float length; > - int gtype; > - float ir_gain; > - int ir_format; > - float max_ir_len; > - int response; > - int w, h; > - AVRational frame_rate; > - int ir_channel; > - int minp; > - int maxp; > - int nb_irs; > - int selir; > - > - float gain; > - > - int eof_coeffs[32]; > - int have_coeffs; > - int nb_taps; > - int nb_channels; > - int nb_coef_channels; > - int one2many; > - > - AudioFIRSegment seg[1024]; > - int nb_segments; > - > - AVFrame *in; > - AVFrame *ir[32]; > - AVFrame *video; > - int min_part_size; > - int64_t pts; > - > - AudioFIRDSPContext afirdsp; > - AVFloatDSPContext *fdsp; > - > -} AudioFIRContext; > - > -void ff_afir_init(AudioFIRDSPContext *s); > -void ff_afir_init_x86(AudioFIRDSPContext *s); > - > -#endif /* AVFILTER_AFIR_H */ > diff --git a/libavfilter/af_afirdsp.h b/libavfilter/af_afirdsp.h > new file mode 100644 > index 0000000000..f72ab7cd02 > --- /dev/null > +++ b/libavfilter/af_afirdsp.h > @@ -0,0 +1,34 @@ > +/* > + * Copyright (c) 2017 Paul B Mahol > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#ifndef AVFILTER_AFIRDSP_H > +#define AVFILTER_AFIRDSP_H > + > +#include > + > +typedef struct AudioFIRDSPContext { > + void (*fcmul_add)(float *sum, const float *t, const float *c, > + ptrdiff_t len); > +} AudioFIRDSPContext; > + > +void ff_afir_init(AudioFIRDSPContext *s); > +void ff_afir_init_x86(AudioFIRDSPContext *s); > + > +#endif /* AVFILTER_AFIRDSP_H */ > diff --git a/libavfilter/x86/af_afir_init.c b/libavfilter/x86/af_afir_init.c > index c37212c381..e53817b9c0 100644 > --- a/libavfilter/x86/af_afir_init.c > +++ b/libavfilter/x86/af_afir_init.c > @@ -20,7 +20,7 @@ > #include "libavutil/attributes.h" > #include "libavutil/cpu.h" > #include "libavutil/x86/cpu.h" > -#include "libavfilter/af_afir.h" > +#include "libavfilter/af_afirdsp.h" > > void ff_fcmul_add_sse3(float *sum, const float *t, const float *c, > ptrdiff_t len); > diff --git a/tests/checkasm/af_afir.c b/tests/checkasm/af_afir.c > index b8a845db82..08c55dacfc 100644 > --- a/tests/checkasm/af_afir.c > +++ b/tests/checkasm/af_afir.c > @@ -21,7 +21,7 @@ > #include > #include > > -#include "libavfilter/af_afir.h" > +#include "libavfilter/af_afirdsp.h" > #include "libavutil/internal.h" > #include "libavutil/mem_internal.h" > #include "checkasm.h" Will apply this patchset tonight unless there are objections. - Andreas _______________________________________________ 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".