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

Walken IDCT Alternative idct implementations for decoding compatibility. More...

#include "xvididct.h"

Go to the source code of this file.

Macros

#define ROW_SHIFT   11
 
#define COL_SHIFT   6
 
#define Rnd0   65536
 
#define Rnd1   3597
 
#define Rnd2   2260
 
#define Rnd3   1203
 
#define Rnd4   0
 
#define Rnd5   120
 
#define Rnd6   512
 
#define Rnd7   512
 
#define Tan1   0x32ec
 
#define Tan2   0x6a0a
 
#define Tan3   0xab0e
 
#define Sqrt2   0x5a82
 
#define MULT(c, x, n)   ( ((c) * (x)) >> (n) )
 
#define BUTF(a, b, tmp)
 
#define LOAD_BUTF(m1, m2, a, b, tmp, S)
 

Functions

static int Idct_Row (short *In, const int *const Tab, int Rnd)
 
static void Idct_Col_8 (short *const In)
 
static void Idct_Col_4 (short *const In)
 
static void Idct_Col_3 (short *const In)
 
void ff_idct_xvid (int16_t *const In)
 

Variables

static const int Tab04 [] = { 22725, 21407, 19266, 16384, 12873, 8867, 4520 }
 
static const int Tab17 [] = { 31521, 29692, 26722, 22725, 17855, 12299, 6270 }
 
static const int Tab26 [] = { 29692, 27969, 25172, 21407, 16819, 11585, 5906 }
 
static const int Tab35 [] = { 26722, 25172, 22654, 19266, 15137, 10426, 5315 }
 

Detailed Description

Walken IDCT Alternative idct implementations for decoding compatibility.

Author
Skal
Note
this "C" version is not the original one, but is modified to yield the same error profile as the MMX version.

Definition in file xvid_c_idct.c.

Macro Definition Documentation

#define ROW_SHIFT   11

Definition at line 41 of file xvid_c_idct.c.

Referenced by Idct_Row().

#define COL_SHIFT   6

Definition at line 42 of file xvid_c_idct.c.

Referenced by Idct_Col_3(), Idct_Col_4(), and Idct_Col_8().

#define Rnd0   65536

Definition at line 45 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd1   3597

Definition at line 46 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd2   2260

Definition at line 47 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd3   1203

Definition at line 48 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd4   0

Definition at line 49 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd5   120

Definition at line 50 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd6   512

Definition at line 51 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Rnd7   512

Definition at line 52 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

#define Tan1   0x32ec

Definition at line 144 of file xvid_c_idct.c.

Referenced by Idct_Col_3(), Idct_Col_4(), and Idct_Col_8().

#define Tan2   0x6a0a

Definition at line 145 of file xvid_c_idct.c.

Referenced by Idct_Col_3(), Idct_Col_4(), and Idct_Col_8().

#define Tan3   0xab0e

Definition at line 146 of file xvid_c_idct.c.

Referenced by Idct_Col_4(), and Idct_Col_8().

#define Sqrt2   0x5a82

Definition at line 147 of file xvid_c_idct.c.

Referenced by Idct_Col_3(), Idct_Col_4(), and Idct_Col_8().

#define MULT (   c,
  x,
  n 
)    ( ((c) * (x)) >> (n) )

Definition at line 149 of file xvid_c_idct.c.

Referenced by Idct_Col_3(), Idct_Col_4(), and Idct_Col_8().

#define BUTF (   a,
  b,
  tmp 
)
Value:
(tmp) = (a)+(b); \
(b) = (a)-(b); \
(a) = (tmp)

Definition at line 153 of file xvid_c_idct.c.

Referenced by Idct_Col_3(), Idct_Col_4(), and Idct_Col_8().

#define LOAD_BUTF (   m1,
  m2,
  a,
  b,
  tmp,
  S 
)
Value:
(m1) = (S)[(a)] + (S)[(b)]; \
(m2) = (S)[(a)] - (S)[(b)]

Definition at line 158 of file xvid_c_idct.c.

Referenced by Idct_Col_8().

Function Documentation

static int Idct_Row ( short *  In,
const int *const  Tab,
int  Rnd 
)
static

Definition at line 59 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

static void Idct_Col_8 ( short *const  In)
static

Definition at line 162 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

static void Idct_Col_4 ( short *const  In)
static

Definition at line 214 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

static void Idct_Col_3 ( short *const  In)
static

Definition at line 258 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

void ff_idct_xvid ( int16_t *const  In)

Definition at line 305 of file xvid_c_idct.c.

Referenced by ff_xvid_idct_init(), idct_xvid_add(), and idct_xvid_put().

Variable Documentation

const int Tab04[] = { 22725, 21407, 19266, 16384, 12873, 8867, 4520 }
static

Definition at line 54 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

const int Tab17[] = { 31521, 29692, 26722, 22725, 17855, 12299, 6270 }
static

Definition at line 55 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

const int Tab26[] = { 29692, 27969, 25172, 21407, 16819, 11585, 5906 }
static

Definition at line 56 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().

const int Tab35[] = { 26722, 25172, 22654, 19266, 15137, 10426, 5315 }
static

Definition at line 57 of file xvid_c_idct.c.

Referenced by ff_idct_xvid().