[FFmpeg-cvslog] r18492 - in branches/0.5: . LICENSE doc/TODO libavcodec/Makefile libavcodec/dct-test.c libavcodec/dctref.c libavcodec/fdctref.c
diego
subversion
Mon Apr 13 12:23:10 CEST 2009
Author: diego
Date: Mon Apr 13 12:23:10 2009
New Revision: 18492
Log:
Merge replacement of MPEG group reference DCT code.
Added:
branches/0.5/libavcodec/dctref.c
- copied unchanged from r18273, trunk/libavcodec/dctref.c
Deleted:
branches/0.5/libavcodec/fdctref.c
Modified:
branches/0.5/ (props changed)
branches/0.5/LICENSE
branches/0.5/doc/TODO
branches/0.5/libavcodec/Makefile
branches/0.5/libavcodec/dct-test.c
Modified: branches/0.5/LICENSE
==============================================================================
--- branches/0.5/LICENSE Mon Apr 13 12:15:48 2009 (r18491)
+++ branches/0.5/LICENSE Mon Apr 13 12:23:10 2009 (r18492)
@@ -31,7 +31,3 @@ There are a handful of files under other
* The files libavcodec/jfdctfst.c, libavcodec/jfdctint.c, libavcodec/jrevdct.c
are taken from libjpeg, see the top of the files for licensing details.
-
-* The file libavcodec/fdctref.c is copyrighted by the MPEG Software Simulation
- Group with all rights reserved. It is only used to create a DCT test program
- and not compiled into libavcodec.
Modified: branches/0.5/doc/TODO
==============================================================================
--- branches/0.5/doc/TODO Mon Apr 13 12:15:48 2009 (r18491)
+++ branches/0.5/doc/TODO Mon Apr 13 12:23:10 2009 (r18492)
@@ -81,7 +81,6 @@ unassigned TODO: (unordered)
- add support for using mplayers video filters to ffmpeg
- H264 encoder
- per MB ratecontrol (so VCD and such do work better)
-- replace/rewrite libavcodec/fdctref.c
- write a script which iteratively changes all functions between always_inline and noinline and benchmarks the result to find the best set of inlined functions
- convert all the non SIMD asm into small asm vs. C testcases and submit them to the gcc devels so they can improve gcc
- generic audio mixing API
Modified: branches/0.5/libavcodec/Makefile
==============================================================================
--- branches/0.5/libavcodec/Makefile Mon Apr 13 12:15:48 2009 (r18491)
+++ branches/0.5/libavcodec/Makefile Mon Apr 13 12:23:10 2009 (r18492)
@@ -533,5 +533,4 @@ DIRS = alpha arm bfin mlib ppc ps2 sh4 s
include $(SUBDIR)../subdir.mak
-$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)fdctref.o $(SUBDIR)aandcttab.o
-$(SUBDIR)fft-test$(EXESUF): $(SUBDIR)fdctref.o
+$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o $(SUBDIR)aandcttab.o
Modified: branches/0.5/libavcodec/dct-test.c
==============================================================================
--- branches/0.5/libavcodec/dct-test.c Mon Apr 13 12:15:48 2009 (r18491)
+++ branches/0.5/libavcodec/dct-test.c Mon Apr 13 12:23:10 2009 (r18492)
@@ -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 }
@@ -222,7 +222,7 @@ void dct_error(const char *name, int is_
for(i=0;i<64;i++)
block1[i] = (random() % 512) -256;
if (is_idct){
- fdct(block1);
+ ff_ref_fdct(block1);
for(i=0;i<64;i++)
block1[i]>>=3;
@@ -336,7 +336,7 @@ void dct_error(const char *name, int is_
for(i=0;i<64;i++)
block1[i] = (random() % 512) -256;
if (is_idct){
- fdct(block1);
+ ff_ref_fdct(block1);
for(i=0;i<64;i++)
block1[i]>>=3;
@@ -559,7 +559,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;
More information about the ffmpeg-cvslog
mailing list