FFmpeg  4.0
Macros | Functions
simple_idct.c File Reference

simpleidct in C. More...

#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "mathops.h"
#include "simple_idct.h"
#include "simple_idct_template.c"

Go to the source code of this file.

Macros

#define IN_IDCT_DEPTH   16
 
#define BIT_DEPTH   8
 
#define BIT_DEPTH   10
 
#define EXTRA_SHIFT   2
 
#define BIT_DEPTH   12
 
#define IN_IDCT_DEPTH   32
 
#define BIT_DEPTH   10
 
#define CN_SHIFT   12
 
#define C_FIX(x)   ((int)((x) * (1 << CN_SHIFT) + 0.5))
 
#define C1   C_FIX(0.6532814824)
 
#define C2   C_FIX(0.2705980501)
 
#define C_SHIFT   (4+1+12)
 
#define BF(k)
 
#define CN_SHIFT   12
 
#define C_FIX(x)   ((int)((x) * M_SQRT2 * (1 << CN_SHIFT) + 0.5))
 
#define C1   C_FIX(0.6532814824)
 
#define C2   C_FIX(0.2705980501)
 
#define C3   C_FIX(0.5)
 
#define C_SHIFT   (4+1+12)
 
#define RN_SHIFT   15
 
#define R_FIX(x)   ((int)((x) * M_SQRT2 * (1 << RN_SHIFT) + 0.5))
 
#define R1   R_FIX(0.6532814824)
 
#define R2   R_FIX(0.2705980501)
 
#define R3   R_FIX(0.5)
 
#define R_SHIFT   11
 

Functions

static void idct4col_put (uint8_t *dest, ptrdiff_t line_size, const int16_t *col)
 
void ff_simple_idct248_put (uint8_t *dest, ptrdiff_t line_size, int16_t *block)
 
static void idct4col_add (uint8_t *dest, ptrdiff_t line_size, const int16_t *col)
 
static void idct4row (int16_t *row)
 
void ff_simple_idct84_add (uint8_t *dest, ptrdiff_t line_size, int16_t *block)
 
void ff_simple_idct48_add (uint8_t *dest, ptrdiff_t line_size, int16_t *block)
 
void ff_simple_idct44_add (uint8_t *dest, ptrdiff_t line_size, int16_t *block)
 
void ff_prores_idct (int16_t *block, const int16_t *qmat)
 Special version of ff_simple_idct_int16_10bit() which does dequantization and scales by a factor of 2 more between the two IDCTs to account for larger scale of input coefficients. More...
 

Detailed Description

simpleidct in C.

Definition in file simple_idct.c.

Macro Definition Documentation

◆ IN_IDCT_DEPTH [1/2]

#define IN_IDCT_DEPTH   16

Definition at line 53 of file simple_idct.c.

◆ BIT_DEPTH [1/4]

#define BIT_DEPTH   8

Definition at line 54 of file simple_idct.c.

◆ BIT_DEPTH [2/4]

#define BIT_DEPTH   10

Definition at line 54 of file simple_idct.c.

◆ EXTRA_SHIFT

#define EXTRA_SHIFT   2

Definition at line 42 of file simple_idct.c.

◆ BIT_DEPTH [3/4]

#define BIT_DEPTH   12

Definition at line 54 of file simple_idct.c.

◆ IN_IDCT_DEPTH [2/2]

#define IN_IDCT_DEPTH   32

Definition at line 53 of file simple_idct.c.

◆ BIT_DEPTH [4/4]

#define BIT_DEPTH   10

Definition at line 54 of file simple_idct.c.

◆ CN_SHIFT [1/2]

#define CN_SHIFT   12

Definition at line 143 of file simple_idct.c.

Referenced by idct4col_put().

◆ C_FIX [1/2]

#define C_FIX (   x)    ((int)((x) * (1 << CN_SHIFT) + 0.5))

Definition at line 144 of file simple_idct.c.

◆ C1 [1/2]

#define C1   C_FIX(0.6532814824)

Definition at line 145 of file simple_idct.c.

Referenced by idct4col_add(), and idct4col_put().

◆ C2 [1/2]

#define C2   C_FIX(0.2705980501)

Definition at line 146 of file simple_idct.c.

Referenced by idct4col_add(), and idct4col_put().

◆ C_SHIFT [1/2]

#define C_SHIFT   (4+1+12)

Definition at line 148 of file simple_idct.c.

Referenced by idct4col_add(), and idct4col_put().

◆ BF

