FFmpeg
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"

Macros

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

Functions

av_cold int ff_dct_init (DCTContext *s, int nbits, enum DCTTransformType inverse)
 Set up DCT. More...
 
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.

Function Documentation

§ 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