FFmpeg
Macros | Functions
fft-internal.h File Reference
#include "fft.h"
#include "mathops.h"

Go to the source code of this file.

Macros

#define SCALE_FLOAT(a, bits)   lrint((a) * (double)(1 << (bits)))
 
#define FIX15(a)   av_clip(SCALE_FLOAT(a, 15), -32767, 32767)
 
#define sqrthalf   ((int16_t)((1<<15)*M_SQRT1_2))
 
#define BF(x, y, a, b)
 
#define CMULS(dre, dim, are, aim, bre, bim, sh)
 
#define CMUL(dre, dim, are, aim, bre, bim)   CMULS(dre, dim, are, aim, bre, bim, 15)
 
#define CMULL(dre, dim, are, aim, bre, bim)   CMULS(dre, dim, are, aim, bre, bim, 0)
 
#define ff_imdct_calc_c   FFT_NAME(ff_imdct_calc_c)
 
#define ff_imdct_half_c   FFT_NAME(ff_imdct_half_c)
 
#define ff_mdct_calc_c   FFT_NAME(ff_mdct_calc_c)
 

Functions

void ff_mdct_calcw_c (FFTContext *s, FFTDouble *output, const FFTSample *input)
 
void ff_imdct_calc_c (FFTContext *s, FFTSample *output, const FFTSample *input)
 Compute inverse MDCT of size N = 2^nbits. More...
 
void ff_imdct_half_c (FFTContext *s, FFTSample *output, const FFTSample *input)
 Compute the middle half of the inverse MDCT of size N = 2^nbits, thus excluding the parts that can be derived by symmetry. More...
 
void ff_mdct_calc_c (FFTContext *s, FFTSample *output, const FFTSample *input)
 Compute MDCT of size N = 2^nbits. More...
 

Macro Definition Documentation

◆ SCALE_FLOAT

#define SCALE_FLOAT (   a,
  bits 
)    lrint((a) * (double)(1 << (bits)))

Definition at line 39 of file fft-internal.h.

◆ FIX15

#define FIX15 (   a)    av_clip(SCALE_FLOAT(a, 15), -32767, 32767)

Definition at line 62 of file fft-internal.h.

◆ sqrthalf

#define sqrthalf   ((int16_t)((1<<15)*M_SQRT1_2))

Definition at line 64 of file fft-internal.h.

◆ BF

#define BF (   x,
  y,
  a,
  b 
)
Value:
do { \
x = (a - b) >> 1; \
y = (a + b) >> 1; \
} while (0)

Definition at line 66 of file fft-internal.h.

◆ CMULS

#define CMULS (   dre,
  dim,
  are,
  aim,
  bre,
  bim,
  sh 
)
Value:
do { \
(dre) = (MUL16(are, bre) - MUL16(aim, bim)) >> sh; \
(dim) = (MUL16(are, bim) + MUL16(aim, bre)) >> sh; \
} while (0)

Definition at line 71 of file fft-internal.h.

◆ CMUL

#define CMUL (   dre,
  dim,
  are,
  aim,
  bre,
  bim 
)    CMULS(dre, dim, are, aim, bre, bim, 15)

Definition at line 76 of file fft-internal.h.

◆ CMULL

#define CMULL (   dre,
  dim,
  are,
  aim,
  bre,
  bim 
)    CMULS(dre, dim, are, aim, bre, bim, 0)

Definition at line 79 of file fft-internal.h.

◆ ff_imdct_calc_c

#define ff_imdct_calc_c   FFT_NAME(ff_imdct_calc_c)

Definition at line 86 of file fft-internal.h.

◆ ff_imdct_half_c

#define ff_imdct_half_c   FFT_NAME(ff_imdct_half_c)

Definition at line 87 of file fft-internal.h.

◆ ff_mdct_calc_c

#define ff_mdct_calc_c   FFT_NAME(ff_mdct_calc_c)

Definition at line 88 of file fft-internal.h.

Function Documentation

◆ ff_mdct_calcw_c()

void ff_mdct_calcw_c ( FFTContext s,
FFTDouble output,
const FFTSample input 
)

Definition at line 24 of file mdct_fixed.c.

Referenced by ff_fft_init().

◆ ff_imdct_calc_c()

void ff_imdct_calc_c ( FFTContext s,
FFTSample output,
const FFTSample input 
)

Compute inverse MDCT of size N = 2^nbits.

Parameters
outputN samples
inputN/2 samples

Definition at line 147 of file mdct_template.c.

◆ ff_imdct_half_c()

void ff_imdct_half_c ( FFTContext s,
FFTSample output,
const FFTSample input 
)

Compute the middle half of the inverse MDCT of size N = 2^nbits, thus excluding the parts that can be derived by symmetry.

Parameters
outputN/2 samples
inputN/2 samples

Definition at line 105 of file mdct_template.c.

Referenced by ff_imdct_calc_c().

◆ ff_mdct_calc_c()

void ff_mdct_calc_c ( FFTContext s,
FFTSample out,
const FFTSample input 
)

Compute MDCT of size N = 2^nbits.

Parameters
inputN samples
outN/2 samples

Definition at line 167 of file mdct_template.c.

b
#define b
Definition: input.c:41
MUL16
#define MUL16(ra, rb)
Definition: mathops.h:88
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
dim
int dim
Definition: vorbis_enc_data.h:451