/* * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * FFmpeg 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 General Public License for more details. * * You should have received a copy of the GNU General Public License along * with FFmpeg; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "checkasm.h" #include "libavfilter/bwdifdsp.h" #include "libavutil/mem_internal.h" #define WIDTH 256 #define randomize_buffers(buf0, buf1, mask, count) \ for (size_t i = 0; i < count; i++) \ buf0[i] = buf1[i] = rnd() & mask #define randomize_overflow_check(buf0, buf1, mask, count) \ for (size_t i = 0; i < count; i++) \ buf0[i] = buf1[i] = (rnd() & 1) != 0 ? mask : 0; #define BODY(type, depth) \ do { \ type prev0[9*WIDTH], prev1[9*WIDTH]; \ type next0[9*WIDTH], next1[9*WIDTH]; \ type cur0[9*WIDTH], cur1[9*WIDTH]; \ type dst0[WIDTH], dst1[WIDTH]; \ const int stride = WIDTH; \ const int mask = (1<