d3f5b947 |
/* |
d2119f62 |
* Copyright (c) 2017 Rostislav Pehlivanov <atomnuker@gmail.com>
* |
30cdf384 |
* This file is part of FFmpeg. |
d3f5b947 |
* |
30cdf384 |
* FFmpeg is free software; you can redistribute it and/or |
d3f5b947 |
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* |
30cdf384 |
* FFmpeg is distributed in the hope that it will be useful, |
d3f5b947 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public |
30cdf384 |
* License along with FFmpeg; if not, write to the Free Software |
d3f5b947 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
|
d2119f62 |
#ifndef AVCODEC_MDCT15_H
#define AVCODEC_MDCT15_H |
d3f5b947 |
#include <stddef.h>
|
2d208aaa |
#include "fft.h" |
d3f5b947 |
|
d2119f62 |
typedef struct MDCT15Context { |
d3f5b947 |
int fft_n;
int len2;
int len4; |
d2119f62 |
int inverse; |
2d208aaa |
int *pfa_prereindex;
int *pfa_postreindex;
FFTContext ptwo_fft; |
d3f5b947 |
FFTComplex *tmp;
FFTComplex *twiddle_exptab;
|
e1120b1c |
DECLARE_ALIGNED(32, FFTComplex, exptab)[64]; |
d3f5b947 |
|
e1120b1c |
/* 15-point FFT */
void (*fft15)(FFTComplex *out, FFTComplex *in, FFTComplex *exptab, ptrdiff_t stride);
|
70eb77b3 |
/* PFA postrotate and exptab */
void (*postreindex)(FFTComplex *out, FFTComplex *in, FFTComplex *exp, int *lut, ptrdiff_t len8);
|
e1120b1c |
/* Calculate a full 2N -> N MDCT */ |
d2119f62 |
void (*mdct)(struct MDCT15Context *s, float *dst, const float *src, ptrdiff_t stride);
|
e1120b1c |
/* Calculate the middle half of the iMDCT */ |
d2119f62 |
void (*imdct_half)(struct MDCT15Context *s, float *dst, const float *src, |
aef5f9ab |
ptrdiff_t stride); |
d2119f62 |
} MDCT15Context; |
d3f5b947 |
|
e1120b1c |
/* Init an (i)MDCT of the length 2 * 15 * (2^N) */ |
d2119f62 |
int ff_mdct15_init(MDCT15Context **ps, int inverse, int N, double scale);
void ff_mdct15_uninit(MDCT15Context **ps); |
d3f5b947 |
|
e1120b1c |
void ff_mdct15_init_x86(MDCT15Context *s);
|
d2119f62 |
#endif /* AVCODEC_MDCT15_H */ |