Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct
@ 2023-02-17 16:54 Lynne
  2023-02-17 17:08 ` James Almer
  0 siblings, 1 reply; 16+ messages in thread
From: Lynne @ 2023-02-17 16:54 UTC (permalink / raw)
  To: Ffmpeg Devel

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

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.


[-- Attachment #2: 0001-lavc-deprecate-avcodec_dct-av_fft-av_dct-av_rdft-and.patch --]
[-- Type: text/x-diff, Size: 4900 bytes --]

From 5459ae39a729c69939de65392373d4f9cdf47246 Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
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


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-02-20 17:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 16:54 [FFmpeg-devel] [PATCH] lavc: deprecate avcodec_dct, av_fft, av_dct, av_rdft and av_mdct Lynne
2023-02-17 17:08 ` James Almer
2023-02-17 18:45   ` Lynne
2023-02-17 23:59     ` Hendrik Leppkes
2023-02-18 11:52       ` Lynne
2023-02-18 13:15         ` James Almer
     [not found]   ` <NOVgRri--3-9@lynne.ee-NOVgVXs----9>
2023-02-18 12:49     ` Lynne
2023-02-18 13:32       ` James Almer
2023-02-18 13:45         ` Lynne
2023-02-18 13:58           ` James Almer
2023-02-18 14:53             ` Lynne
2023-02-20 15:34               ` Anton Khirnov
2023-02-20 17:18                 ` Lynne
2023-02-20 17:22                   ` Anton Khirnov
2023-02-20 17:35                     ` Lynne
     [not found]             ` <NO_00XT--3-9@lynne.ee-NO_04wO----9>
2023-02-19 18:47               ` Lynne

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git