X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmotion-test.c;h=87086360301dabb1b5a169b3056ab5796d025bdb;hb=467879eb54526d187847bbbd32723500ab0ab330;hp=38f59946a8ed1e3c2cc7ccfe2c9b9f94513bf985;hpb=bad5537e2c2caeb5deb1ff9d771ea01058b8010c;p=ffmpeg diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c index 38f59946a8e..87086360301 100644 --- a/libavcodec/motion-test.c +++ b/libavcodec/motion-test.c @@ -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,38 +29,40 @@ #include #include +#include "config.h" #include "dsputil.h" +#include "libavutil/lfg.h" -#undef exit #undef printf -#undef random #define WIDTH 64 #define HEIGHT 64 -uint8_t img1[WIDTH * HEIGHT]; -uint8_t img2[WIDTH * HEIGHT]; +static uint8_t img1[WIDTH * HEIGHT]; +static uint8_t img2[WIDTH * HEIGHT]; -void fill_random(uint8_t *tab, int size) +static void fill_random(uint8_t *tab, int size) { int i; + AVLFG prng; + + av_lfg_init(&prng, 1); for(i=0;idsp_mask = FF_MM_FORCE; + ctx = avcodec_alloc_context3(NULL); + ctx->dsp_mask = AV_CPU_FLAG_FORCE; dsputil_init(&cctx, ctx); - for (c = 0; c < 2; 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++) {