[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec/armv4l dsputil_arm.c, 1.9, 1.10 dsputil_iwmmxt.c, 1.1, 1.2 mpegvideo_iwmmxt.c, 1.1, 1.2

Michael Niedermayer CVS michael
Wed Jun 29 00:46:39 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec/armv4l
In directory mail:/var2/tmp/cvs-serv29075/libavcodec/armv4l

Modified Files:
	dsputil_arm.c dsputil_iwmmxt.c mpegvideo_iwmmxt.c 
Log Message:
IWMMXT configure support + runtime selection patch by (Gildas Bazin, gbazin : altern org)


Index: dsputil_arm.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/armv4l/dsputil_arm.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- dsputil_arm.c	26 May 2005 14:40:20 -0000	1.9
+++ dsputil_arm.c	28 Jun 2005 22:46:36 -0000	1.10
@@ -240,9 +240,7 @@
     c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm; //OK
 /*     c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;//NG */
 
-#if 1
 #ifdef HAVE_IWMMXT
     dsputil_init_iwmmxt(c, avctx);
 #endif
-#endif
 }

Index: dsputil_iwmmxt.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/armv4l/dsputil_iwmmxt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dsputil_iwmmxt.c	26 May 2005 14:32:46 -0000	1.1
+++ dsputil_iwmmxt.c	28 Jun 2005 22:46:36 -0000	1.2
@@ -126,8 +126,26 @@
     return;
 }
 
+int mm_flags; /* multimedia extension flags */
+
+int mm_support(void)
+{
+    return 0; /* TODO, implement proper detection */
+}
+
 void dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx)
 {
+    mm_flags = mm_support();
+
+    if (avctx->dsp_mask) {
+	if (avctx->dsp_mask & FF_MM_FORCE)
+	    mm_flags |= (avctx->dsp_mask & 0xffff);
+	else
+	    mm_flags &= ~(avctx->dsp_mask & 0xffff);
+    }
+
+    if (!(mm_flags & MM_IWMMXT)) return;
+
     c->add_pixels_clamped = add_pixels_clamped_iwmmxt;
 
     c->put_pixels_tab[0][0] = put_pixels16_iwmmxt;

Index: mpegvideo_iwmmxt.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/armv4l/mpegvideo_iwmmxt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mpegvideo_iwmmxt.c	26 May 2005 14:32:46 -0000	1.1
+++ mpegvideo_iwmmxt.c	28 Jun 2005 22:46:36 -0000	1.2
@@ -90,6 +90,8 @@
 
 void MPV_common_init_iwmmxt(MpegEncContext *s)
 {
+    if (!(mm_flags & MM_IWMMXT)) return;
+
     s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_iwmmxt;
 #if 0
     s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_iwmmxt;





More information about the ffmpeg-cvslog mailing list