From patchwork Mon Jul 24 22:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 42957 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:be1d:b0:130:ccc6:6c4b with SMTP id ge29csp2208223pzb; Mon, 24 Jul 2023 15:00:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlGRbyVQWv7ivh4WGlcaLod5Pm0ilVlsgsQz2VJZ9TYOvg0U7HaTaBiPfV6x+TQPIeJXFRdV X-Received: by 2002:a17:907:2cf3:b0:988:6491:98e1 with SMTP id hz19-20020a1709072cf300b00988649198e1mr11822667ejc.42.1690236054438; Mon, 24 Jul 2023 15:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690236054; cv=none; d=google.com; s=arc-20160816; b=Tx2oka+V+lTlj2mZYGv+GsXwJHARLCcG0tCubNdUUBmd2ChRlqOFvfuBbDj7mbSBVI J3ow8Q9a7RNx1sYkUs9Qb8of32ExkGAmnzjW2O881vrMvVOc2ZQkcevjxCw6UUnrQDaV siLi6oNxEHfNcUDGOYRyi9+g6+JQ1FQKCwJDaJaoLLAA3jO2RYUCDBlPTIIhLgerD11h 2f94XXk7PXQnFkEz7YfRpaqGcCpkIfl6ZQqSmTUGCV2scTSlV7DrFHUiexsGo9wgK4bX tJJZnXRoHlwdGKxcG8LjvTDmvmUoeM52gQOs8S2s3n87DMqSUfWxfAwdt2Q6Dc7Bzk4j PGiQ== 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:references:in-reply-to:message-id:to:from:date :dkim-signature:delivered-to; bh=2aW0DFm+zDqwP/2BuflYwpe/uiAGD1iR/r5fU4sd+hk=; fh=awftJPkKIDcYG+GZSKK7EGrS2s4rqD3QuLTgwd5DXmc=; b=iASB1HAHmOLswp+B1ZfhwcyfKR50WGhf+TC8sLbrT3O3BJIiv88MXiqUE/aox5VNZE YosnMpPAP1Mo8MkkEmQ0EH5RPs+HOT++3y6xnNMG56X6tAcOHV1dYZ9kCQjBoV1+s7ls vqntQQwmXb2aSSxvH/Jp85R6A3Hi8/s5dH8R11cZ8rWkWf7Ww1DDBJr/LPgE4iHQyqH6 3OuF4g9KY1yIyipWoWvuZdtHuNgDbP/vI0TsZU6W2U2yRXYK7/I1vsbTW7QFE4iGAP2m FQpltW6mu0CLgbIQ3MBtU9/xH8KX9I0IC2UhmdblopY5qA0R9+VD6elSQbtKN6sKbePa 3rtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@lynne.ee header.s=s1 header.b=jUdbnuSw; 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=lynne.ee Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gl21-20020a170906e0d500b00997e71d037csi7162791ejb.618.2023.07.24.15.00.52; Mon, 24 Jul 2023 15:00:54 -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=@lynne.ee header.s=s1 header.b=jUdbnuSw; 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=lynne.ee Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51EBD68C7EA; Tue, 25 Jul 2023 01:00:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 00E7E68C7CF for ; Tue, 25 Jul 2023 01:00:43 +0300 (EEST) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 43C9F106015E for ; Mon, 24 Jul 2023 22:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1690236043; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=xvnhuVtwyeT2v6frkVqdnJj+nzwZwOI9gk327jbiQnY=; b=jUdbnuSwD05v6mTJ5W/N+6kOBO8X5ScDYKbslZLFhGLQbEUMty+mBDFUBDc2x2N1 gqYfNDtSDsaNkzqs9y1ft7N7ANCiq7eqQZWZjphULoH+2ivufZKWWmk/qXu8NZ8EBvu DxS77cRkVKTw9KpiJilLZVktxAXfmJsluSaeadtR9wqL90LjqMnAVL6uJUdBbU4w6Cy uG+Ct5PKnBdTSyD8aNzBkkzm0rwUZZxkjZ2rXkar1b/Bm8WyW4cKiP77gBqz4aBZcbZ 9TF7PYXQNE4mMSiQEIeLXfbxPygtSG5GtWpSnD5NHqkLyynyqp3LZEDxKhtHZXVYwP1 8N6xcRW0OQ== Date: Tue, 25 Jul 2023 00:00:43 +0200 (CEST) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] lavc/avfft: deprecate the API 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: 4GrVn9JF9+rU This deprecates the currently unused API. Patch attached. From 8cf7041345ebef47e710b65395095190ea88dd4a Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 24 Jul 2023 23:55:55 +0200 Subject: [PATCH 2/2] lavc/avfft: deprecate the API This deprecates the currently unused API. --- doc/APIchanges | 4 ++++ libavcodec/avfft.h | 25 +++++++++++++++++++++++++ libavcodec/tests/fft.c | 4 ++++ libavcodec/version.h | 2 +- libavcodec/version_major.h | 2 ++ 5 files changed, 36 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 5afe8bcb75..38fc0b1459 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-07-xx - xxxxxxxxxx - lavc 60.23.100 - avfft.h + Deprecate av_dct, av_rdft, av_fft and av_mdct. + Replaced by libavutil/tx.h + 2023-07-xx - xxxxxxxxxx - lavc 60 - avcodec.h Deprecate AV_CODEC_FLAG_DROPCHANGED without replacement. diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h index 0c0f9b8d8d..6401833089 100644 --- a/libavcodec/avfft.h +++ b/libavcodec/avfft.h @@ -19,6 +19,10 @@ #ifndef AVCODEC_AVFFT_H #define AVCODEC_AVFFT_H +#include "libavutil/attributes.h" +#include "version_major.h" +#if FF_API_AVFFT + /** * @file * @ingroup lavc_fft @@ -44,26 +48,38 @@ typedef struct FFTContext FFTContext; * Set up a complex FFT. * @param nbits log2 of the length of the input array * @param inverse if 0 perform the forward transform, if 1 perform the inverse + * @deprecated use AVTXContext from libavutil/tx.h */ +attribute_deprecated FFTContext *av_fft_init(int nbits, int inverse); /** * Do the permutation needed BEFORE calling ff_fft_calc(). + * @deprecated use AVTXContext from libavutil/tx.h */ +attribute_deprecated void av_fft_permute(FFTContext *s, FFTComplex *z); /** * Do a complex FFT with the parameters defined in av_fft_init(). The * input data must be permuted before. No 1.0/sqrt(n) normalization is done. + * @deprecated use AVTXContext from libavutil/tx.h */ +attribute_deprecated void av_fft_calc(FFTContext *s, FFTComplex *z); +attribute_deprecated void av_fft_end(FFTContext *s); +attribute_deprecated FFTContext *av_mdct_init(int nbits, int inverse, double scale); +attribute_deprecated void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input); +attribute_deprecated void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input); +attribute_deprecated void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input); +attribute_deprecated void av_mdct_end(FFTContext *s); /* Real Discrete Fourier Transform */ @@ -81,9 +97,13 @@ typedef struct RDFTContext RDFTContext; * Set up a real FFT. * @param nbits log2 of the length of the input array * @param trans the type of transform + * @deprecated use AVTXContext from libavutil/tx.h */ +attribute_deprecated RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans); +attribute_deprecated void av_rdft_calc(RDFTContext *s, FFTSample *data); +attribute_deprecated void av_rdft_end(RDFTContext *s); /* Discrete Cosine Transform */ @@ -106,13 +126,18 @@ enum DCTTransformType { * @param type the type of transform * * @note the first element of the input of DST-I is ignored + * @deprecated use AVTXContext from libavutil/tx.h */ +attribute_deprecated DCTContext *av_dct_init(int nbits, enum DCTTransformType type); +attribute_deprecated void av_dct_calc(DCTContext *s, FFTSample *data); +attribute_deprecated void av_dct_end (DCTContext *s); /** * @} */ +#endif /* FF_API_AVFFT */ #endif /* AVCODEC_AVFFT_H */ diff --git a/libavcodec/tests/fft.c b/libavcodec/tests/fft.c index 163f3e89c4..a9ea457bc9 100644 --- a/libavcodec/tests/fft.c +++ b/libavcodec/tests/fft.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +FF_DISABLE_DEPRECATION_WARNINGS + /** * @file * FFT and MDCT tests. @@ -675,3 +677,5 @@ cleanup: return !!err; } + +FF_ENABLE_DEPRECATION_WARNINGS diff --git a/libavcodec/version.h b/libavcodec/version.h index 9411511e04..728ab8839d 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 22 +#define LIBAVCODEC_VERSION_MINOR 23 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h index 95c5aec0c5..cfd0b5023e 100644 --- a/libavcodec/version_major.h +++ b/libavcodec/version_major.h @@ -50,6 +50,8 @@ #define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62) + // reminder to remove CrystalHD decoders on next major bump #define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61) -- 2.40.1