#define BF (   k)
Value:
{\
int a0, a1;\
a0 = ptr[k];\
a1 = ptr[8 + k];\
ptr[k] = a0 + a1;\
ptr[8 + k] = a0 - a1;\
}
#define a0
Definition: regdef.h:46
#define a1
Definition: regdef.h:47

Definition at line 91 of file simple_idct.c.

Referenced by ff_simple_idct248_put().

◆ CN_SHIFT [2/2]

#define CN_SHIFT   12

Definition at line 143 of file simple_idct.c.

◆ C_FIX [2/2]

#define C_FIX (   x)    ((int)((x) * M_SQRT2 * (1 << CN_SHIFT) + 0.5))

Definition at line 144 of file simple_idct.c.

◆ C1 [2/2]

#define C1   C_FIX(0.6532814824)

Definition at line 145 of file simple_idct.c.

◆ C2 [2/2]

#define C2   C_FIX(0.2705980501)

Definition at line 146 of file simple_idct.c.

◆ C3

#define C3   C_FIX(0.5)

Definition at line 147 of file simple_idct.c.

Referenced by idct4col_add().

◆ C_SHIFT [2/2]

#define C_SHIFT   (4+1+12)

Definition at line 148 of file simple_idct.c.

◆ RN_SHIFT

#define RN_SHIFT   15

Definition at line 170 of file simple_idct.c.

◆ R_FIX

#define R_FIX (   x)    ((int)((x) * M_SQRT2 * (1 << RN_SHIFT) + 0.5))

Definition at line 171 of file simple_idct.c.

◆ R1

#define R1   R_FIX(0.6532814824)

Definition at line 172 of file simple_idct.c.

Referenced by ff_yuv2rgb_init_tables_ppc(), and idct4row().

◆ R2

#define R2   R_FIX(0.2705980501)

Definition at line 173 of file simple_idct.c.

Referenced by idct4row(), and wv_unpack_stereo().

◆ R3

#define R3   R_FIX(0.5)

Definition at line 174 of file simple_idct.c.

Referenced by idct4row().

◆ R_SHIFT

#define R_SHIFT   11

Definition at line 175 of file simple_idct.c.

Referenced by idct4row().

Function Documentation

◆ idct4col_put()

static void idct4col_put ( uint8_t dest,
ptrdiff_t  line_size,
const int16_t *  col 
)
inlinestatic

Definition at line 70 of file simple_idct.c.

Referenced by ff_simple_idct248_put().

◆ ff_simple_idct248_put()

void ff_simple_idct248_put ( uint8_t dest,
ptrdiff_t  line_size,
int16_t *  block 
)

Definition at line 106 of file simple_idct.c.

Referenced by dvvideo_decode_init(), and main().

◆ idct4col_add()

static void idct4col_add ( uint8_t dest,
ptrdiff_t  line_size,
const int16_t *  col 
)
inlinestatic

Definition at line 149 of file simple_idct.c.

Referenced by ff_simple_idct44_add(), and ff_simple_idct84_add().

◆ idct4row()

static void idct4row ( int16_t *  row)
inlinestatic

Definition at line 176 of file simple_idct.c.

Referenced by ff_simple_idct44_add(), and ff_simple_idct48_add().

◆ ff_simple_idct84_add()

void ff_simple_idct84_add ( uint8_t dest,
ptrdiff_t  line_size,
int16_t *  block 
)

Definition at line 194 of file simple_idct.c.

Referenced by ff_vc1_decode_sequence_header(), and wmv2_add_block().

◆ ff_simple_idct48_add()

void ff_simple_idct48_add ( uint8_t dest,
ptrdiff_t  line_size,
int16_t *  block 
)

Definition at line 209 of file simple_idct.c.

Referenced by ff_vc1_decode_sequence_header(), and wmv2_add_block().

◆ ff_simple_idct44_add()

void ff_simple_idct44_add ( uint8_t dest,
ptrdiff_t  line_size,
int16_t *  block 
)

Definition at line 224 of file simple_idct.c.

Referenced by ff_vc1_decode_sequence_header().

◆ ff_prores_idct()

void ff_prores_idct ( int16_t *  block,
const int16_t *  qmat 
)

Special version of ff_simple_idct_int16_10bit() which does dequantization and scales by a factor of 2 more between the two IDCTs to account for larger scale of input coefficients.

Definition at line 239 of file simple_idct.c.

Referenced by ff_prores_idct_wrap(), and prores_idct_put_c().