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

(Inverse) Discrete Cosine Transforms. More...

#include <math.h>
#include <string.h>
#include "libavutil/mathematics.h"
#include "dct.h"
#include "dct32.h"

Go to the source code of this file.

Macros

#define SIN(s, n, x)   (s->costab[(n) - (x)])
 
#define COS(s, n, x)   (s->costab[x])
 

Functions

static void dst_calc_I_c (DCTContext *ctx, FFTSample *data)
 
static void dct_calc_I_c (DCTContext *ctx, FFTSample *data)
 
static void dct_calc_III_c (DCTContext *ctx, FFTSample *data)
 
static void dct_calc_II_c (DCTContext *ctx, FFTSample *data)
 
static void dct32_func (DCTContext *ctx, FFTSample *data)
 
av_cold int ff_dct_init (DCTContext *s, int nbits, enum DCTTransformType inverse)
 Set up DCT.
 
av_cold void ff_dct_end (DCTContext *s)
 

Detailed Description

(Inverse) Discrete Cosine Transforms.

These are also known as the type II and type III DCTs respectively.

Definition in file dct.c.

Macro Definition Documentation

#define SIN (   s,
  n,
 
)    (s->costab[(n) - (x)])

Definition at line 38 of file dct.c.

Referenced by dct_calc_I_c(), dct_calc_II_c(), dct_calc_III_c(), and dst_calc_I_c().

#define COS (   s,
  n,
 
)    (s->costab[x])

Definition at line 41 of file dct.c.

Referenced by dct_calc_I_c(), dct_calc_II_c(), and dct_calc_III_c().

Function Documentation

static void dst_calc_I_c ( DCTContext ctx,
FFTSample data 
)
static

Definition at line 43 of file dct.c.

Referenced by ff_dct_init().

static void dct_calc_I_c ( DCTContext ctx,
FFTSample data 
)
static

Definition at line 73 of file dct.c.

Referenced by ff_dct_init().

static void dct_calc_III_c ( DCTContext ctx,
FFTSample data 
)
static

Definition at line 103 of file dct.c.

Referenced by ff_dct_init().

static void dct_calc_II_c ( DCTContext ctx,
FFTSample data 
)
static

Definition at line 136 of file dct.c.

Referenced by ff_dct_init().

static void dct32_func ( DCTContext ctx,
FFTSample data 
)
static

Definition at line 172 of file dct.c.

Referenced by ff_dct_init().

av_cold int ff_dct_init ( DCTContext s,
int  nbits,
enum DCTTransformType  type 
)

Set up DCT.

Parameters
nbitssize of the input array: (1 << nbits) for DCT-II, DCT-III and DST-I (1 << nbits) + 1 for DCT-I
Note
the first element of the input of DST-I is ignored

Definition at line 177 of file dct.c.

Referenced by decode_init(), ff_mpadsp_init(), main(), and wmavoice_decode_init().

av_cold void ff_dct_end ( DCTContext s)

Definition at line 218 of file dct.c.

Referenced by decode_end(), main(), and wmavoice_decode_end().