]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/motion-test.c
mpegaudio: clean up #includes
[ffmpeg] / libavcodec / motion-test.c
index fb21ee974bf210e3dde83bb994d1d04cdb993d18..b88917c988943048bd86ba400247c80173330f97 100644 (file)
@@ -1,25 +1,25 @@
 /*
  * (c) 2001 Fabrice Bellard
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /**
- * @file libavcodec/motion-test.c
+ * @file
  * motion test.
  */
 
@@ -29,6 +29,7 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+#include "config.h"
 #include "dsputil.h"
 #include "libavutil/lfg.h"
 
@@ -44,12 +45,12 @@ uint8_t img2[WIDTH * HEIGHT];
 static void fill_random(uint8_t *tab, int size)
 {
     int i;
-    AVLFG prn;
+    AVLFG prng;
 
-    av_lfg_init(&prn, 1);
+    av_lfg_init(&prng, 1);
     for(i=0;i<size;i++) {
 #if 1
-        tab[i] = av_lfg_get(&prn) % 256;
+        tab[i] = av_lfg_get(&prng) % 256;
 #else
         tab[i] = i;
 #endif
@@ -127,7 +128,8 @@ int main(int argc, char **argv)
     AVCodecContext *ctx;
     int c;
     DSPContext cctx, mmxctx;
-    int flags[2] = { FF_MM_MMX, FF_MM_MMXEXT };
+    int flags[2] = { AV_CPU_FLAG_MMX, AV_CPU_FLAG_MMX2 };
+    int flags_size = HAVE_MMX2 ? 2 : 1;
 
     for(;;) {
         c = getopt(argc, argv, "h");
@@ -143,11 +145,11 @@ int main(int argc, char **argv)
     printf("ffmpeg motion test\n");
 
     ctx = avcodec_alloc_context();
-    ctx->dsp_mask = FF_MM_FORCE;
+    ctx->dsp_mask = AV_CPU_FLAG_FORCE;
     dsputil_init(&cctx, ctx);
-    for (c = 0; c < 1; c++) {
+    for (c = 0; c < flags_size; c++) {
         int x;
-        ctx->dsp_mask = FF_MM_FORCE | flags[c];
+        ctx->dsp_mask = AV_CPU_FLAG_FORCE | flags[c];
         dsputil_init(&mmxctx, ctx);
 
         for (x = 0; x < 2; x++) {