Commit 0de74546 authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Diego Biurrun
Browse files

Give better names to reference DCT functions.

patch by Dylan Yudaken, dyudaken gmail com

Originally committed as revision 18257 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a3d636af
......@@ -46,9 +46,9 @@
void *fast_memcpy(void *a, const void *b, size_t c){return memcpy(a,b,c);};
/* reference fdct/idct */
void fdct(DCTELEM *block);
void idct(DCTELEM *block);
void init_fdct(void);
void ff_ref_fdct(DCTELEM *block);
void ff_ref_idct(DCTELEM *block);
void ff_ref_dct_init(void);
void ff_mmx_idct(DCTELEM *data);
void ff_mmxext_idct(DCTELEM *data);
......@@ -90,57 +90,57 @@ struct algo {
static int cpu_flags;
struct algo algos[] = {
{"REF-DBL", 0, fdct, fdct, NO_PERM},
{"FAAN", 0, ff_faandct, fdct, FAAN_SCALE},
{"FAANI", 1, ff_faanidct, idct, NO_PERM},
{"IJG-AAN-INT", 0, fdct_ifast, fdct, SCALE_PERM},
{"IJG-LLM-INT", 0, ff_jpeg_fdct_islow, fdct, NO_PERM},
{"REF-DBL", 1, idct, idct, NO_PERM},
{"INT", 1, j_rev_dct, idct, MMX_PERM},
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM},
{"REF-DBL", 0, ff_ref_fdct, ff_ref_fdct, NO_PERM},
{"FAAN", 0, ff_faandct, ff_ref_fdct, FAAN_SCALE},
{"FAANI", 1, ff_faanidct, ff_ref_idct, NO_PERM},
{"IJG-AAN-INT", 0, fdct_ifast, ff_ref_fdct, SCALE_PERM},
{"IJG-LLM-INT", 0, ff_jpeg_fdct_islow, ff_ref_fdct, NO_PERM},
{"REF-DBL", 1, ff_ref_idct, ff_ref_idct, NO_PERM},
{"INT", 1, j_rev_dct, ff_ref_idct, MMX_PERM},
{"SIMPLE-C", 1, ff_simple_idct, ff_ref_idct, NO_PERM},
#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
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, FF_MM_MMXEXT},
{"SSE2", 0, ff_fdct_sse2, fdct, NO_PERM, FF_MM_SSE2},
{"MMX2", 0, ff_fdct_mmx2, ff_ref_fdct, NO_PERM, FF_MM_MMXEXT},
{"SSE2", 0, ff_fdct_sse2, ff_ref_fdct, NO_PERM, FF_MM_SSE2},
#endif
#if CONFIG_GPL
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, FF_MM_MMX},
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, FF_MM_MMXEXT},
{"LIBMPEG2-MMX", 1, ff_mmx_idct, ff_ref_idct, MMX_PERM, FF_MM_MMX},
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, ff_ref_idct, MMX_PERM, FF_MM_MMXEXT},
#endif
{"SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM, FF_MM_MMX},
{"XVID-MMX", 1, ff_idct_xvid_mmx, idct, NO_PERM, FF_MM_MMX},
{"XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, NO_PERM, FF_MM_MMXEXT},
{"XVID-SSE2", 1, ff_idct_xvid_sse2, idct, SSE2_PERM, FF_MM_SSE2},
{"SIMPLE-MMX", 1, ff_simple_idct_mmx, ff_ref_idct, MMX_SIMPLE_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, ff_ref_idct, NO_PERM, FF_MM_MMXEXT},
{"XVID-SSE2", 1, ff_idct_xvid_sse2, ff_ref_idct, SSE2_PERM, FF_MM_SSE2},
#endif
#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
#if ARCH_BFIN
{"BFINfdct", 0, ff_bfin_fdct, fdct, NO_PERM},
{"BFINidct", 1, ff_bfin_idct, idct, NO_PERM},
{"BFINfdct", 0, ff_bfin_fdct, ff_ref_fdct, NO_PERM},
{"BFINidct", 1, ff_bfin_idct, ff_ref_idct, NO_PERM},
#endif
#if ARCH_ARM
{"SIMPLE-ARM", 1, simple_idct_ARM, idct, NO_PERM },
{"INT-ARM", 1, j_rev_dct_ARM, idct, MMX_PERM },
{"SIMPLE-ARM", 1, simple_idct_ARM, ff_ref_idct, NO_PERM },
{"INT-ARM", 1, j_rev_dct_ARM, ff_ref_idct, MMX_PERM },
#if HAVE_ARMV5TE
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, idct, NO_PERM },
{"SIMPLE-ARMV5TE", 1, simple_idct_armv5te, ff_ref_idct, NO_PERM },
#endif
#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
#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 /* ARCH_ARM */
#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
{ 0 }
......@@ -223,7 +223,7 @@ void dct_error(const char *name, int is_idct,
for(i=0;i<64;i++)
block1[i] = (av_lfg_get(&prn) % 512) -256;
if (is_idct){
fdct(block1);
ff_ref_fdct(block1);
for(i=0;i<64;i++)
block1[i]>>=3;
......@@ -337,7 +337,7 @@ void dct_error(const char *name, int is_idct,
for(i=0;i<64;i++)
block1[i] = av_lfg_get(&prn) % 512 -256;
if (is_idct){
fdct(block1);
ff_ref_fdct(block1);
for(i=0;i<64;i++)
block1[i]>>=3;
......@@ -562,7 +562,7 @@ int main(int argc, char **argv)
int test=1;
cpu_flags = mm_support();
init_fdct();
ff_ref_dct_init();
idct_mmx_init();
for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
......
......@@ -40,13 +40,13 @@
#endif
/* global declarations */
void init_fdct (void);
void fdct (short *block);
void ff_ref_dct_init (void);
void ff_ref_fdct (short *block);
/* private data */
static double c[8][8]; /* transform coefficients */
void init_fdct(void)
void ff_ref_dct_init(void)
{
int i, j;
double s;
......@@ -60,7 +60,7 @@ void init_fdct(void)
}
}
void fdct(block)
void ff_ref_fdct(block)
short *block;
{
register int i, j;
......@@ -122,7 +122,7 @@ short *block;
/* perform IDCT matrix multiply for 8x8 coefficient block */
void idct(block)
void ff_ref_idct(block)
short *block;
{
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