FFmpeg
Data Structures | Macros | Functions | Variables
dct.c File Reference
#include "config.h"
#include "config_components.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "libavutil/cpu.h"
#include "libavutil/common.h"
#include "libavutil/emms.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "libavutil/mem_internal.h"
#include "libavutil/time.h"
#include "libavcodec/dct.h"
#include "libavcodec/fdctdsp.h"
#include "libavcodec/idctdsp.h"
#include "libavcodec/simple_idct.h"
#include "libavcodec/xvididct.h"
#include "libavcodec/aandcttab.h"
#include "libavcodec/faandct.h"
#include "libavcodec/faanidct.h"
#include "libavcodec/dctref.h"
#include "compat/getopt.c"

Go to the source code of this file.

Data Structures

struct  algo
 

Macros

#define AANSCALE_BITS   12
 
#define NB_ITS   20000
 
#define NB_ITS_SPEED   50000
 

Functions

static void ff_prores_idct_wrap (int16_t *dst)
 
static void init_block (int16_t block[64], int test, int is_idct, AVLFG *prng, int vals)
 
static void permute (int16_t dst[64], const int16_t src[64], enum idct_permutation_type perm_type)
 
static int dct_error (const struct algo *dct, int test, int is_idct, int speed, const int bits)
 
static void idct248_ref (uint8_t *dest, ptrdiff_t linesize, int16_t *block)
 
static void idct248_error (const char *name, void(*idct248_put)(uint8_t *dest, ptrdiff_t line_size, int16_t *block), int speed)
 
static void help (void)
 
int main (int argc, char **argv)
 

Variables

static const struct algo fdct_tab []
 
static const struct algo idct_tab []
 
static const struct algo fdct_tab_arch [] = { { 0 } }
 
static const struct algo idct_tab_arch [] = { { 0 } }
 
static int16_t block [64]
 
static int16_t block1 [64]
 
static uint8_t img_dest [64]
 
static uint8_t img_dest1 [64]
 

Detailed Description

DCT test (c) 2001 Fabrice Bellard Started from sample code by Juan J. Sierralta P.

Definition in file dct.c.

Macro Definition Documentation

◆ AANSCALE_BITS

#define AANSCALE_BITS   12

Definition at line 114 of file dct.c.

◆ NB_ITS

#define NB_ITS   20000

Definition at line 116 of file dct.c.

◆ NB_ITS_SPEED

#define NB_ITS_SPEED   50000

Definition at line 117 of file dct.c.

Function Documentation

◆ ff_prores_idct_wrap()

static void ff_prores_idct_wrap ( int16_t *  dst)
static

Definition at line 73 of file dct.c.

◆ init_block()

static void init_block ( int16_t  block[64],
int  test,
int  is_idct,
AVLFG prng,
int  vals 
)
static

Definition at line 122 of file dct.c.

Referenced by dct_error().

◆ permute()

static void permute ( int16_t  dst[64],
const int16_t  src[64],
enum idct_permutation_type  perm_type 
)
static

Definition at line 152 of file dct.c.

Referenced by dct_error(), vp5_parse_coeff(), vp6_parse_coeff(), and vp6_parse_coeff_huffman().

◆ dct_error()

static int dct_error ( const struct algo dct,
int  test,
int  is_idct,
int  speed,
const int  bits 
)
static

Definition at line 182 of file dct.c.

Referenced by main().

◆ idct248_ref()

static void idct248_ref ( uint8_t *  dest,
ptrdiff_t  linesize,
int16_t *  block 
)
static

Definition at line 297 of file dct.c.

Referenced by idct248_error().

◆ idct248_error()

static void idct248_error ( const char *  name,
void(*)(uint8_t *dest, ptrdiff_t line_size, int16_t *block idct248_put,
int  speed 
)
static

Definition at line 377 of file dct.c.

Referenced by main().

◆ help()

static void help ( void  )
static

Definition at line 454 of file dct.c.

Referenced by ac_decode_bool(), and main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 470 of file dct.c.

Variable Documentation

◆ fdct_tab

const struct algo fdct_tab[]
static
Initial value:
= {
{ "REF-DBL", ff_ref_fdct, FF_IDCT_PERM_NONE },
{ "IJG-AAN-INT", ff_fdct_ifast, FF_IDCT_PERM_NONE },
}

Definition at line 64 of file dct.c.

Referenced by main().

◆ idct_tab

const struct algo idct_tab[]
static
Initial value:

Definition at line 86 of file dct.c.

Referenced by main().

◆ fdct_tab_arch

const struct algo fdct_tab_arch[] = { { 0 } }
static

Definition at line 110 of file dct.c.

Referenced by main().

◆ idct_tab_arch

const struct algo idct_tab_arch[] = { { 0 } }
static

Definition at line 111 of file dct.c.

Referenced by main().

◆ block

int16_t block[64]
static

Definition at line 119 of file dct.c.

Referenced by dct_error(), idct248_error(), idct248_ref(), and init_block().

◆ block1

int16_t block1[64]
static

◆ img_dest

uint8_t img_dest[64]
static

Definition at line 294 of file dct.c.

Referenced by idct248_error().

◆ img_dest1

uint8_t img_dest1[64]
static

Definition at line 295 of file dct.c.

Referenced by idct248_error().

ff_simple_idct_int16_10bit
void ff_simple_idct_int16_10bit(int16_t *block)
ff_prores_idct_wrap
static void ff_prores_idct_wrap(int16_t *dst)
Definition: dct.c:73
FF_IDCT_PERM_NONE
@ FF_IDCT_PERM_NONE
Definition: idctdsp.h:30
ff_simple_idct_int16_8bit
void ff_simple_idct_int16_8bit(int16_t *block)
ff_jpeg_fdct_islow_8
void ff_jpeg_fdct_islow_8(int16_t *data)
ff_j_rev_dct
void ff_j_rev_dct(int16_t *data)
ff_fdct_ifast
void ff_fdct_ifast(int16_t *data)
Definition: jfdctfst.c:207
ff_simple_idct_int16_12bit
void ff_simple_idct_int16_12bit(int16_t *block)
ff_ref_fdct
void ff_ref_fdct(short *block)
Transform 8x8 block of data with a double precision forward DCT This is a reference implementation.
Definition: dctref.c:59
ff_ref_idct
void ff_ref_idct(short *block)
Transform 8x8 block of data with a double precision inverse DCT This is a reference implementation.
Definition: dctref.c:95
FF_IDCT_PERM_LIBMPEG2
@ FF_IDCT_PERM_LIBMPEG2
Definition: idctdsp.h:31