]> git.sesse.net Git - ffmpeg/commitdiff
Define mm_flags/support to be 0 on architectures where they don't exist.
authorAlexander Strange <astrange@ithinksw.com>
Tue, 24 Jun 2008 23:51:17 +0000 (23:51 +0000)
committerAlexander Strange <astrange@ithinksw.com>
Tue, 24 Jun 2008 23:51:17 +0000 (23:51 +0000)
Make sure we don't try to set them if that's the case.
This lets dct-test and fft-test build with --disable-mmx on x86, but not yet on ARM.

Originally committed as revision 13957 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/dct-test.c
libavcodec/dsputil.h
libavcodec/fft-test.c

index 5699d898136f449b06ce9a1c536f6efa0d972b70..e96c895c21a08eaf231ec12dfdfa52bd1822f977 100644 (file)
@@ -531,7 +531,10 @@ int main(int argc, char **argv)
 
     init_fdct();
     idct_mmx_init();
+
+#ifndef mm_flags
     mm_flags = mm_support();
+#endif
 
     for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
     for(i=0;i<MAX_NEG_CROP;i++) {
index 0316a451b3e2cb00148b429d9b749ad263533de2..3b7b8791b86d4f8797a34882ac713ae6de6efa74 100644 (file)
@@ -578,6 +578,11 @@ extern int mm_flags;
 #define DECLARE_ALIGNED_8(t, v) DECLARE_ALIGNED(16, t, v)
 #define STRIDE_ALIGN 16
 
+#else
+
+#define mm_flags 0
+#define mm_support() 0
+
 #endif
 
 #ifndef DECLARE_ALIGNED_8
index 88aab487aef21e232ea36f26dcb9014dff5c0e41..55225fb1f2d02d9307e317517ef919013db4b00f 100644 (file)
@@ -186,7 +186,10 @@ int main(int argc, char **argv)
     MDCTContext m1, *m = &m1;
     int fft_nbits, fft_size;
 
+#ifndef mm_flags
     mm_flags = 0;
+#endif
+
     fft_nbits = 9;
     for(;;) {
         c = getopt(argc, argv, "hsimn:");