1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
22
26
27 #define randomize_buffers(type, buf, size, mask) \
28 do { \
29 int j; \
30 type *tmp_buf = (type *) buf; \
31 for (j = 0; j < size; j++) \
32 tmp_buf[j] = rnd() & mask; \
33 } while (0)
34
36 {
40 const uint8_t *
src2, ptrdiff_t stride2,
42
44 int mask = (1 << depth) - 1;
45 if (depth <= 8) {
48 } else if (depth <= 16) {
51 }
52
54 uint64_t sum1, sum2;
57 if (sum1 != sum2) {
58 fprintf(stderr, "scene_sad%d: sum mismatch: %llu != %llu\n",
59 depth, (unsigned long long) sum1, (unsigned long long) sum2);
61 }
63 }
64 }
65
67 {
68 const int depths[] = { 8, 10, 12, 14, 15, 16 };
71 report(
"scene_sad%d", depths[
i]);
72 }
73 }