dct-test.c File Reference

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

#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "libavutil/cpu.h"
#include "libavutil/common.h"
#include "libavutil/lfg.h"
#include "libavutil/time.h"
#include "dct.h"
#include "simple_idct.h"
#include "aandcttab.h"
#include "faandct.h"
#include "faanidct.h"
#include "x86/idct_xvid.h"
#include "dctref.h"
#include "compat/getopt.c"
Include dependency graph for dct-test.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

void ff_bfin_idct (int16_t *block)
 
void ff_bfin_fdct (int16_t *block)
 
void ff_fdct_altivec (int16_t *block)
 
void ff_j_rev_dct_arm (int16_t *data)
 
void ff_simple_idct_arm (int16_t *data)
 
void ff_simple_idct_armv5te (int16_t *data)
 
void ff_simple_idct_armv6 (int16_t *data)
 
void ff_simple_idct_neon (int16_t *data)
 
void ff_simple_idct_axp (int16_t *data)
 
static void idct_mmx_init (void)
 
 DECLARE_ALIGNED (16, static int16_t, block)[64]
 
 DECLARE_ALIGNED (8, static int16_t, block1)[64]
 
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], int perm)
 
static int dct_error (const struct algo *dct, int test, int is_idct, int speed, const int bits)
 
 DECLARE_ALIGNED (8, static uint8_t, img_dest)[64]
 
 DECLARE_ALIGNED (8, static uint8_t, img_dest1)[64]
 
static void idct248_ref (uint8_t *dest, int linesize, int16_t *block)
 
static void idct248_error (const char *name, void(*idct248_put)(uint8_t *dest, int line_size, int16_t *block), int speed)
 
static void help (void)
 
int main (int argc, char **argv)
 

Variables

static int cpu_flags
 
static const struct algo fdct_tab []
 
static const struct algo idct_tab []
 
static short idct_mmx_perm [64]
 
static short idct_simple_mmx_perm [64]
 
static const uint8_t idct_sse2_row_perm [8] = { 0, 4, 1, 5, 2, 6, 3, 7 }
 

Detailed Description

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

Sierralta P.

Definition in file dct-test.c.

Macro Definition Documentation

#define AANSCALE_BITS   12

Definition at line 160 of file dct-test.c.

Referenced by dct_error().

#define NB_ITS   20000

Definition at line 162 of file dct-test.c.

Referenced by dct_error(), and idct248_error().

#define NB_ITS_SPEED   50000

Definition at line 163 of file dct-test.c.

Referenced by dct_error(), and idct248_error().

Function Documentation

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

Definition at line 248 of file dct-test.c.

Referenced by main().

DECLARE_ALIGNED ( 16  ,
static  int16_t,
block   
)

Referenced by dct_error(), and idct_mmx_init().

DECLARE_ALIGNED ( ,
static  int16_t,
block1   
)
DECLARE_ALIGNED ( ,
static  uint8_t,
img_dest   
)
DECLARE_ALIGNED ( ,
static  uint8_t,
img_dest1   
)
void ff_bfin_fdct ( int16_t *  block)
void ff_bfin_idct ( int16_t *  block)
void ff_fdct_altivec ( int16_t *  block)

Definition at line 197 of file fdct_altivec.c.

Referenced by ff_dsputil_init_ppc().

void ff_j_rev_dct_arm ( int16_t *  data)
void ff_simple_idct_arm ( int16_t *  data)
void ff_simple_idct_armv5te ( int16_t *  data)
void ff_simple_idct_armv6 ( int16_t *  data)
void ff_simple_idct_axp ( int16_t *  data)

Definition at line 253 of file simple_idct_alpha.c.

Referenced by ff_simple_idct_add_axp(), and ff_simple_idct_put_axp().

void ff_simple_idct_neon ( int16_t *  data)
static void help ( void  )
static

Definition at line 508 of file dct-test.c.

Referenced by main().

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

Definition at line 432 of file dct-test.c.

Referenced by main().

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

Definition at line 352 of file dct-test.c.

Referenced by idct248_error().

static void idct_mmx_init ( void  )
static

Definition at line 180 of file dct-test.c.

Referenced by main().

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

Definition at line 193 of file dct-test.c.

Referenced by dct_error().

int main ( int  argc,
char **  argv 
)

Definition at line 524 of file dct-test.c.

static void permute ( int16_t  dst[64],
const int16_t  src[64],
int  perm 
)
static

Definition at line 223 of file dct-test.c.

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

Variable Documentation

const struct algo fdct_tab[]
static
Initial value:
= {
{ "REF-DBL", ff_ref_fdct, NO_PERM },
{ "FAAN", ff_faandct, NO_PERM },
{ "IJG-AAN-INT", ff_fdct_ifast, SCALE_PERM },
{ "IJG-LLM-INT", ff_jpeg_fdct_islow_8, NO_PERM },
{ 0 }
}
void ff_fdct_ifast(int16_t *data)
Definition: jfdctfst.c:208
void ff_jpeg_fdct_islow_8(int16_t *data)
void ff_faandct(int16_t *data)
Definition: faandct.c:121
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

Definition at line 79 of file dct-test.c.

Referenced by main().

short idct_mmx_perm[64]
static

Definition at line 165 of file dct-test.c.

Referenced by idct_mmx_init(), and permute().

short idct_simple_mmx_perm[64]
static
Initial value:
= {
0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D,
0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D,
0x20, 0x28, 0x24, 0x29, 0x21, 0x2C, 0x25, 0x2D,
0x12, 0x1A, 0x16, 0x1B, 0x13, 0x1E, 0x17, 0x1F,
0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F,
0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D,
0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F,
0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
}

Definition at line 167 of file dct-test.c.

Referenced by permute().

const uint8_t idct_sse2_row_perm[8] = { 0, 4, 1, 5, 2, 6, 3, 7 }
static

Definition at line 178 of file dct-test.c.

Referenced by permute().

const struct algo idct_tab[]
static

Definition at line 119 of file dct-test.c.