changeset 5007:f7edc4fe94db libavcodec

Make vp3dsp*.c compilation optional.
author takis
date Mon, 14 May 2007 14:28:13 +0000
parents 28ebdd244a07
children 71da0c30248b
files Makefile dsputil.c i386/dsputil_mmx.c
diffstat 3 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon May 14 14:07:50 2007 +0000
+++ b/Makefile	Mon May 14 14:28:13 2007 +0000
@@ -31,7 +31,6 @@
       cabac.o\
       faandct.o \
       parser.o \
-      vp3dsp.o \
       h264idct.o \
       rangecoder.o \
       h263.o \
@@ -162,7 +161,7 @@
 OBJS-$(CONFIG_SVQ3_DECODER)            += h264.o
 OBJS-$(CONFIG_TARGA_DECODER)           += targa.o
 OBJS-$(CONFIG_TARGA_ENCODER)           += targaenc.o rle.o
-OBJS-$(CONFIG_THEORA_DECODER)          += vp3.o xiph.o
+OBJS-$(CONFIG_THEORA_DECODER)          += vp3.o xiph.o vp3dsp.o
 OBJS-$(CONFIG_THP_DECODER)             += mjpeg.o jpeglsdec.o jpegls.o
 OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
 OBJS-$(CONFIG_TIFF_DECODER)            += tiff.o lzw.o
@@ -182,9 +181,9 @@
 OBJS-$(CONFIG_VMNC_DECODER)            += vmnc.o
 OBJS-$(CONFIG_VORBIS_DECODER)          += vorbis_dec.o vorbis.o vorbis_data.o xiph.o
 OBJS-$(CONFIG_VORBIS_ENCODER)          += vorbis_enc.o vorbis.o vorbis_data.o
-OBJS-$(CONFIG_VP3_DECODER)             += vp3.o
-OBJS-$(CONFIG_VP5_DECODER)             += vp5.o vp56.o vp56data.o
-OBJS-$(CONFIG_VP6_DECODER)             += vp6.o vp56.o vp56data.o
+OBJS-$(CONFIG_VP3_DECODER)             += vp3.o vp3dsp.o
+OBJS-$(CONFIG_VP5_DECODER)             += vp5.o vp56.o vp56data.o vp3dsp.o
+OBJS-$(CONFIG_VP6_DECODER)             += vp6.o vp56.o vp56data.o vp3dsp.o
 OBJS-$(CONFIG_VQA_DECODER)             += vqavideo.o
 OBJS-$(CONFIG_WAVPACK_DECODER)         += wavpack.o
 OBJS-$(CONFIG_WMAV1_DECODER)           += wmadec.o wma.o
@@ -337,14 +336,15 @@
         i386/simple_idct_mmx.o \
         i386/idct_mmx_xvid.o \
         i386/fft_sse.o \
-        i386/vp3dsp_mmx.o \
-        i386/vp3dsp_sse2.o \
         i386/fft_3dn.o \
         i386/fft_3dn2.o \
 
 OBJS-$(CONFIG_GPL)                     += i386/idct_mmx.o
 OBJS-$(CONFIG_CAVS_DECODER)            += i386/cavsdsp_mmx.o
 OBJS-$(CONFIG_SNOW_DECODER)            += i386/snowdsp_mmx.o
+OBJS-$(CONFIG_VP3_DECODER)             += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
+OBJS-$(CONFIG_VP5_DECODER)             += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
+OBJS-$(CONFIG_VP6_DECODER)             += i386/vp3dsp_mmx.o i386/vp3dsp_sse2.o
 endif
 
 ASM_OBJS-$(TARGET_ARCH_ARMV4L)         += armv4l/jrevdct_arm.o     \
--- a/dsputil.c	Mon May 14 14:07:50 2007 +0000
+++ b/dsputil.c	Mon May 14 14:28:13 2007 +0000
@@ -3883,7 +3883,8 @@
             c->idct_add= ff_jref_idct_add;
             c->idct    = j_rev_dct;
             c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
-        }else if(avctx->idct_algo==FF_IDCT_VP3){
+        }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER ) &&
+                avctx->idct_algo==FF_IDCT_VP3){
             c->idct_put= ff_vp3_idct_put_c;
             c->idct_add= ff_vp3_idct_add_c;
             c->idct    = ff_vp3_idct_c;
--- a/i386/dsputil_mmx.c	Mon May 14 14:07:50 2007 +0000
+++ b/i386/dsputil_mmx.c	Mon May 14 14:28:13 2007 +0000
@@ -3279,7 +3279,8 @@
                 }
                 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
 #endif
-            }else if(idct_algo==FF_IDCT_VP3 &&
+            }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER) &&
+                     idct_algo==FF_IDCT_VP3 &&
                      avctx->codec->id!=CODEC_ID_THEORA &&
                      !(avctx->flags & CODEC_FLAG_BITEXACT)){
                 if(mm_flags & MM_SSE2){