FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
opus_imdct.c File Reference

Celt non-power of 2 iMDCT. More...

#include <float.h>
#include <math.h>
#include <stddef.h>
#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "avfft.h"
#include "opus.h"
#include "opus_imdct.h"

Go to the source code of this file.

Macros

#define CELT_MIN_IMDCT_SIZE   120
 
#define CMUL3(cre, cim, are, aim, bre, bim)
 
#define CMUL(c, a, b)   CMUL3((c).re, (c).im, (a).re, (a).im, (b).re, (b).im)
 
#define CMUL2(c, d, a, b)
 

Functions

av_cold void ff_celt_imdct_uninit (CeltIMDCTContext **ps)
 Free an iMDCT.
 
static void celt_imdct_half (CeltIMDCTContext *s, float *dst, const float *src, ptrdiff_t stride, float scale)
 
av_cold int ff_celt_imdct_init (CeltIMDCTContext **ps, int N)
 Init an iMDCT of the length 2 * 15 * (2^N)
 
static void fft5 (FFTComplex *out, const FFTComplex *in, ptrdiff_t stride)
 
static void fft15 (CeltIMDCTContext *s, FFTComplex *out, const FFTComplex *in, ptrdiff_t stride)
 
static void fft_calc (CeltIMDCTContext *s, FFTComplex *out, const FFTComplex *in, int N, ptrdiff_t stride)
 

Detailed Description

Celt non-power of 2 iMDCT.

Definition in file opus_imdct.c.

Macro Definition Documentation

#define CELT_MIN_IMDCT_SIZE   120

Definition at line 40 of file opus_imdct.c.

Referenced by ff_celt_imdct_init().

#define CMUL3 (   cre,
  cim,
  are,
  aim,
  bre,
  bim 
)
Value:
do { \
cre = are * bre - aim * bim; \
cim = are * bim + aim * bre; \
} while (0)

Definition at line 43 of file opus_imdct.c.

Referenced by celt_imdct_half().

#define CMUL (   c,
  a,
  b 
)    CMUL3((c).re, (c).im, (a).re, (a).im, (b).re, (b).im)

Definition at line 49 of file opus_imdct.c.

Referenced by celt_imdct_half(), fft15(), and fft_calc().

#define CMUL2 (   c,
  d,
  a,
  b 
)
Value:
do { \
float are = (a).re; \
float aim = (a).im; \
float bre = (b).re; \
float bim = (b).im; \
float rr = are * bre; \
float ri = are * bim; \
float ir = aim * bre; \
float ii = aim * bim; \
(c).re = rr - ii; \
(c).im = ri + ir; \
(d).re = rr + ii; \
(d).im = -ri + ir; \
} while (0)

Definition at line 53 of file opus_imdct.c.

Referenced by fft5().

Function Documentation

av_cold void ff_celt_imdct_uninit ( CeltIMDCTContext **  ps)

Free an iMDCT.

Definition at line 69 of file opus_imdct.c.

Referenced by ff_celt_free(), and ff_celt_imdct_init().

static void celt_imdct_half ( CeltIMDCTContext s,
float *  dst,
const float *  src,
ptrdiff_t  stride,
float  scale 
)
static

Definition at line 244 of file opus_imdct.c.

Referenced by ff_celt_imdct_init().

av_cold int ff_celt_imdct_init ( CeltIMDCTContext **  ps,
int  N 
)

Init an iMDCT of the length 2 * 15 * (2^N)

Definition at line 90 of file opus_imdct.c.

Referenced by ff_celt_init().

static void fft5 ( FFTComplex out,
const FFTComplex in,
ptrdiff_t  stride 
)
static

Definition at line 150 of file opus_imdct.c.

Referenced by fft15().

static void fft15 ( CeltIMDCTContext s,
FFTComplex out,
const FFTComplex in,
ptrdiff_t  stride 
)
static

Definition at line 183 of file opus_imdct.c.

Referenced by fft_calc().

static void fft_calc ( CeltIMDCTContext s,
FFTComplex out,
const FFTComplex in,
int  N,
ptrdiff_t  stride 
)
static

Definition at line 218 of file opus_imdct.c.

Referenced by celt_imdct_half().