libavcodec/dct-test.c File Reference

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

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <math.h>
#include "libavutil/common.h"
#include "simple_idct.h"
#include "aandcttab.h"
#include "faandct.h"
#include "faanidct.h"
#include "x86/idct_xvid.h"

Go to the source code of this file.

Data Structures

struct  algo

Defines

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

Functions

void * fast_memcpy (void *a, const void *b, size_t c)
void ff_ref_fdct (DCTELEM *block)
 Transform 8x8 block of data with a double precision forward DCT
This is a reference implementation.
void ff_ref_idct (DCTELEM *block)
 Transform 8x8 block of data with a double precision inverse DCT
This is a reference implementation.
void ff_ref_dct_init (void)
 Initialize the double precision discrete cosine transform functions fdct & idct.
void ff_mmx_idct (DCTELEM *data)
void ff_mmxext_idct (DCTELEM *data)
void odivx_idct_c (short *block)
void ff_bfin_idct (DCTELEM *block)
void ff_bfin_fdct (DCTELEM *block)
void fdct_altivec (DCTELEM *block)
void j_rev_dct_ARM (DCTELEM *data)
void simple_idct_ARM (DCTELEM *data)
void simple_idct_armv5te (DCTELEM *data)
void ff_simple_idct_armv6 (DCTELEM *data)
void ff_simple_idct_neon (DCTELEM *data)
void ff_simple_idct_axp (DCTELEM *data)
int64_t gettime (void)
void idct_mmx_init (void)
static void mmx_emms (void)
void dct_error (const char *name, int is_idct, void(*fdct_func)(DCTELEM *block), void(*fdct_ref)(DCTELEM *block), int form, int test)
void idct248_ref (uint8_t *dest, int linesize, int16_t *block)
void idct248_error (const char *name, void(*idct248_put)(uint8_t *dest, int line_size, int16_t *block))
void help (void)
int main (int argc, char **argv)

Variables

static int cpu_flags
struct algo algos []
uint8_t cropTbl [256+2 *MAX_NEG_CROP]
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}
static DCTELEM block [64]
static DCTELEM block1 [64]
static DCTELEM block_org [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-test.c.


Define Documentation

#define AANSCALE_BITS   12

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

Referenced by dct_error().

#define FAAN_SCALE   NO_PERM

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

#define NB_ITS   20000

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

Referenced by dct_error(), idct248_error(), and test_motion().

#define NB_ITS_SPEED   50000

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

Referenced by dct_error(), and idct248_error().


Function Documentation

void dct_error ( const char *  name,
int  is_idct,
void(*)(DCTELEM *block fdct_func,
void(*)(DCTELEM *block fdct_ref,
int  form,
int  test 
)

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

Referenced by main().

void* fast_memcpy ( void *  a,
const void *  b,
size_t  c 
)

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

void fdct_altivec ( DCTELEM block  ) 

Referenced by dsputil_init_ppc().

void ff_bfin_fdct ( DCTELEM block  ) 

void ff_bfin_idct ( DCTELEM block  ) 

void ff_mmx_idct ( DCTELEM data  ) 

Referenced by dsputil_init_mmx().

void ff_mmxext_idct ( DCTELEM data  ) 

Referenced by dsputil_init_mmx().

void ff_ref_dct_init ( void   ) 

Initialize the double precision discrete cosine transform functions fdct & idct.

Definition at line 39 of file dctref.c.

Referenced by main().

void ff_ref_fdct ( short *  block  ) 

Transform 8x8 block of data with a double precision forward DCT
This is a reference implementation.

Parameters:
block pointer to 8x8 block of data to transform

Definition at line 57 of file dctref.c.

Referenced by dct_error().

void ff_ref_idct ( short *  block  ) 

Transform 8x8 block of data with a double precision inverse DCT
This is a reference implementation.

Parameters:
block pointer to 8x8 block of data to transform

Definition at line 93 of file dctref.c.

void ff_simple_idct_armv6 ( DCTELEM data  ) 

void ff_simple_idct_axp ( DCTELEM data  ) 

Definition at line 258 of file simple_idct_alpha.c.

void ff_simple_idct_neon ( DCTELEM data  ) 

int64_t gettime ( void   ) 

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

Referenced by dct_error(), idct248_error(), main(), and test_motion().

void help ( void   ) 

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

Referenced by main().

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

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

Referenced by main().

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

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

Referenced by idct248_error().

void idct_mmx_init ( void   ) 

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

Referenced by main().

void j_rev_dct_ARM ( DCTELEM data  ) 

int main ( int  argc,
char **  argv 
)

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

static void mmx_emms ( void   )  [inline, static]

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

Referenced by dct_error(), and idct248_error().

void odivx_idct_c ( short *  block  ) 

void simple_idct_ARM ( DCTELEM data  ) 

void simple_idct_armv5te ( DCTELEM data  ) 


Variable Documentation

struct algo algos[]

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

DCTELEM block[64] [static]

DCTELEM block1[64] [static]

DCTELEM block_org[64] [static]

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

Referenced by dct_error().

int cpu_flags [static]

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

Referenced by main(), and mmx_emms().

uint8_t cropTbl[256+2 *MAX_NEG_CROP]

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

Referenced by main().

short idct_mmx_perm[64] [static]

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

Referenced by dct_error(), and idct_mmx_init().

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 165 of file dct-test.c.

Referenced by dct_error().

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

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

Referenced by dct_error().

uint8_t img_dest[64] [static]

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

Referenced by idct248_error().

uint8_t img_dest1[64] [static]

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

Referenced by idct248_error().


Generated on Fri Oct 26 02:35:43 2012 for FFmpeg by  doxygen 1.5.8