FFT/IFFT transforms. More...
#include <stdlib.h>
#include <string.h>
#include "libavutil/mathematics.h"
#include "fft.h"
#include "fft-internal.h"
Go to the source code of this file.
Defines | |
#define | BUTTERFLIES(a0, a1, a2, a3) |
#define | BUTTERFLIES_BIG(a0, a1, a2, a3) |
#define | TRANSFORM(a0, a1, a2, a3, wre, wim) |
#define | TRANSFORM_ZERO(a0, a1, a2, a3) |
#define | PASS(name) |
#define | BUTTERFLIES BUTTERFLIES_BIG |
#define | DECL_FFT(n, n2, n4) |
#define | pass pass_big |
Functions | |
COSTABLE (16) | |
COSTABLE (32) | |
COSTABLE (64) | |
COSTABLE (128) | |
COSTABLE (256) | |
COSTABLE (512) | |
COSTABLE (1024) | |
COSTABLE (2048) | |
COSTABLE (4096) | |
COSTABLE (8192) | |
COSTABLE (16384) | |
COSTABLE (32768) | |
COSTABLE (65536) | |
COSTABLE_CONST FFTSample *const | FFT_NAME (ff_cos_tabs)[] |
static void | ff_fft_permute_c (FFTContext *s, FFTComplex *z) |
static void | ff_fft_calc_c (FFTContext *s, FFTComplex *z) |
static int | split_radix_permutation (int i, int n, int inverse) |
av_cold void | ff_init_ff_cos_tabs (int index) |
Initialize the cosine table in ff_cos_tabs[index]. | |
static int | is_second_half_of_fft32 (int i, int n) |
static av_cold void | fft_perm_avx (FFTContext *s) |
av_cold int | ff_fft_init (FFTContext *s, int nbits, int inverse) |
Set up a complex FFT. | |
av_cold void | ff_fft_end (FFTContext *s) |
static void | fft4 (FFTComplex *z) |
static void | fft8 (FFTComplex *z) |
static void | fft16 (FFTComplex *z) |
Variables | |
static const int | avx_tab [] |
static void(*const | fft_dispatch [])(FFTComplex *) |
FFT/IFFT transforms.
Definition in file fft.c.
#define BUTTERFLIES | ( | a0, | |
a1, | |||
a2, | |||
a3 | |||
) |
#define BUTTERFLIES BUTTERFLIES_BIG |
#define BUTTERFLIES_BIG | ( | a0, | |
a1, | |||
a2, | |||
a3 | |||
) |
#define DECL_FFT | ( | n, | |
n2, | |||
n4 | |||
) |
static void fft##n(FFTComplex *z)\ {\ fft##n2(z);\ fft##n4(z+n4*2);\ fft##n4(z+n4*3);\ pass(z,FFT_NAME(ff_cos_##n),n4/2);\ }
static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\ {\ FFTDouble t1, t2, t3, t4, t5, t6;\ int o1 = 2*n;\ int o2 = 4*n;\ int o3 = 6*n;\ const FFTSample *wim = wre+o1;\ n--;\ \ TRANSFORM_ZERO(z[0],z[o1],z[o2],z[o3]);\ TRANSFORM(z[1],z[o1+1],z[o2+1],z[o3+1],wre[1],wim[-1]);\ do {\ z += 2;\ wre += 2;\ wim -= 2;\ TRANSFORM(z[0],z[o1],z[o2],z[o3],wre[0],wim[0]);\ TRANSFORM(z[1],z[o1+1],z[o2+1],z[o3+1],wre[1],wim[-1]);\ } while(--n);\ }
#define pass pass_big |
Definition at line 334 of file fft.c.
Referenced by decode_nal_units(), encode_frame(), ff_lpc_calc_coefs(), ff_pca(), ff_png_pass_row_size(), generate_transition(), gif_read_image(), guess_mv(), h264_handle_packet(), png_get_interlaced_row(), png_put_interlaced_row(), residue_encode(), and vorbis_residue_decode_internal().
#define TRANSFORM_ZERO | ( | a0, | |
a1, | |||
a2, | |||
a3 | |||
) |
COSTABLE | ( | 16 | ) |
COSTABLE | ( | 32 | ) |
COSTABLE | ( | 64 | ) |
COSTABLE | ( | 128 | ) |
COSTABLE | ( | 256 | ) |
COSTABLE | ( | 512 | ) |
COSTABLE | ( | 1024 | ) |
COSTABLE | ( | 2048 | ) |
COSTABLE | ( | 4096 | ) |
COSTABLE | ( | 8192 | ) |
COSTABLE | ( | 16384 | ) |
COSTABLE | ( | 32768 | ) |
COSTABLE | ( | 65536 | ) |
static void ff_fft_calc_c | ( | FFTContext * | s, |
FFTComplex * | z | ||
) | [static] |
Definition at line 349 of file fft.c.
Referenced by ff_fft_init().
av_cold void ff_fft_end | ( | FFTContext * | s | ) |
av_cold int ff_fft_init | ( | FFTContext * | s, |
int | nbits, | ||
int | inverse | ||
) |
static void ff_fft_permute_c | ( | FFTContext * | s, |
FFTComplex * | z | ||
) | [static] |
Definition at line 192 of file fft.c.
Referenced by ff_fft_init().
av_cold void ff_init_ff_cos_tabs | ( | int | index | ) |
static void fft16 | ( | FFTComplex * | z | ) | [static] |
static void fft4 | ( | FFTComplex * | z | ) | [static] |
static void fft8 | ( | FFTComplex * | z | ) | [static] |
COSTABLE_CONST FFTSample* const FFT_NAME | ( | ff_cos_tabs | ) |
static av_cold void fft_perm_avx | ( | FFTContext * | s | ) | [static] |
Definition at line 112 of file fft.c.
Referenced by ff_fft_init().
static int is_second_half_of_fft32 | ( | int | i, |
int | n | ||
) | [static] |
Definition at line 100 of file fft.c.
Referenced by fft_perm_avx().
static int split_radix_permutation | ( | int | i, |
int | n, | ||
int | inverse | ||
) | [static] |
Definition at line 71 of file fft.c.
Referenced by ff_fft_init(), and fft_perm_avx().
const int avx_tab[] [static] |
{ 0, 4, 1, 5, 8, 12, 9, 13, 2, 6, 3, 7, 10, 14, 11, 15 }
Definition at line 96 of file fft.c.
Referenced by fft_perm_avx().
void(* const fft_dispatch[])(FFTComplex *) [static] |