Commit 09effd1a authored by diego's avatar diego

Give better names to reference DCT functions.

patch by Dylan Yudaken, dyudaken gmail com


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18257 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a280f10c
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
void *fast_memcpy(void *a, const void *b, size_t c){return memcpy(a,b,c);}; void *fast_memcpy(void *a, const void *b, size_t c){return memcpy(a,b,c);};
/* reference fdct/idct */ /* reference fdct/idct */
void fdct(DCTELEM *block); void ff_ref_fdct(DCTELEM *block);
void idct(DCTELEM *block); void ff_ref_idct(DCTELEM *block);
void init_fdct(void); void ff_ref_dct_init(void);
void ff_mmx_idct(DCTELEM *data); void ff_mmx_idct(DCTELEM *data);
void ff_mmxext_idct(DCTELEM *data); void ff_mmxext_idct(DCTELEM *data);
...@@ -90,57 +90,57 @@ struct algo { ...@@ -90,57 +90,57 @@ struct algo {
static int cpu_flags; static int cpu_flags;
struct algo algos[] = { struct algo algos[] = {
{"REF-DBL", 0, fdct, fdct, NO_PERM}, {"REF-DBL", 0, ff_ref_fdct, ff_ref_fdct, NO_PERM},
{"FAAN", 0, ff_faandct, fdct, FAAN_SCALE}, {"FAAN", 0, ff_faandct, ff_ref_fdct, FAAN_SCALE},
{"FAANI", 1, ff_faanidct, idct, NO_PERM}, {"FAANI", 1, ff_faanidct, ff_ref_idct, NO_PERM},
{"IJG-AAN-INT", 0, fdct_ifast, fdct, SCALE_PERM}, {"IJG-AAN-INT", 0, fdct_ifast, ff_ref_fdct, SCALE_PERM},
{"IJG-LLM-INT", 0, ff_jpeg_fdct_islow, fdct, NO_PERM}, {"IJG-LLM-INT", 0, ff_jpeg_fdct_islow, ff_ref_fdct, NO_PERM},
{"REF-DBL", 1, idct, idct, NO_PERM}, {"REF-DBL", 1, ff_ref_idct, ff_ref_idct, NO_PERM},
{"INT", 1, j_rev_dct, idct, MMX_PERM}, {"INT", 1, j_rev_dct, ff_ref_idct, MMX_PERM},
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM}, {"SIMPLE-C", 1, ff_simple_idct, ff_ref_idct, NO_PERM},
#if HAVE_MMX #if HAVE_MMX
{"MMX", 0, ff_fdct_mmx, fdct, NO_PERM, FF_MM_MMX}, {"MMX", 0, ff_fdct_mmx, ff_ref_fdct, NO_PERM, FF_MM_MMX},
#if HAVE_MMX2 #if HAVE_MMX2
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, FF_MM_MMXEXT}, {"MMX2", 0, ff_fdct_mmx2, ff_ref_fdct, NO_PERM, FF_MM_MMXEXT},
{"SSE2", 0, ff_fdct_sse2, fdct, NO_PERM, FF_MM_SSE2}, {"SSE2", 0, ff_fdct_sse2, ff_ref_fdct, NO_PERM, FF_MM_SSE2},
#endif #endif
#if CONFIG_GPL #if CONFIG_GPL
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, FF_MM_MMX}, {"LIBMPEG2-MMX", 1, ff_mmx_idct, ff_ref_idct, MMX_PERM, FF_MM_MMX},
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, FF_MM_MMXEXT}, {"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, ff_ref_idct, MMX_PERM, FF_MM_MMXEXT},
#endif #endif
{"SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM, FF_MM_MMX}, {"SIMPLE-MMX", 1, ff_simple_idct_mmx, ff_ref_idct, MMX_SIMPLE_PERM, FF_MM_MMX},
{"XVID-MMX", 1, ff_idct_xvid_mmx, idct, NO_PERM, FF_MM_MMX}, {"XVID-MMX", 1, ff_idct_xvid_mmx, ff_ref_idct, NO_PERM, FF_MM_MMX},
{"XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, NO_PERM, FF_MM_MMXEXT}, {"XVID-MMX2", 1, ff_idct_xvid_mmx2, ff_ref_idct, NO_PERM, FF_MM_MMXEXT},
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, FF_MM_SSE2}, {"XVID-SSE2", 1, ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, FF_MM_SSE2},
#endif #endif
#if HAVE_ALTIVEC #if HAVE_ALTIVEC
{"altivecfdct", 0, fdct_altivec, fdct, NO_PERM, FF_MM_ALTIVEC}, {"altivecfdct", 0, fdct_altivec, ff_ref_fdct, NO_PERM, FF_MM_ALTIVEC},
#endif #endif
#if ARCH_BFIN #if ARCH_BFIN
{"BFINfdct", 0, ff_bfin_fdct, fdct, NO_PERM}, {"BFINfdct", 0, ff_bfin_fdct, ff_ref_fdct, NO_PERM},
{"BFINidct", 1, ff_bfin_idct, idct, NO_PERM}, {"BFINidct", 1, ff_bfin_idct, ff_ref_idct, NO_PERM},
#endif #endif
#if ARCH_ARM #if ARCH_ARM
{"SIMPLE-ARM", 1, simple_idct_ARM, idct, NO_PERM }, {"SIMPLE-ARM", 1, simple_idct_ARM, ff_ref_idct, NO_PERM },
{"INT-ARM", 1, j_rev_dct_ARM, idct, MMX_PERM }, {"INT-ARM", 1, j_rev_dct_ARM, ff_ref_idct, MMX_PERM },
#if HAVE_ARMV5TE #if HAVE_ARMV5TE
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, idct, NO_PERM }, {"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, ff_ref_idct, NO_PERM },
#endif #endif
#if HAVE_ARMV6 #if HAVE_ARMV6
{"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, idct, MMX_PERM }, {"SIMPLE-ARMV6", 1, ff_simple_idct_armv6, ff_ref_idct, MMX_PERM },
#endif #endif
#if HAVE_NEON #if HAVE_NEON
{"SIMPLE-NEON", 1, ff_simple_idct_neon, idct, PARTTRANS_PERM }, {"SIMPLE-NEON", 1, ff_simple_idct_neon, ff_ref_idct, PARTTRANS_PERM },
#endif #endif
#endif /* ARCH_ARM */ #endif /* ARCH_ARM */
#if ARCH_ALPHA #if ARCH_ALPHA
{"SIMPLE-ALPHA", 1, ff_simple_idct_axp, idct, NO_PERM }, {"SIMPLE-ALPHA", 1, ff_simple_idct_axp, ff_ref_idct, NO_PERM },
#endif #endif
{ 0 } { 0 }
...@@ -223,7 +223,7 @@ void dct_error(const char *name, int is_idct, ...@@ -223,7 +223,7 @@ void dct_error(const char *name, int is_idct,
for(i=0;i<64;i++) for(i=0;i<64;i++)
block1[i] = (av_lfg_get(&prn) % 512) -256; block1[i] = (av_lfg_get(&prn) % 512) -256;
if (is_idct){ if (is_idct){
fdct(block1); ff_ref_fdct(block1);
for(i=0;i<64;i++) for(i=0;i<64;i++)
block1[i]>>=3; block1[i]>>=3;
...@@ -337,7 +337,7 @@ void dct_error(const char *name, int is_idct, ...@@ -337,7 +337,7 @@ void dct_error(const char *name, int is_idct,
for(i=0;i<64;i++) for(i=0;i<64;i++)
block1[i] = av_lfg_get(&prn) % 512 -256; block1[i] = av_lfg_get(&prn) % 512 -256;
if (is_idct){ if (is_idct){
fdct(block1); ff_ref_fdct(block1);
for(i=0;i<64;i++) for(i=0;i<64;i++)
block1[i]>>=3; block1[i]>>=3;
...@@ -562,7 +562,7 @@ int main(int argc, char **argv) ...@@ -562,7 +562,7 @@ int main(int argc, char **argv)
int test=1; int test=1;
cpu_flags = mm_support(); cpu_flags = mm_support();
init_fdct(); ff_ref_dct_init();
idct_mmx_init(); idct_mmx_init();
for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i; for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
#endif #endif
/* global declarations */ /* global declarations */
void init_fdct (void); void ff_ref_dct_init (void);
void fdct (short *block); void ff_ref_fdct (short *block);
/* private data */ /* private data */
static double c[8][8]; /* transform coefficients */ static double c[8][8]; /* transform coefficients */
void init_fdct(void) void ff_ref_dct_init(void)
{ {
int i, j; int i, j;
double s; double s;
...@@ -60,7 +60,7 @@ void init_fdct(void) ...@@ -60,7 +60,7 @@ void init_fdct(void)
} }
} }
void fdct(block) void ff_ref_fdct(block)
short *block; short *block;
{ {
register int i, j; register int i, j;
...@@ -122,7 +122,7 @@ short *block; ...@@ -122,7 +122,7 @@ short *block;
/* perform IDCT matrix multiply for 8x8 coefficient block */ /* perform IDCT matrix multiply for 8x8 coefficient block */
void idct(block) void ff_ref_idct(block)
short *block; short *block;
{ {
int i, j, k, v; int i, j, k, v;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment