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.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user