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
19 #include <string.h>
20
25
28
30
32 {
33 const char *func_str =
from ?
"lumRangeFromJpeg" :
"lumRangeToJpeg";
34 #define LARGEST_INPUT_SIZE 512
35 #define INPUT_SIZES 6
36 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
38
41
43
47
52
57 dst0[
i] = (int16_t)
r << 7;
58 dst1[
i] = (int16_t)
r << 7;
59 }
64 if (memcmp(dst0, dst1,
width *
sizeof(int16_t)))
67 }
68 }
69
71 }
72 #undef LARGEST_INPUT_SIZE
73 #undef INPUT_SIZES
74
76 {
77 const char *func_str =
from ?
"chrRangeFromJpeg" :
"chrRangeToJpeg";
78 #define LARGEST_INPUT_SIZE 512
79 #define INPUT_SIZES 6
80 static const int input_sizes[] = {8, 24, 128, 144, 256, 512};
82
87
89
93
98
103 dstU0[
i] = (int16_t)
r << 7;
104 dstV0[
i] = (int16_t)
r << 7;
105 dstU1[
i] = (int16_t)
r << 7;
106 dstV1[
i] = (int16_t)
r << 7;
107 }
112 if (memcmp(dstU0, dstU1,
width *
sizeof(int16_t)) ||
113 memcmp(dstV0, dstV1,
width *
sizeof(int16_t)))
116 }
117 }
118
120 }
121 #undef LARGEST_INPUT_SIZE
122 #undef INPUT_SIZES
123
125 {
127 report(
"lumRangeFromJpeg");
129 report(
"chrRangeFromJpeg");
134 }