1 /*
2 * Copyright (c) 2017 James Almer
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #include <string.h>
22
28
30 #define PADDED_BUF_SIZE BUF_SIZE+AV_INPUT_BUFFER_PADDING_SIZE*2
31
32 #define randomize_buffers() \
33 do { \
34 int i; \
35 for (i = 0; i < BUF_SIZE; i += 4) { \
36 uint32_t r = rnd(); \
37 AV_WN32A(src + i, r); \
38 } \
39 } while (0)
40
45
47
54 if (memcmp(dst_ref, dst_new,
BUF_SIZE))
57 }
58
63
65
72 if (memcmp(dst_ref, dst_new,
BUF_SIZE))
75 }
76
78 {
80
82
85
87
90
92 }