From patchwork Fri Feb 17 16:54:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lynne X-Patchwork-Id: 40422 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp1492036pzk; Fri, 17 Feb 2023 08:55:12 -0800 (PST) X-Google-Smtp-Source: AK7set8GPSHDeortUzKL8SgwByBIvdrAW5oQsHrKnsP539a9nb7xHZOdRrNCnIv47AptOtaWb/BF X-Received: by 2002:a17:906:8257:b0:88d:79df:7cfc with SMTP id f23-20020a170906825700b0088d79df7cfcmr9988185ejx.62.1676652912097; Fri, 17 Feb 2023 08:55:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676652912; cv=none; d=google.com; s=arc-20160816; b=mH4UPEHDd1nctHFCeP/Wg/meh1lNrqbXTPvR4JWJQ+hk3jSPMMUWfegEMLOJWgFvX9 4KwRcoETtJaQc3jTNgx1ZFHyuCltb6rXjVAdTL6x0bi65dEyaJXhxyCDOlsRCL3iC5Hh dW2lMy2f25VQkjLTKobjwV6W1zKwAghaqqznpJH90Mus7L+V74wXm0JDDbGNUcaVNcuk YEMIbZBi5CKZese0eC0WAQngOp7fBloyV1YkPm7WZCE2jXXalWlmgOl2J9tsgWuPuewI 2DukdKEprMW34FLh3yAh/Cl797+sKQkOGWi17Dt+X7Ktm1odvQ8Z4Qn/v04PhwunFk80 EAVQ== 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:message-id:to:from:date:dkim-signature:delivered-to; bh=wo0YTu2dea1xuU3oqdWOd2axp7KPqMybuDKv4XCFC0c=; b=nvfDRtqxZE7sRDQo9OFEkfLdzY+tuCp1Yz5GvHrxGszOCsZXAJBljtYPoLfmPuqBke KFSE+Tsdu7QuqHHD7hVvIp0YLxTTy+t378+czG9HKEHDQOo1U7hCmXSCSz4AbyU9ihNQ zPfnBxbhuSDjuVlmOkFjU2PBbFkciNTU6aBhEKZKgfse5/TdqcybEZ9CcWxp9RCdtSlz 1xYOwnkA7WB+fr6vCHJzMUC0bYUMPURBmUqmk/njzcdHArExtng3O+sTMCKU6B/3+a7v 3EEnQsJ0UtQm5WewP6hicAjff2fdQfL9b2IUDduVyAhYY7rXG7GHXzIfdQVG/RXGazKk 194A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@lynne.ee header.s=s1 header.b=tCdE6wVt; 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 ka12-20020a170907920c00b008b14cb79a99si4992889ejb.916.2023.02.17.08.54.47; Fri, 17 Feb 2023 08:55:12 -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; dkim=neutral (body hash did not verify) header.i=@lynne.ee header.s=s1 header.b=tCdE6wVt; 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 4FFAE68BEBF; Fri, 17 Feb 2023 18:54:44 +0200 (EET) 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 8877168BE6E for ; Fri, 17 Feb 2023 18:54:38 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id 408311060210 for ; Fri, 17 Feb 2023 16:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1676652878; 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:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=kcO8vY5zgHJPMy25yPGcn9KgEB+FoJUW/JDc2tzlL9U=; b=tCdE6wVtB2Q0ggF8GdAdo8z+UcWcaZp0lbvNwHj2sskPu1W7CmcqNeCxM9nw1Xd+ U3CAd0uWDxaqPI+ng3r71xMwmpkpYDcbASy/S98bWVHEOUhNY0vQD5mKj17Ss6jn0PG rsof182CFjGcEwocSGNQjzNSjszHVVpnm95O2Bzdy7NPDUwKU+wXaWv2LUaW/pAJ1K2 IJR+RgKldU0ID2+2bFEflc3OdXjcWRCT/ezhBwOb+k2s008fK3rBjsfsGM3lIGRJUMZ GE2bUYb9/hdGpN4aLJtrfv9rUy5M+dEKjRN6EYSghFcsQch7/XBVtaMSb3zE1/TC8io WB6aRBO+Cg== Date: Fri, 17 Feb 2023 17:54:38 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct 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: neWw2hbIhl9N This reverts commit 26cb36f35746fe6ef53688b119852bfa6d555f62. All filters and all codecs (except wmavoice) have been ported for the lavu/tx API. The noise should be minimal. Patch attached. From 5459ae39a729c69939de65392373d4f9cdf47246 Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 17 Feb 2023 17:51:51 +0100 Subject: [PATCH] lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct This reverts commit 26cb36f35746fe6ef53688b119852bfa6d555f62. --- doc/APIchanges | 4 ++++ libavcodec/avdct.h | 7 ++++++- libavcodec/avfft.h | 39 ++++++++++++++++++++++++++++++++------- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 29161e30bf..6536315fc2 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-02-17 - xxxxxxxxxx - lavc 60.2.100 - avdct.h avfft.h + Deprecate avcodec_dct, av_dct, av_rdft, av_fft and av_mdct. + Replaced by libavutil/tx.h + 2023-02-16 - xxxxxxxxxx - lavf 60.2.100 - avformat.h Deprecate AVFormatContext io_close callback. The superior io_close2 callback should be used instead. diff --git a/libavcodec/avdct.h b/libavcodec/avdct.h index 6411fab6f6..06da0e80d4 100644 --- a/libavcodec/avdct.h +++ b/libavcodec/avdct.h @@ -19,6 +19,7 @@ #ifndef AVCODEC_AVDCT_H #define AVCODEC_AVDCT_H +#include "libavutil/attributes.h" #include "libavutil/opt.h" /** @@ -26,7 +27,7 @@ * @note function pointers can be NULL if the specific features have been * disabled at build time. */ -typedef struct AVDCT { +typedef struct attribute_deprecated AVDCT { const AVClass *av_class; void (*idct)(int16_t *block /* align 16 */); @@ -80,9 +81,13 @@ typedef struct AVDCT { * * To free it use av_free() */ +attribute_deprecated AVDCT *avcodec_dct_alloc(void); + +attribute_deprecated int avcodec_dct_init(AVDCT *); +attribute_deprecated const AVClass *avcodec_dct_get_class(void); #endif /* AVCODEC_AVDCT_H */ diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h index 0c0f9b8d8d..d49bc98a29 100644 --- a/libavcodec/avfft.h +++ b/libavcodec/avfft.h @@ -19,6 +19,8 @@ #ifndef AVCODEC_AVFFT_H #define AVCODEC_AVFFT_H +#include "libavutil/attributes.h" + /** * @file * @ingroup lavc_fft @@ -32,65 +34,83 @@ * @{ */ -typedef float FFTSample; +typedef float attribute_deprecated FFTSample; -typedef struct FFTComplex { +typedef struct attribute_deprecated FFTComplex { FFTSample re, im; } FFTComplex; -typedef struct FFTContext FFTContext; +typedef struct attribute_deprecated 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 */ +attribute_deprecated FFTContext *av_fft_init(int nbits, int inverse); /** * Do the permutation needed BEFORE calling ff_fft_calc(). */ +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. */ +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 */ -enum RDFTransformType { +enum attribute_deprecated RDFTransformType { DFT_R2C, IDFT_C2R, IDFT_R2C, DFT_C2R, }; -typedef struct RDFTContext RDFTContext; +typedef struct attribute_deprecated RDFTContext RDFTContext; /** * Set up a real FFT. * @param nbits log2 of the length of the input array * @param trans the type of transform */ +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 */ -typedef struct DCTContext DCTContext; +typedef struct attribute_deprecated DCTContext DCTContext; -enum DCTTransformType { +enum attribute_deprecated DCTTransformType { DCT_II = 0, DCT_III, DCT_I, @@ -107,8 +127,13 @@ enum DCTTransformType { * * @note the first element of the input of DST-I is ignored */ +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); /** -- 2.39.2