summaryrefslogtreecommitdiff
path: root/libavutil/tx.h
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2019-07-27 18:54:20 +0100
committerLynne <dev@lynne.ee>2019-08-02 01:19:52 +0100
commit42e2319ba9b75c3ca55be7f18a0322ecb498ea97 (patch)
tree0ea27392acae99024413f7acf50e70d6f8034130 /libavutil/tx.h
parentf60b1211b2aa7b6e8902d64072b678b4ccd87e54 (diff)
lavu/tx: add support for double precision FFT and MDCT
Simply moves and templates the actual transforms to support an additional data type. Unlike the float version, which is equal or better than libfftw3f, double precision output is bit identical with libfftw3.
Diffstat (limited to 'libavutil/tx.h')
-rw-r--r--libavutil/tx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/tx.h b/libavutil/tx.h
index b1f2d96353..d6cdfdf9f2 100644
--- a/libavutil/tx.h
+++ b/libavutil/tx.h
@@ -28,6 +28,10 @@ typedef struct AVComplexFloat {
float re, im;
} AVComplexFloat;
+typedef struct AVComplexDouble {
+ double re, im;
+} AVComplexDouble;
+
enum AVTXType {
/**
* Standard complex to complex FFT with sample data type AVComplexFloat.
@@ -39,6 +43,14 @@ enum AVTXType {
* float. Length is the frame size, not the window size (which is 2x frame)
*/
AV_TX_FLOAT_MDCT = 1,
+ /**
+ * Same as AV_TX_FLOAT_FFT with a data type of AVComplexDouble.
+ */
+ AV_TX_DOUBLE_FFT = 2,
+ /**
+ * Same as AV_TX_FLOAT_MDCT with data and scale type of double.
+ */
+ AV_TX_DOUBLE_MDCT = 3,
};
/**