Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | * pixel format descriptor | ||
3 | * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at> | ||
4 | * | ||
5 | * This file is part of FFmpeg. | ||
6 | * | ||
7 | * FFmpeg is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU Lesser General Public | ||
9 | * License as published by the Free Software Foundation; either | ||
10 | * version 2.1 of the License, or (at your option) any later version. | ||
11 | * | ||
12 | * FFmpeg is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * Lesser General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with FFmpeg; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | */ | ||
21 | |||
22 | #include <stdio.h> | ||
23 | #include <string.h> | ||
24 | |||
25 | #include "avstring.h" | ||
26 | #include "common.h" | ||
27 | #include "pixfmt.h" | ||
28 | #include "pixdesc.h" | ||
29 | #include "intreadwrite.h" | ||
30 | |||
31 | 1056946 | void av_read_image_line2(void *dst, | |
32 | const uint8_t *data[4], const int linesize[4], | ||
33 | const AVPixFmtDescriptor *desc, | ||
34 | int x, int y, int c, int w, | ||
35 | int read_pal_component, | ||
36 | int dst_element_size) | ||
37 | { | ||
38 | 1056946 | AVComponentDescriptor comp = desc->comp[c]; | |
39 | 1056946 | int plane = comp.plane; | |
40 | 1056946 | int depth = comp.depth; | |
41 | 1056946 | unsigned mask = (1ULL << depth) - 1; | |
42 | 1056946 | int shift = comp.shift; | |
43 | 1056946 | int step = comp.step; | |
44 | 1056946 | int flags = desc->flags; | |
45 | 1056946 | uint16_t *dst16 = dst; | |
46 | 1056946 | uint32_t *dst32 = dst; | |
47 | |||
48 |
2/2✓ Branch 0 taken 234720 times.
✓ Branch 1 taken 822226 times.
|
1056946 | if (!depth) |
49 | 234720 | return; | |
50 | |||
51 |
2/2✓ Branch 0 taken 2896 times.
✓ Branch 1 taken 819330 times.
|
822226 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { |
52 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 2888 times.
|
2896 | if (step > 8) { |
53 | // Assume all channels are packed into a 32bit value | ||
54 | 8 | const uint8_t *byte_p = data[plane] + y * linesize[plane]; | |
55 | 8 | const uint32_t *p = (uint32_t *)byte_p; | |
56 | |||
57 |
2/2✓ Branch 0 taken 16 times.
✓ Branch 1 taken 8 times.
|
24 | while (w--) { |
58 | 16 | int val = AV_RB32(p); | |
59 | 16 | val = (val >> comp.offset) & mask; | |
60 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
|
16 | if (read_pal_component) |
61 | ✗ | val = data[1][4*val + c]; | |
62 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
|
16 | if (dst_element_size == 4) *dst32++ = val; |
63 | 16 | else *dst16++ = val; | |
64 | 16 | p++; | |
65 | } | ||
66 | } else { | ||
67 | 2888 | int skip = x * step + comp.offset; | |
68 | 2888 | const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3); | |
69 | 2888 | int shift = 8 - depth - (skip & 7); | |
70 | |||
71 |
2/2✓ Branch 0 taken 1013776 times.
✓ Branch 1 taken 2888 times.
|
1016664 | while (w--) { |
72 | 1013776 | int val = (*p >> shift) & mask; | |
73 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1013776 times.
|
1013776 | if (read_pal_component) |
74 | ✗ | val = data[1][4*val + c]; | |
75 | 1013776 | shift -= step; | |
76 | 1013776 | p -= shift >> 3; | |
77 | 1013776 | shift &= 7; | |
78 |
2/2✓ Branch 0 taken 1013760 times.
✓ Branch 1 taken 16 times.
|
1013776 | if (dst_element_size == 4) *dst32++ = val; |
79 | 16 | else *dst16++ = val; | |
80 | } | ||
81 | } | ||
82 | } else { | ||
83 | 819330 | const uint8_t *p = data[plane] + y * linesize[plane] + | |
84 | 819330 | x * step + comp.offset; | |
85 | 819330 | int is_8bit = shift + depth <= 8; | |
86 | 819330 | int is_16bit= shift + depth <=16; | |
87 | |||
88 |
2/2✓ Branch 0 taken 247146 times.
✓ Branch 1 taken 572184 times.
|
819330 | if (is_8bit) |
89 | 247146 | p += !!(flags & AV_PIX_FMT_FLAG_BE); | |
90 | |||
91 |
2/2✓ Branch 0 taken 262375140 times.
✓ Branch 1 taken 819330 times.
|
263194470 | while (w--) { |
92 | unsigned val; | ||
93 |
2/2✓ Branch 0 taken 80404212 times.
✓ Branch 1 taken 181970928 times.
|
262375140 | if (is_8bit) val = *p; |
94 |
4/4✓ Branch 0 taken 173860756 times.
✓ Branch 1 taken 8110172 times.
✓ Branch 2 taken 82368452 times.
✓ Branch 3 taken 91492304 times.
|
181970928 | else if(is_16bit) val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p); |
95 |
2/2✓ Branch 0 taken 4055086 times.
✓ Branch 1 taken 4055086 times.
|
8110172 | else val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB32(p) : AV_RL32(p); |
96 | 262375140 | val = (val >> shift) & mask; | |
97 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 262375140 times.
|
262375140 | if (read_pal_component) |
98 | ✗ | val = data[1][4 * val + c]; | |
99 | 262375140 | p += step; | |
100 |
2/2✓ Branch 0 taken 262373760 times.
✓ Branch 1 taken 1380 times.
|
262375140 | if (dst_element_size == 4) *dst32++ = val; |
101 | 1380 | else *dst16++ = val; | |
102 | } | ||
103 | } | ||
104 | } | ||
105 | |||
106 | 706 | void av_read_image_line(uint16_t *dst, | |
107 | const uint8_t *data[4], const int linesize[4], | ||
108 | const AVPixFmtDescriptor *desc, | ||
109 | int x, int y, int c, int w, | ||
110 | int read_pal_component) | ||
111 | { | ||
112 | 706 | av_read_image_line2(dst, data, linesize, desc,x, y, c, w, | |
113 | read_pal_component, | ||
114 | 2); | ||
115 | 706 | } | |
116 | |||
117 | 1059121 | void av_write_image_line2(const void *src, | |
118 | uint8_t *data[4], const int linesize[4], | ||
119 | const AVPixFmtDescriptor *desc, | ||
120 | int x, int y, int c, int w, int src_element_size) | ||
121 | { | ||
122 | 1059121 | AVComponentDescriptor comp = desc->comp[c]; | |
123 | 1059121 | int plane = comp.plane; | |
124 | 1059121 | int depth = comp.depth; | |
125 | 1059121 | int step = comp.step; | |
126 | 1059121 | int flags = desc->flags; | |
127 | 1059121 | const uint32_t *src32 = src; | |
128 | 1059121 | const uint16_t *src16 = src; | |
129 | |||
130 |
2/2✓ Branch 0 taken 234720 times.
✓ Branch 1 taken 824401 times.
|
1059121 | if (!depth) |
131 | 234720 | return; | |
132 | |||
133 |
2/2✓ Branch 0 taken 2938 times.
✓ Branch 1 taken 821463 times.
|
824401 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { |
134 |
2/2✓ Branch 0 taken 26 times.
✓ Branch 1 taken 2912 times.
|
2938 | if (step > 8) { |
135 | // Assume all channels are packed into a 32bit value | ||
136 | 26 | const uint8_t *byte_p = data[plane] + y * linesize[plane]; | |
137 | 26 | uint32_t *p = (uint32_t *)byte_p; | |
138 | 26 | int offset = comp.offset; | |
139 | 26 | uint32_t mask = ((1ULL << depth) - 1) << offset; | |
140 | |||
141 |
2/2✓ Branch 0 taken 160 times.
✓ Branch 1 taken 26 times.
|
186 | while (w--) { |
142 |
2/2✓ Branch 0 taken 144 times.
✓ Branch 1 taken 16 times.
|
160 | unsigned val = src_element_size == 4 ? *src32++ : *src16++; |
143 | 160 | AV_WB32(p, (AV_RB32(p) & ~mask) | (val << offset)); | |
144 | 160 | p++; | |
145 | } | ||
146 | } else { | ||
147 | 2912 | int skip = x * step + comp.offset; | |
148 | 2912 | uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3); | |
149 | 2912 | int shift = 8 - depth - (skip & 7); | |
150 | |||
151 |
2/2✓ Branch 0 taken 1013968 times.
✓ Branch 1 taken 2912 times.
|
1016880 | while (w--) { |
152 |
2/2✓ Branch 0 taken 1013952 times.
✓ Branch 1 taken 16 times.
|
1013968 | *p |= (src_element_size == 4 ? *src32++ : *src16++) << shift; |
153 | 1013968 | shift -= step; | |
154 | 1013968 | p -= shift >> 3; | |
155 | 1013968 | shift &= 7; | |
156 | } | ||
157 | } | ||
158 | } else { | ||
159 | 821463 | int shift = comp.shift; | |
160 | 821463 | uint8_t *p = data[plane] + y * linesize[plane] + | |
161 | 821463 | x * step + comp.offset; | |
162 | |||
163 |
2/2✓ Branch 0 taken 247779 times.
✓ Branch 1 taken 573684 times.
|
821463 | if (shift + depth <= 8) { |
164 | 247779 | p += !!(flags & AV_PIX_FMT_FLAG_BE); | |
165 |
2/2✓ Branch 0 taken 80404854 times.
✓ Branch 1 taken 247779 times.
|
80652633 | while (w--) { |
166 |
2/2✓ Branch 0 taken 80404482 times.
✓ Branch 1 taken 372 times.
|
80404854 | *p |= ((src_element_size == 4 ? *src32++ : *src16++) << shift); |
167 | 80404854 | p += step; | |
168 | } | ||
169 | } else { | ||
170 |
2/2✓ Branch 0 taken 181972446 times.
✓ Branch 1 taken 573684 times.
|
182546130 | while (w--) { |
171 |
2/2✓ Branch 0 taken 181971438 times.
✓ Branch 1 taken 1008 times.
|
181972446 | unsigned s = (src_element_size == 4 ? *src32++ : *src16++); |
172 |
2/2✓ Branch 0 taken 173862136 times.
✓ Branch 1 taken 8110310 times.
|
181972446 | if (shift + depth <= 16) { |
173 |
2/2✓ Branch 0 taken 82369133 times.
✓ Branch 1 taken 91493003 times.
|
173862136 | if (flags & AV_PIX_FMT_FLAG_BE) { |
174 | 82369133 | uint16_t val = AV_RB16(p) | (s << shift); | |
175 | 82369133 | AV_WB16(p, val); | |
176 | } else { | ||
177 | 91493003 | uint16_t val = AV_RL16(p) | (s << shift); | |
178 | 91493003 | AV_WL16(p, val); | |
179 | } | ||
180 | } else { | ||
181 |
2/2✓ Branch 0 taken 4055155 times.
✓ Branch 1 taken 4055155 times.
|
8110310 | if (flags & AV_PIX_FMT_FLAG_BE) { |
182 | 4055155 | uint32_t val = AV_RB32(p) | (s << shift); | |
183 | 4055155 | AV_WB32(p, val); | |
184 | } else { | ||
185 | 4055155 | uint32_t val = AV_RL32(p) | (s << shift); | |
186 | 4055155 | AV_WL32(p, val); | |
187 | } | ||
188 | } | ||
189 | 181972446 | p += step; | |
190 | } | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | |||
195 | 706 | void av_write_image_line(const uint16_t *src, | |
196 | uint8_t *data[4], const int linesize[4], | ||
197 | const AVPixFmtDescriptor *desc, | ||
198 | int x, int y, int c, int w) | ||
199 | { | ||
200 | 706 | av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2); | |
201 | 706 | } | |
202 | |||
203 | static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { | ||
204 | [AV_PIX_FMT_YUV420P] = { | ||
205 | .name = "yuv420p", | ||
206 | .nb_components = 3, | ||
207 | .log2_chroma_w = 1, | ||
208 | .log2_chroma_h = 1, | ||
209 | .comp = { | ||
210 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
211 | { 1, 1, 0, 0, 8 }, /* U */ | ||
212 | { 2, 1, 0, 0, 8 }, /* V */ | ||
213 | }, | ||
214 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
215 | }, | ||
216 | [AV_PIX_FMT_YUYV422] = { | ||
217 | .name = "yuyv422", | ||
218 | .nb_components = 3, | ||
219 | .log2_chroma_w = 1, | ||
220 | .log2_chroma_h = 0, | ||
221 | .comp = { | ||
222 | { 0, 2, 0, 0, 8 }, /* Y */ | ||
223 | { 0, 4, 1, 0, 8 }, /* U */ | ||
224 | { 0, 4, 3, 0, 8 }, /* V */ | ||
225 | }, | ||
226 | }, | ||
227 | [AV_PIX_FMT_YVYU422] = { | ||
228 | .name = "yvyu422", | ||
229 | .nb_components = 3, | ||
230 | .log2_chroma_w = 1, | ||
231 | .log2_chroma_h = 0, | ||
232 | .comp = { | ||
233 | { 0, 2, 0, 0, 8 }, /* Y */ | ||
234 | { 0, 4, 3, 0, 8 }, /* U */ | ||
235 | { 0, 4, 1, 0, 8 }, /* V */ | ||
236 | }, | ||
237 | }, | ||
238 | [AV_PIX_FMT_Y210LE] = { | ||
239 | .name = "y210le", | ||
240 | .nb_components = 3, | ||
241 | .log2_chroma_w = 1, | ||
242 | .log2_chroma_h = 0, | ||
243 | .comp = { | ||
244 | { 0, 4, 0, 6, 10 }, /* Y */ | ||
245 | { 0, 8, 2, 6, 10 }, /* U */ | ||
246 | { 0, 8, 6, 6, 10 }, /* V */ | ||
247 | }, | ||
248 | }, | ||
249 | [AV_PIX_FMT_Y210BE] = { | ||
250 | .name = "y210be", | ||
251 | .nb_components = 3, | ||
252 | .log2_chroma_w = 1, | ||
253 | .log2_chroma_h = 0, | ||
254 | .comp = { | ||
255 | { 0, 4, 0, 6, 10 }, /* Y */ | ||
256 | { 0, 8, 2, 6, 10 }, /* U */ | ||
257 | { 0, 8, 6, 6, 10 }, /* V */ | ||
258 | }, | ||
259 | .flags = AV_PIX_FMT_FLAG_BE, | ||
260 | }, | ||
261 | [AV_PIX_FMT_RGB24] = { | ||
262 | .name = "rgb24", | ||
263 | .nb_components = 3, | ||
264 | .log2_chroma_w = 0, | ||
265 | .log2_chroma_h = 0, | ||
266 | .comp = { | ||
267 | { 0, 3, 0, 0, 8 }, /* R */ | ||
268 | { 0, 3, 1, 0, 8 }, /* G */ | ||
269 | { 0, 3, 2, 0, 8 }, /* B */ | ||
270 | }, | ||
271 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
272 | }, | ||
273 | [AV_PIX_FMT_BGR24] = { | ||
274 | .name = "bgr24", | ||
275 | .nb_components = 3, | ||
276 | .log2_chroma_w = 0, | ||
277 | .log2_chroma_h = 0, | ||
278 | .comp = { | ||
279 | { 0, 3, 2, 0, 8 }, /* R */ | ||
280 | { 0, 3, 1, 0, 8 }, /* G */ | ||
281 | { 0, 3, 0, 0, 8 }, /* B */ | ||
282 | }, | ||
283 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
284 | }, | ||
285 | [AV_PIX_FMT_X2RGB10LE] = { | ||
286 | .name = "x2rgb10le", | ||
287 | .nb_components= 3, | ||
288 | .log2_chroma_w= 0, | ||
289 | .log2_chroma_h= 0, | ||
290 | .comp = { | ||
291 | { 0, 4, 2, 4, 10 }, /* R */ | ||
292 | { 0, 4, 1, 2, 10 }, /* G */ | ||
293 | { 0, 4, 0, 0, 10 }, /* B */ | ||
294 | { 0, 4, 3, 6, 2 }, /* X */ | ||
295 | }, | ||
296 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
297 | }, | ||
298 | [AV_PIX_FMT_X2RGB10BE] = { | ||
299 | .name = "x2rgb10be", | ||
300 | .nb_components= 3, | ||
301 | .log2_chroma_w= 0, | ||
302 | .log2_chroma_h= 0, | ||
303 | .comp = { | ||
304 | { 0, 4, 0, 4, 10 }, /* R */ | ||
305 | { 0, 4, 1, 2, 10 }, /* G */ | ||
306 | { 0, 4, 2, 0, 10 }, /* B */ | ||
307 | { 0, 4, 3, 6, 2 }, /* X */ | ||
308 | }, | ||
309 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, | ||
310 | }, | ||
311 | [AV_PIX_FMT_X2BGR10LE] = { | ||
312 | .name = "x2bgr10le", | ||
313 | .nb_components= 3, | ||
314 | .log2_chroma_w= 0, | ||
315 | .log2_chroma_h= 0, | ||
316 | .comp = { | ||
317 | { 0, 4, 0, 0, 10 }, /* R */ | ||
318 | { 0, 4, 1, 2, 10 }, /* G */ | ||
319 | { 0, 4, 2, 4, 10 }, /* B */ | ||
320 | { 0, 4, 3, 6, 2 }, /* X */ | ||
321 | }, | ||
322 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
323 | }, | ||
324 | [AV_PIX_FMT_X2BGR10BE] = { | ||
325 | .name = "x2bgr10be", | ||
326 | .nb_components= 3, | ||
327 | .log2_chroma_w= 0, | ||
328 | .log2_chroma_h= 0, | ||
329 | .comp = { | ||
330 | { 0, 4, 2, 0, 10 }, /* R */ | ||
331 | { 0, 4, 1, 2, 10 }, /* G */ | ||
332 | { 0, 4, 0, 4, 10 }, /* B */ | ||
333 | { 0, 4, 3, 6, 2 }, /* X */ | ||
334 | }, | ||
335 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, | ||
336 | }, | ||
337 | [AV_PIX_FMT_YUV422P] = { | ||
338 | .name = "yuv422p", | ||
339 | .nb_components = 3, | ||
340 | .log2_chroma_w = 1, | ||
341 | .log2_chroma_h = 0, | ||
342 | .comp = { | ||
343 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
344 | { 1, 1, 0, 0, 8 }, /* U */ | ||
345 | { 2, 1, 0, 0, 8 }, /* V */ | ||
346 | }, | ||
347 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
348 | }, | ||
349 | [AV_PIX_FMT_YUV444P] = { | ||
350 | .name = "yuv444p", | ||
351 | .nb_components = 3, | ||
352 | .log2_chroma_w = 0, | ||
353 | .log2_chroma_h = 0, | ||
354 | .comp = { | ||
355 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
356 | { 1, 1, 0, 0, 8 }, /* U */ | ||
357 | { 2, 1, 0, 0, 8 }, /* V */ | ||
358 | }, | ||
359 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
360 | }, | ||
361 | [AV_PIX_FMT_YUV410P] = { | ||
362 | .name = "yuv410p", | ||
363 | .nb_components = 3, | ||
364 | .log2_chroma_w = 2, | ||
365 | .log2_chroma_h = 2, | ||
366 | .comp = { | ||
367 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
368 | { 1, 1, 0, 0, 8 }, /* U */ | ||
369 | { 2, 1, 0, 0, 8 }, /* V */ | ||
370 | }, | ||
371 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
372 | }, | ||
373 | [AV_PIX_FMT_YUV411P] = { | ||
374 | .name = "yuv411p", | ||
375 | .nb_components = 3, | ||
376 | .log2_chroma_w = 2, | ||
377 | .log2_chroma_h = 0, | ||
378 | .comp = { | ||
379 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
380 | { 1, 1, 0, 0, 8 }, /* U */ | ||
381 | { 2, 1, 0, 0, 8 }, /* V */ | ||
382 | }, | ||
383 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
384 | }, | ||
385 | [AV_PIX_FMT_YUVJ411P] = { | ||
386 | .name = "yuvj411p", | ||
387 | .nb_components = 3, | ||
388 | .log2_chroma_w = 2, | ||
389 | .log2_chroma_h = 0, | ||
390 | .comp = { | ||
391 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
392 | { 1, 1, 0, 0, 8 }, /* U */ | ||
393 | { 2, 1, 0, 0, 8 }, /* V */ | ||
394 | }, | ||
395 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
396 | }, | ||
397 | [AV_PIX_FMT_GRAY8] = { | ||
398 | .name = "gray", | ||
399 | .nb_components = 1, | ||
400 | .log2_chroma_w = 0, | ||
401 | .log2_chroma_h = 0, | ||
402 | .comp = { | ||
403 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
404 | }, | ||
405 | .alias = "gray8,y8", | ||
406 | }, | ||
407 | [AV_PIX_FMT_MONOWHITE] = { | ||
408 | .name = "monow", | ||
409 | .nb_components = 1, | ||
410 | .log2_chroma_w = 0, | ||
411 | .log2_chroma_h = 0, | ||
412 | .comp = { | ||
413 | { 0, 1, 0, 0, 1 }, /* Y */ | ||
414 | }, | ||
415 | .flags = AV_PIX_FMT_FLAG_BITSTREAM, | ||
416 | }, | ||
417 | [AV_PIX_FMT_MONOBLACK] = { | ||
418 | .name = "monob", | ||
419 | .nb_components = 1, | ||
420 | .log2_chroma_w = 0, | ||
421 | .log2_chroma_h = 0, | ||
422 | .comp = { | ||
423 | { 0, 1, 0, 7, 1 }, /* Y */ | ||
424 | }, | ||
425 | .flags = AV_PIX_FMT_FLAG_BITSTREAM, | ||
426 | }, | ||
427 | [AV_PIX_FMT_PAL8] = { | ||
428 | .name = "pal8", | ||
429 | .nb_components = 1, | ||
430 | .log2_chroma_w = 0, | ||
431 | .log2_chroma_h = 0, | ||
432 | .comp = { | ||
433 | { 0, 1, 0, 0, 8 }, | ||
434 | }, | ||
435 | .flags = AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_ALPHA, | ||
436 | }, | ||
437 | [AV_PIX_FMT_YUVJ420P] = { | ||
438 | .name = "yuvj420p", | ||
439 | .nb_components = 3, | ||
440 | .log2_chroma_w = 1, | ||
441 | .log2_chroma_h = 1, | ||
442 | .comp = { | ||
443 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
444 | { 1, 1, 0, 0, 8 }, /* U */ | ||
445 | { 2, 1, 0, 0, 8 }, /* V */ | ||
446 | }, | ||
447 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
448 | }, | ||
449 | [AV_PIX_FMT_YUVJ422P] = { | ||
450 | .name = "yuvj422p", | ||
451 | .nb_components = 3, | ||
452 | .log2_chroma_w = 1, | ||
453 | .log2_chroma_h = 0, | ||
454 | .comp = { | ||
455 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
456 | { 1, 1, 0, 0, 8 }, /* U */ | ||
457 | { 2, 1, 0, 0, 8 }, /* V */ | ||
458 | }, | ||
459 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
460 | }, | ||
461 | [AV_PIX_FMT_YUVJ444P] = { | ||
462 | .name = "yuvj444p", | ||
463 | .nb_components = 3, | ||
464 | .log2_chroma_w = 0, | ||
465 | .log2_chroma_h = 0, | ||
466 | .comp = { | ||
467 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
468 | { 1, 1, 0, 0, 8 }, /* U */ | ||
469 | { 2, 1, 0, 0, 8 }, /* V */ | ||
470 | }, | ||
471 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
472 | }, | ||
473 | [AV_PIX_FMT_UYVY422] = { | ||
474 | .name = "uyvy422", | ||
475 | .nb_components = 3, | ||
476 | .log2_chroma_w = 1, | ||
477 | .log2_chroma_h = 0, | ||
478 | .comp = { | ||
479 | { 0, 2, 1, 0, 8 }, /* Y */ | ||
480 | { 0, 4, 0, 0, 8 }, /* U */ | ||
481 | { 0, 4, 2, 0, 8 }, /* V */ | ||
482 | }, | ||
483 | }, | ||
484 | [AV_PIX_FMT_UYYVYY411] = { | ||
485 | .name = "uyyvyy411", | ||
486 | .nb_components = 3, | ||
487 | .log2_chroma_w = 2, | ||
488 | .log2_chroma_h = 0, | ||
489 | .comp = { | ||
490 | { 0, 4, 1, 0, 8 }, /* Y */ | ||
491 | { 0, 6, 0, 0, 8 }, /* U */ | ||
492 | { 0, 6, 3, 0, 8 }, /* V */ | ||
493 | }, | ||
494 | }, | ||
495 | [AV_PIX_FMT_BGR8] = { | ||
496 | .name = "bgr8", | ||
497 | .nb_components = 3, | ||
498 | .log2_chroma_w = 0, | ||
499 | .log2_chroma_h = 0, | ||
500 | .comp = { | ||
501 | { 0, 1, 0, 0, 3 }, /* R */ | ||
502 | { 0, 1, 0, 3, 3 }, /* G */ | ||
503 | { 0, 1, 0, 6, 2 }, /* B */ | ||
504 | }, | ||
505 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
506 | }, | ||
507 | [AV_PIX_FMT_BGR4] = { | ||
508 | .name = "bgr4", | ||
509 | .nb_components = 3, | ||
510 | .log2_chroma_w = 0, | ||
511 | .log2_chroma_h = 0, | ||
512 | .comp = { | ||
513 | { 0, 4, 3, 0, 1 }, /* R */ | ||
514 | { 0, 4, 1, 0, 2 }, /* G */ | ||
515 | { 0, 4, 0, 0, 1 }, /* B */ | ||
516 | }, | ||
517 | .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB, | ||
518 | }, | ||
519 | [AV_PIX_FMT_BGR4_BYTE] = { | ||
520 | .name = "bgr4_byte", | ||
521 | .nb_components = 3, | ||
522 | .log2_chroma_w = 0, | ||
523 | .log2_chroma_h = 0, | ||
524 | .comp = { | ||
525 | { 0, 1, 0, 0, 1 }, /* R */ | ||
526 | { 0, 1, 0, 1, 2 }, /* G */ | ||
527 | { 0, 1, 0, 3, 1 }, /* B */ | ||
528 | }, | ||
529 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
530 | }, | ||
531 | [AV_PIX_FMT_RGB8] = { | ||
532 | .name = "rgb8", | ||
533 | .nb_components = 3, | ||
534 | .log2_chroma_w = 0, | ||
535 | .log2_chroma_h = 0, | ||
536 | .comp = { | ||
537 | { 0, 1, 0, 5, 3 }, /* R */ | ||
538 | { 0, 1, 0, 2, 3 }, /* G */ | ||
539 | { 0, 1, 0, 0, 2 }, /* B */ | ||
540 | }, | ||
541 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
542 | }, | ||
543 | [AV_PIX_FMT_RGB4] = { | ||
544 | .name = "rgb4", | ||
545 | .nb_components = 3, | ||
546 | .log2_chroma_w = 0, | ||
547 | .log2_chroma_h = 0, | ||
548 | .comp = { | ||
549 | { 0, 4, 0, 0, 1 }, /* R */ | ||
550 | { 0, 4, 1, 0, 2 }, /* G */ | ||
551 | { 0, 4, 3, 0, 1 }, /* B */ | ||
552 | }, | ||
553 | .flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB, | ||
554 | }, | ||
555 | [AV_PIX_FMT_RGB4_BYTE] = { | ||
556 | .name = "rgb4_byte", | ||
557 | .nb_components = 3, | ||
558 | .log2_chroma_w = 0, | ||
559 | .log2_chroma_h = 0, | ||
560 | .comp = { | ||
561 | { 0, 1, 0, 3, 1 }, /* R */ | ||
562 | { 0, 1, 0, 1, 2 }, /* G */ | ||
563 | { 0, 1, 0, 0, 1 }, /* B */ | ||
564 | }, | ||
565 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
566 | }, | ||
567 | [AV_PIX_FMT_NV12] = { | ||
568 | .name = "nv12", | ||
569 | .nb_components = 3, | ||
570 | .log2_chroma_w = 1, | ||
571 | .log2_chroma_h = 1, | ||
572 | .comp = { | ||
573 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
574 | { 1, 2, 0, 0, 8 }, /* U */ | ||
575 | { 1, 2, 1, 0, 8 }, /* V */ | ||
576 | }, | ||
577 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
578 | }, | ||
579 | [AV_PIX_FMT_NV21] = { | ||
580 | .name = "nv21", | ||
581 | .nb_components = 3, | ||
582 | .log2_chroma_w = 1, | ||
583 | .log2_chroma_h = 1, | ||
584 | .comp = { | ||
585 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
586 | { 1, 2, 1, 0, 8 }, /* U */ | ||
587 | { 1, 2, 0, 0, 8 }, /* V */ | ||
588 | }, | ||
589 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
590 | }, | ||
591 | [AV_PIX_FMT_ARGB] = { | ||
592 | .name = "argb", | ||
593 | .nb_components = 4, | ||
594 | .log2_chroma_w = 0, | ||
595 | .log2_chroma_h = 0, | ||
596 | .comp = { | ||
597 | { 0, 4, 1, 0, 8 }, /* R */ | ||
598 | { 0, 4, 2, 0, 8 }, /* G */ | ||
599 | { 0, 4, 3, 0, 8 }, /* B */ | ||
600 | { 0, 4, 0, 0, 8 }, /* A */ | ||
601 | }, | ||
602 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
603 | }, | ||
604 | [AV_PIX_FMT_RGBA] = { | ||
605 | .name = "rgba", | ||
606 | .nb_components = 4, | ||
607 | .log2_chroma_w = 0, | ||
608 | .log2_chroma_h = 0, | ||
609 | .comp = { | ||
610 | { 0, 4, 0, 0, 8 }, /* R */ | ||
611 | { 0, 4, 1, 0, 8 }, /* G */ | ||
612 | { 0, 4, 2, 0, 8 }, /* B */ | ||
613 | { 0, 4, 3, 0, 8 }, /* A */ | ||
614 | }, | ||
615 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
616 | }, | ||
617 | [AV_PIX_FMT_ABGR] = { | ||
618 | .name = "abgr", | ||
619 | .nb_components = 4, | ||
620 | .log2_chroma_w = 0, | ||
621 | .log2_chroma_h = 0, | ||
622 | .comp = { | ||
623 | { 0, 4, 3, 0, 8 }, /* R */ | ||
624 | { 0, 4, 2, 0, 8 }, /* G */ | ||
625 | { 0, 4, 1, 0, 8 }, /* B */ | ||
626 | { 0, 4, 0, 0, 8 }, /* A */ | ||
627 | }, | ||
628 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
629 | }, | ||
630 | [AV_PIX_FMT_BGRA] = { | ||
631 | .name = "bgra", | ||
632 | .nb_components = 4, | ||
633 | .log2_chroma_w = 0, | ||
634 | .log2_chroma_h = 0, | ||
635 | .comp = { | ||
636 | { 0, 4, 2, 0, 8 }, /* R */ | ||
637 | { 0, 4, 1, 0, 8 }, /* G */ | ||
638 | { 0, 4, 0, 0, 8 }, /* B */ | ||
639 | { 0, 4, 3, 0, 8 }, /* A */ | ||
640 | }, | ||
641 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
642 | }, | ||
643 | [AV_PIX_FMT_0RGB] = { | ||
644 | .name = "0rgb", | ||
645 | .nb_components= 3, | ||
646 | .log2_chroma_w= 0, | ||
647 | .log2_chroma_h= 0, | ||
648 | .comp = { | ||
649 | { 0, 4, 1, 0, 8 }, /* R */ | ||
650 | { 0, 4, 2, 0, 8 }, /* G */ | ||
651 | { 0, 4, 3, 0, 8 }, /* B */ | ||
652 | { 0, 4, 0, 0, 8 }, /* X */ | ||
653 | }, | ||
654 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
655 | }, | ||
656 | [AV_PIX_FMT_RGB0] = { | ||
657 | .name = "rgb0", | ||
658 | .nb_components= 3, | ||
659 | .log2_chroma_w= 0, | ||
660 | .log2_chroma_h= 0, | ||
661 | .comp = { | ||
662 | { 0, 4, 0, 0, 8 }, /* R */ | ||
663 | { 0, 4, 1, 0, 8 }, /* G */ | ||
664 | { 0, 4, 2, 0, 8 }, /* B */ | ||
665 | { 0, 4, 3, 0, 8 }, /* X */ | ||
666 | }, | ||
667 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
668 | }, | ||
669 | [AV_PIX_FMT_0BGR] = { | ||
670 | .name = "0bgr", | ||
671 | .nb_components= 3, | ||
672 | .log2_chroma_w= 0, | ||
673 | .log2_chroma_h= 0, | ||
674 | .comp = { | ||
675 | { 0, 4, 3, 0, 8 }, /* R */ | ||
676 | { 0, 4, 2, 0, 8 }, /* G */ | ||
677 | { 0, 4, 1, 0, 8 }, /* B */ | ||
678 | { 0, 4, 0, 0, 8 }, /* X */ | ||
679 | }, | ||
680 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
681 | }, | ||
682 | [AV_PIX_FMT_BGR0] = { | ||
683 | .name = "bgr0", | ||
684 | .nb_components= 3, | ||
685 | .log2_chroma_w= 0, | ||
686 | .log2_chroma_h= 0, | ||
687 | .comp = { | ||
688 | { 0, 4, 2, 0, 8 }, /* R */ | ||
689 | { 0, 4, 1, 0, 8 }, /* G */ | ||
690 | { 0, 4, 0, 0, 8 }, /* B */ | ||
691 | { 0, 4, 3, 0, 8 }, /* X */ | ||
692 | }, | ||
693 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
694 | }, | ||
695 | [AV_PIX_FMT_GRAY9BE] = { | ||
696 | .name = "gray9be", | ||
697 | .nb_components = 1, | ||
698 | .log2_chroma_w = 0, | ||
699 | .log2_chroma_h = 0, | ||
700 | .comp = { | ||
701 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
702 | }, | ||
703 | .flags = AV_PIX_FMT_FLAG_BE, | ||
704 | .alias = "y9be", | ||
705 | }, | ||
706 | [AV_PIX_FMT_GRAY9LE] = { | ||
707 | .name = "gray9le", | ||
708 | .nb_components = 1, | ||
709 | .log2_chroma_w = 0, | ||
710 | .log2_chroma_h = 0, | ||
711 | .comp = { | ||
712 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
713 | }, | ||
714 | .alias = "y9le", | ||
715 | }, | ||
716 | [AV_PIX_FMT_GRAY10BE] = { | ||
717 | .name = "gray10be", | ||
718 | .nb_components = 1, | ||
719 | .log2_chroma_w = 0, | ||
720 | .log2_chroma_h = 0, | ||
721 | .comp = { | ||
722 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
723 | }, | ||
724 | .flags = AV_PIX_FMT_FLAG_BE, | ||
725 | .alias = "y10be", | ||
726 | }, | ||
727 | [AV_PIX_FMT_GRAY10LE] = { | ||
728 | .name = "gray10le", | ||
729 | .nb_components = 1, | ||
730 | .log2_chroma_w = 0, | ||
731 | .log2_chroma_h = 0, | ||
732 | .comp = { | ||
733 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
734 | }, | ||
735 | .alias = "y10le", | ||
736 | }, | ||
737 | [AV_PIX_FMT_GRAY12BE] = { | ||
738 | .name = "gray12be", | ||
739 | .nb_components = 1, | ||
740 | .log2_chroma_w = 0, | ||
741 | .log2_chroma_h = 0, | ||
742 | .comp = { | ||
743 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
744 | }, | ||
745 | .flags = AV_PIX_FMT_FLAG_BE, | ||
746 | .alias = "y12be", | ||
747 | }, | ||
748 | [AV_PIX_FMT_GRAY12LE] = { | ||
749 | .name = "gray12le", | ||
750 | .nb_components = 1, | ||
751 | .log2_chroma_w = 0, | ||
752 | .log2_chroma_h = 0, | ||
753 | .comp = { | ||
754 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
755 | }, | ||
756 | .alias = "y12le", | ||
757 | }, | ||
758 | [AV_PIX_FMT_GRAY14BE] = { | ||
759 | .name = "gray14be", | ||
760 | .nb_components = 1, | ||
761 | .log2_chroma_w = 0, | ||
762 | .log2_chroma_h = 0, | ||
763 | .comp = { | ||
764 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
765 | }, | ||
766 | .flags = AV_PIX_FMT_FLAG_BE, | ||
767 | .alias = "y14be", | ||
768 | }, | ||
769 | [AV_PIX_FMT_GRAY14LE] = { | ||
770 | .name = "gray14le", | ||
771 | .nb_components = 1, | ||
772 | .log2_chroma_w = 0, | ||
773 | .log2_chroma_h = 0, | ||
774 | .comp = { | ||
775 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
776 | }, | ||
777 | .alias = "y14le", | ||
778 | }, | ||
779 | [AV_PIX_FMT_GRAY16BE] = { | ||
780 | .name = "gray16be", | ||
781 | .nb_components = 1, | ||
782 | .log2_chroma_w = 0, | ||
783 | .log2_chroma_h = 0, | ||
784 | .comp = { | ||
785 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
786 | }, | ||
787 | .flags = AV_PIX_FMT_FLAG_BE, | ||
788 | .alias = "y16be", | ||
789 | }, | ||
790 | [AV_PIX_FMT_GRAY16LE] = { | ||
791 | .name = "gray16le", | ||
792 | .nb_components = 1, | ||
793 | .log2_chroma_w = 0, | ||
794 | .log2_chroma_h = 0, | ||
795 | .comp = { | ||
796 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
797 | }, | ||
798 | .alias = "y16le", | ||
799 | }, | ||
800 | [AV_PIX_FMT_GRAY32BE] = { | ||
801 | .name = "gray32be", | ||
802 | .nb_components = 1, | ||
803 | .log2_chroma_w = 0, | ||
804 | .log2_chroma_h = 0, | ||
805 | .comp = { | ||
806 | { 0, 4, 0, 0, 32 }, /* Y */ | ||
807 | }, | ||
808 | .flags = AV_PIX_FMT_FLAG_BE, | ||
809 | .alias = "y32be", | ||
810 | }, | ||
811 | [AV_PIX_FMT_GRAY32LE] = { | ||
812 | .name = "gray32le", | ||
813 | .nb_components = 1, | ||
814 | .log2_chroma_w = 0, | ||
815 | .log2_chroma_h = 0, | ||
816 | .comp = { | ||
817 | { 0, 4, 0, 0, 32 }, /* Y */ | ||
818 | }, | ||
819 | .alias = "y32le", | ||
820 | }, | ||
821 | [AV_PIX_FMT_YUV440P] = { | ||
822 | .name = "yuv440p", | ||
823 | .nb_components = 3, | ||
824 | .log2_chroma_w = 0, | ||
825 | .log2_chroma_h = 1, | ||
826 | .comp = { | ||
827 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
828 | { 1, 1, 0, 0, 8 }, /* U */ | ||
829 | { 2, 1, 0, 0, 8 }, /* V */ | ||
830 | }, | ||
831 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
832 | }, | ||
833 | [AV_PIX_FMT_YUVJ440P] = { | ||
834 | .name = "yuvj440p", | ||
835 | .nb_components = 3, | ||
836 | .log2_chroma_w = 0, | ||
837 | .log2_chroma_h = 1, | ||
838 | .comp = { | ||
839 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
840 | { 1, 1, 0, 0, 8 }, /* U */ | ||
841 | { 2, 1, 0, 0, 8 }, /* V */ | ||
842 | }, | ||
843 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
844 | }, | ||
845 | [AV_PIX_FMT_YUV440P10LE] = { | ||
846 | .name = "yuv440p10le", | ||
847 | .nb_components = 3, | ||
848 | .log2_chroma_w = 0, | ||
849 | .log2_chroma_h = 1, | ||
850 | .comp = { | ||
851 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
852 | { 1, 2, 0, 0, 10 }, /* U */ | ||
853 | { 2, 2, 0, 0, 10 }, /* V */ | ||
854 | }, | ||
855 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
856 | }, | ||
857 | [AV_PIX_FMT_YUV440P10BE] = { | ||
858 | .name = "yuv440p10be", | ||
859 | .nb_components = 3, | ||
860 | .log2_chroma_w = 0, | ||
861 | .log2_chroma_h = 1, | ||
862 | .comp = { | ||
863 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
864 | { 1, 2, 0, 0, 10 }, /* U */ | ||
865 | { 2, 2, 0, 0, 10 }, /* V */ | ||
866 | }, | ||
867 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
868 | }, | ||
869 | [AV_PIX_FMT_YUV440P12LE] = { | ||
870 | .name = "yuv440p12le", | ||
871 | .nb_components = 3, | ||
872 | .log2_chroma_w = 0, | ||
873 | .log2_chroma_h = 1, | ||
874 | .comp = { | ||
875 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
876 | { 1, 2, 0, 0, 12 }, /* U */ | ||
877 | { 2, 2, 0, 0, 12 }, /* V */ | ||
878 | }, | ||
879 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
880 | }, | ||
881 | [AV_PIX_FMT_YUV440P12BE] = { | ||
882 | .name = "yuv440p12be", | ||
883 | .nb_components = 3, | ||
884 | .log2_chroma_w = 0, | ||
885 | .log2_chroma_h = 1, | ||
886 | .comp = { | ||
887 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
888 | { 1, 2, 0, 0, 12 }, /* U */ | ||
889 | { 2, 2, 0, 0, 12 }, /* V */ | ||
890 | }, | ||
891 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
892 | }, | ||
893 | [AV_PIX_FMT_YUVA420P] = { | ||
894 | .name = "yuva420p", | ||
895 | .nb_components = 4, | ||
896 | .log2_chroma_w = 1, | ||
897 | .log2_chroma_h = 1, | ||
898 | .comp = { | ||
899 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
900 | { 1, 1, 0, 0, 8 }, /* U */ | ||
901 | { 2, 1, 0, 0, 8 }, /* V */ | ||
902 | { 3, 1, 0, 0, 8 }, /* A */ | ||
903 | }, | ||
904 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
905 | }, | ||
906 | [AV_PIX_FMT_YUVA422P] = { | ||
907 | .name = "yuva422p", | ||
908 | .nb_components = 4, | ||
909 | .log2_chroma_w = 1, | ||
910 | .log2_chroma_h = 0, | ||
911 | .comp = { | ||
912 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
913 | { 1, 1, 0, 0, 8 }, /* U */ | ||
914 | { 2, 1, 0, 0, 8 }, /* V */ | ||
915 | { 3, 1, 0, 0, 8 }, /* A */ | ||
916 | }, | ||
917 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
918 | }, | ||
919 | [AV_PIX_FMT_YUVA444P] = { | ||
920 | .name = "yuva444p", | ||
921 | .nb_components = 4, | ||
922 | .log2_chroma_w = 0, | ||
923 | .log2_chroma_h = 0, | ||
924 | .comp = { | ||
925 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
926 | { 1, 1, 0, 0, 8 }, /* U */ | ||
927 | { 2, 1, 0, 0, 8 }, /* V */ | ||
928 | { 3, 1, 0, 0, 8 }, /* A */ | ||
929 | }, | ||
930 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
931 | }, | ||
932 | [AV_PIX_FMT_YUVA420P9BE] = { | ||
933 | .name = "yuva420p9be", | ||
934 | .nb_components = 4, | ||
935 | .log2_chroma_w = 1, | ||
936 | .log2_chroma_h = 1, | ||
937 | .comp = { | ||
938 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
939 | { 1, 2, 0, 0, 9 }, /* U */ | ||
940 | { 2, 2, 0, 0, 9 }, /* V */ | ||
941 | { 3, 2, 0, 0, 9 }, /* A */ | ||
942 | }, | ||
943 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
944 | }, | ||
945 | [AV_PIX_FMT_YUVA420P9LE] = { | ||
946 | .name = "yuva420p9le", | ||
947 | .nb_components = 4, | ||
948 | .log2_chroma_w = 1, | ||
949 | .log2_chroma_h = 1, | ||
950 | .comp = { | ||
951 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
952 | { 1, 2, 0, 0, 9 }, /* U */ | ||
953 | { 2, 2, 0, 0, 9 }, /* V */ | ||
954 | { 3, 2, 0, 0, 9 }, /* A */ | ||
955 | }, | ||
956 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
957 | }, | ||
958 | [AV_PIX_FMT_YUVA422P9BE] = { | ||
959 | .name = "yuva422p9be", | ||
960 | .nb_components = 4, | ||
961 | .log2_chroma_w = 1, | ||
962 | .log2_chroma_h = 0, | ||
963 | .comp = { | ||
964 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
965 | { 1, 2, 0, 0, 9 }, /* U */ | ||
966 | { 2, 2, 0, 0, 9 }, /* V */ | ||
967 | { 3, 2, 0, 0, 9 }, /* A */ | ||
968 | }, | ||
969 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
970 | }, | ||
971 | [AV_PIX_FMT_YUVA422P9LE] = { | ||
972 | .name = "yuva422p9le", | ||
973 | .nb_components = 4, | ||
974 | .log2_chroma_w = 1, | ||
975 | .log2_chroma_h = 0, | ||
976 | .comp = { | ||
977 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
978 | { 1, 2, 0, 0, 9 }, /* U */ | ||
979 | { 2, 2, 0, 0, 9 }, /* V */ | ||
980 | { 3, 2, 0, 0, 9 }, /* A */ | ||
981 | }, | ||
982 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
983 | }, | ||
984 | [AV_PIX_FMT_YUVA444P9BE] = { | ||
985 | .name = "yuva444p9be", | ||
986 | .nb_components = 4, | ||
987 | .log2_chroma_w = 0, | ||
988 | .log2_chroma_h = 0, | ||
989 | .comp = { | ||
990 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
991 | { 1, 2, 0, 0, 9 }, /* U */ | ||
992 | { 2, 2, 0, 0, 9 }, /* V */ | ||
993 | { 3, 2, 0, 0, 9 }, /* A */ | ||
994 | }, | ||
995 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
996 | }, | ||
997 | [AV_PIX_FMT_YUVA444P9LE] = { | ||
998 | .name = "yuva444p9le", | ||
999 | .nb_components = 4, | ||
1000 | .log2_chroma_w = 0, | ||
1001 | .log2_chroma_h = 0, | ||
1002 | .comp = { | ||
1003 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1004 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1005 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1006 | { 3, 2, 0, 0, 9 }, /* A */ | ||
1007 | }, | ||
1008 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1009 | }, | ||
1010 | [AV_PIX_FMT_YUVA420P10BE] = { | ||
1011 | .name = "yuva420p10be", | ||
1012 | .nb_components = 4, | ||
1013 | .log2_chroma_w = 1, | ||
1014 | .log2_chroma_h = 1, | ||
1015 | .comp = { | ||
1016 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1017 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1018 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1019 | { 3, 2, 0, 0, 10 }, /* A */ | ||
1020 | }, | ||
1021 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1022 | }, | ||
1023 | [AV_PIX_FMT_YUVA420P10LE] = { | ||
1024 | .name = "yuva420p10le", | ||
1025 | .nb_components = 4, | ||
1026 | .log2_chroma_w = 1, | ||
1027 | .log2_chroma_h = 1, | ||
1028 | .comp = { | ||
1029 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1030 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1031 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1032 | { 3, 2, 0, 0, 10 }, /* A */ | ||
1033 | }, | ||
1034 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1035 | }, | ||
1036 | [AV_PIX_FMT_YUVA422P10BE] = { | ||
1037 | .name = "yuva422p10be", | ||
1038 | .nb_components = 4, | ||
1039 | .log2_chroma_w = 1, | ||
1040 | .log2_chroma_h = 0, | ||
1041 | .comp = { | ||
1042 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1043 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1044 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1045 | { 3, 2, 0, 0, 10 }, /* A */ | ||
1046 | }, | ||
1047 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1048 | }, | ||
1049 | [AV_PIX_FMT_YUVA422P10LE] = { | ||
1050 | .name = "yuva422p10le", | ||
1051 | .nb_components = 4, | ||
1052 | .log2_chroma_w = 1, | ||
1053 | .log2_chroma_h = 0, | ||
1054 | .comp = { | ||
1055 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1056 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1057 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1058 | { 3, 2, 0, 0, 10 }, /* A */ | ||
1059 | }, | ||
1060 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1061 | }, | ||
1062 | [AV_PIX_FMT_YUVA444P10BE] = { | ||
1063 | .name = "yuva444p10be", | ||
1064 | .nb_components = 4, | ||
1065 | .log2_chroma_w = 0, | ||
1066 | .log2_chroma_h = 0, | ||
1067 | .comp = { | ||
1068 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1069 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1070 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1071 | { 3, 2, 0, 0, 10 }, /* A */ | ||
1072 | }, | ||
1073 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1074 | }, | ||
1075 | [AV_PIX_FMT_YUVA444P10LE] = { | ||
1076 | .name = "yuva444p10le", | ||
1077 | .nb_components = 4, | ||
1078 | .log2_chroma_w = 0, | ||
1079 | .log2_chroma_h = 0, | ||
1080 | .comp = { | ||
1081 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1082 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1083 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1084 | { 3, 2, 0, 0, 10 }, /* A */ | ||
1085 | }, | ||
1086 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1087 | }, | ||
1088 | [AV_PIX_FMT_YUVA420P16BE] = { | ||
1089 | .name = "yuva420p16be", | ||
1090 | .nb_components = 4, | ||
1091 | .log2_chroma_w = 1, | ||
1092 | .log2_chroma_h = 1, | ||
1093 | .comp = { | ||
1094 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1095 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1096 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1097 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1098 | }, | ||
1099 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1100 | }, | ||
1101 | [AV_PIX_FMT_YUVA420P16LE] = { | ||
1102 | .name = "yuva420p16le", | ||
1103 | .nb_components = 4, | ||
1104 | .log2_chroma_w = 1, | ||
1105 | .log2_chroma_h = 1, | ||
1106 | .comp = { | ||
1107 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1108 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1109 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1110 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1111 | }, | ||
1112 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1113 | }, | ||
1114 | [AV_PIX_FMT_YUVA422P16BE] = { | ||
1115 | .name = "yuva422p16be", | ||
1116 | .nb_components = 4, | ||
1117 | .log2_chroma_w = 1, | ||
1118 | .log2_chroma_h = 0, | ||
1119 | .comp = { | ||
1120 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1121 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1122 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1123 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1124 | }, | ||
1125 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1126 | }, | ||
1127 | [AV_PIX_FMT_YUVA422P16LE] = { | ||
1128 | .name = "yuva422p16le", | ||
1129 | .nb_components = 4, | ||
1130 | .log2_chroma_w = 1, | ||
1131 | .log2_chroma_h = 0, | ||
1132 | .comp = { | ||
1133 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1134 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1135 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1136 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1137 | }, | ||
1138 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1139 | }, | ||
1140 | [AV_PIX_FMT_YUVA444P16BE] = { | ||
1141 | .name = "yuva444p16be", | ||
1142 | .nb_components = 4, | ||
1143 | .log2_chroma_w = 0, | ||
1144 | .log2_chroma_h = 0, | ||
1145 | .comp = { | ||
1146 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1147 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1148 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1149 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1150 | }, | ||
1151 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1152 | }, | ||
1153 | [AV_PIX_FMT_YUVA444P16LE] = { | ||
1154 | .name = "yuva444p16le", | ||
1155 | .nb_components = 4, | ||
1156 | .log2_chroma_w = 0, | ||
1157 | .log2_chroma_h = 0, | ||
1158 | .comp = { | ||
1159 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1160 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1161 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1162 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1163 | }, | ||
1164 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
1165 | }, | ||
1166 | [AV_PIX_FMT_RGB48BE] = { | ||
1167 | .name = "rgb48be", | ||
1168 | .nb_components = 3, | ||
1169 | .log2_chroma_w = 0, | ||
1170 | .log2_chroma_h = 0, | ||
1171 | .comp = { | ||
1172 | { 0, 6, 0, 0, 16 }, /* R */ | ||
1173 | { 0, 6, 2, 0, 16 }, /* G */ | ||
1174 | { 0, 6, 4, 0, 16 }, /* B */ | ||
1175 | }, | ||
1176 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE, | ||
1177 | }, | ||
1178 | [AV_PIX_FMT_RGB48LE] = { | ||
1179 | .name = "rgb48le", | ||
1180 | .nb_components = 3, | ||
1181 | .log2_chroma_w = 0, | ||
1182 | .log2_chroma_h = 0, | ||
1183 | .comp = { | ||
1184 | { 0, 6, 0, 0, 16 }, /* R */ | ||
1185 | { 0, 6, 2, 0, 16 }, /* G */ | ||
1186 | { 0, 6, 4, 0, 16 }, /* B */ | ||
1187 | }, | ||
1188 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1189 | }, | ||
1190 | [AV_PIX_FMT_RGBA64BE] = { | ||
1191 | .name = "rgba64be", | ||
1192 | .nb_components = 4, | ||
1193 | .log2_chroma_w = 0, | ||
1194 | .log2_chroma_h = 0, | ||
1195 | .comp = { | ||
1196 | { 0, 8, 0, 0, 16 }, /* R */ | ||
1197 | { 0, 8, 2, 0, 16 }, /* G */ | ||
1198 | { 0, 8, 4, 0, 16 }, /* B */ | ||
1199 | { 0, 8, 6, 0, 16 }, /* A */ | ||
1200 | }, | ||
1201 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
1202 | }, | ||
1203 | [AV_PIX_FMT_RGBA64LE] = { | ||
1204 | .name = "rgba64le", | ||
1205 | .nb_components = 4, | ||
1206 | .log2_chroma_w = 0, | ||
1207 | .log2_chroma_h = 0, | ||
1208 | .comp = { | ||
1209 | { 0, 8, 0, 0, 16 }, /* R */ | ||
1210 | { 0, 8, 2, 0, 16 }, /* G */ | ||
1211 | { 0, 8, 4, 0, 16 }, /* B */ | ||
1212 | { 0, 8, 6, 0, 16 }, /* A */ | ||
1213 | }, | ||
1214 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
1215 | }, | ||
1216 | [AV_PIX_FMT_RGB565BE] = { | ||
1217 | .name = "rgb565be", | ||
1218 | .nb_components = 3, | ||
1219 | .log2_chroma_w = 0, | ||
1220 | .log2_chroma_h = 0, | ||
1221 | .comp = { | ||
1222 | { 0, 2, -1, 3, 5 }, /* R */ | ||
1223 | { 0, 2, 0, 5, 6 }, /* G */ | ||
1224 | { 0, 2, 0, 0, 5 }, /* B */ | ||
1225 | }, | ||
1226 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1227 | }, | ||
1228 | [AV_PIX_FMT_RGB565LE] = { | ||
1229 | .name = "rgb565le", | ||
1230 | .nb_components = 3, | ||
1231 | .log2_chroma_w = 0, | ||
1232 | .log2_chroma_h = 0, | ||
1233 | .comp = { | ||
1234 | { 0, 2, 1, 3, 5 }, /* R */ | ||
1235 | { 0, 2, 0, 5, 6 }, /* G */ | ||
1236 | { 0, 2, 0, 0, 5 }, /* B */ | ||
1237 | }, | ||
1238 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1239 | }, | ||
1240 | [AV_PIX_FMT_RGB555BE] = { | ||
1241 | .name = "rgb555be", | ||
1242 | .nb_components = 3, | ||
1243 | .log2_chroma_w = 0, | ||
1244 | .log2_chroma_h = 0, | ||
1245 | .comp = { | ||
1246 | { 0, 2, -1, 2, 5 }, /* R */ | ||
1247 | { 0, 2, 0, 5, 5 }, /* G */ | ||
1248 | { 0, 2, 0, 0, 5 }, /* B */ | ||
1249 | }, | ||
1250 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1251 | }, | ||
1252 | [AV_PIX_FMT_RGB555LE] = { | ||
1253 | .name = "rgb555le", | ||
1254 | .nb_components = 3, | ||
1255 | .log2_chroma_w = 0, | ||
1256 | .log2_chroma_h = 0, | ||
1257 | .comp = { | ||
1258 | { 0, 2, 1, 2, 5 }, /* R */ | ||
1259 | { 0, 2, 0, 5, 5 }, /* G */ | ||
1260 | { 0, 2, 0, 0, 5 }, /* B */ | ||
1261 | }, | ||
1262 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1263 | }, | ||
1264 | [AV_PIX_FMT_RGB444BE] = { | ||
1265 | .name = "rgb444be", | ||
1266 | .nb_components = 3, | ||
1267 | .log2_chroma_w = 0, | ||
1268 | .log2_chroma_h = 0, | ||
1269 | .comp = { | ||
1270 | { 0, 2, -1, 0, 4 }, /* R */ | ||
1271 | { 0, 2, 0, 4, 4 }, /* G */ | ||
1272 | { 0, 2, 0, 0, 4 }, /* B */ | ||
1273 | }, | ||
1274 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1275 | }, | ||
1276 | [AV_PIX_FMT_RGB444LE] = { | ||
1277 | .name = "rgb444le", | ||
1278 | .nb_components = 3, | ||
1279 | .log2_chroma_w = 0, | ||
1280 | .log2_chroma_h = 0, | ||
1281 | .comp = { | ||
1282 | { 0, 2, 1, 0, 4 }, /* R */ | ||
1283 | { 0, 2, 0, 4, 4 }, /* G */ | ||
1284 | { 0, 2, 0, 0, 4 }, /* B */ | ||
1285 | }, | ||
1286 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1287 | }, | ||
1288 | [AV_PIX_FMT_BGR48BE] = { | ||
1289 | .name = "bgr48be", | ||
1290 | .nb_components = 3, | ||
1291 | .log2_chroma_w = 0, | ||
1292 | .log2_chroma_h = 0, | ||
1293 | .comp = { | ||
1294 | { 0, 6, 4, 0, 16 }, /* R */ | ||
1295 | { 0, 6, 2, 0, 16 }, /* G */ | ||
1296 | { 0, 6, 0, 0, 16 }, /* B */ | ||
1297 | }, | ||
1298 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1299 | }, | ||
1300 | [AV_PIX_FMT_BGR48LE] = { | ||
1301 | .name = "bgr48le", | ||
1302 | .nb_components = 3, | ||
1303 | .log2_chroma_w = 0, | ||
1304 | .log2_chroma_h = 0, | ||
1305 | .comp = { | ||
1306 | { 0, 6, 4, 0, 16 }, /* R */ | ||
1307 | { 0, 6, 2, 0, 16 }, /* G */ | ||
1308 | { 0, 6, 0, 0, 16 }, /* B */ | ||
1309 | }, | ||
1310 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1311 | }, | ||
1312 | [AV_PIX_FMT_BGRA64BE] = { | ||
1313 | .name = "bgra64be", | ||
1314 | .nb_components = 4, | ||
1315 | .log2_chroma_w = 0, | ||
1316 | .log2_chroma_h = 0, | ||
1317 | .comp = { | ||
1318 | { 0, 8, 4, 0, 16 }, /* R */ | ||
1319 | { 0, 8, 2, 0, 16 }, /* G */ | ||
1320 | { 0, 8, 0, 0, 16 }, /* B */ | ||
1321 | { 0, 8, 6, 0, 16 }, /* A */ | ||
1322 | }, | ||
1323 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
1324 | }, | ||
1325 | [AV_PIX_FMT_BGRA64LE] = { | ||
1326 | .name = "bgra64le", | ||
1327 | .nb_components = 4, | ||
1328 | .log2_chroma_w = 0, | ||
1329 | .log2_chroma_h = 0, | ||
1330 | .comp = { | ||
1331 | { 0, 8, 4, 0, 16 }, /* R */ | ||
1332 | { 0, 8, 2, 0, 16 }, /* G */ | ||
1333 | { 0, 8, 0, 0, 16 }, /* B */ | ||
1334 | { 0, 8, 6, 0, 16 }, /* A */ | ||
1335 | }, | ||
1336 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
1337 | }, | ||
1338 | [AV_PIX_FMT_BGR565BE] = { | ||
1339 | .name = "bgr565be", | ||
1340 | .nb_components = 3, | ||
1341 | .log2_chroma_w = 0, | ||
1342 | .log2_chroma_h = 0, | ||
1343 | .comp = { | ||
1344 | { 0, 2, 0, 0, 5 }, /* R */ | ||
1345 | { 0, 2, 0, 5, 6 }, /* G */ | ||
1346 | { 0, 2, -1, 3, 5 }, /* B */ | ||
1347 | }, | ||
1348 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1349 | }, | ||
1350 | [AV_PIX_FMT_BGR565LE] = { | ||
1351 | .name = "bgr565le", | ||
1352 | .nb_components = 3, | ||
1353 | .log2_chroma_w = 0, | ||
1354 | .log2_chroma_h = 0, | ||
1355 | .comp = { | ||
1356 | { 0, 2, 0, 0, 5 }, /* R */ | ||
1357 | { 0, 2, 0, 5, 6 }, /* G */ | ||
1358 | { 0, 2, 1, 3, 5 }, /* B */ | ||
1359 | }, | ||
1360 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1361 | }, | ||
1362 | [AV_PIX_FMT_BGR555BE] = { | ||
1363 | .name = "bgr555be", | ||
1364 | .nb_components = 3, | ||
1365 | .log2_chroma_w = 0, | ||
1366 | .log2_chroma_h = 0, | ||
1367 | .comp = { | ||
1368 | { 0, 2, 0, 0, 5 }, /* R */ | ||
1369 | { 0, 2, 0, 5, 5 }, /* G */ | ||
1370 | { 0, 2, -1, 2, 5 }, /* B */ | ||
1371 | }, | ||
1372 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1373 | }, | ||
1374 | [AV_PIX_FMT_BGR555LE] = { | ||
1375 | .name = "bgr555le", | ||
1376 | .nb_components = 3, | ||
1377 | .log2_chroma_w = 0, | ||
1378 | .log2_chroma_h = 0, | ||
1379 | .comp = { | ||
1380 | { 0, 2, 0, 0, 5 }, /* R */ | ||
1381 | { 0, 2, 0, 5, 5 }, /* G */ | ||
1382 | { 0, 2, 1, 2, 5 }, /* B */ | ||
1383 | }, | ||
1384 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1385 | }, | ||
1386 | [AV_PIX_FMT_BGR444BE] = { | ||
1387 | .name = "bgr444be", | ||
1388 | .nb_components = 3, | ||
1389 | .log2_chroma_w = 0, | ||
1390 | .log2_chroma_h = 0, | ||
1391 | .comp = { | ||
1392 | { 0, 2, 0, 0, 4 }, /* R */ | ||
1393 | { 0, 2, 0, 4, 4 }, /* G */ | ||
1394 | { 0, 2, -1, 0, 4 }, /* B */ | ||
1395 | }, | ||
1396 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
1397 | }, | ||
1398 | [AV_PIX_FMT_BGR444LE] = { | ||
1399 | .name = "bgr444le", | ||
1400 | .nb_components = 3, | ||
1401 | .log2_chroma_w = 0, | ||
1402 | .log2_chroma_h = 0, | ||
1403 | .comp = { | ||
1404 | { 0, 2, 0, 0, 4 }, /* R */ | ||
1405 | { 0, 2, 0, 4, 4 }, /* G */ | ||
1406 | { 0, 2, 1, 0, 4 }, /* B */ | ||
1407 | }, | ||
1408 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
1409 | }, | ||
1410 | [AV_PIX_FMT_VAAPI] = { | ||
1411 | .name = "vaapi", | ||
1412 | .log2_chroma_w = 1, | ||
1413 | .log2_chroma_h = 1, | ||
1414 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
1415 | }, | ||
1416 | [AV_PIX_FMT_YUV420P9LE] = { | ||
1417 | .name = "yuv420p9le", | ||
1418 | .nb_components = 3, | ||
1419 | .log2_chroma_w = 1, | ||
1420 | .log2_chroma_h = 1, | ||
1421 | .comp = { | ||
1422 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1423 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1424 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1425 | }, | ||
1426 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1427 | }, | ||
1428 | [AV_PIX_FMT_YUV420P9BE] = { | ||
1429 | .name = "yuv420p9be", | ||
1430 | .nb_components = 3, | ||
1431 | .log2_chroma_w = 1, | ||
1432 | .log2_chroma_h = 1, | ||
1433 | .comp = { | ||
1434 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1435 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1436 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1437 | }, | ||
1438 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1439 | }, | ||
1440 | [AV_PIX_FMT_YUV420P10LE] = { | ||
1441 | .name = "yuv420p10le", | ||
1442 | .nb_components = 3, | ||
1443 | .log2_chroma_w = 1, | ||
1444 | .log2_chroma_h = 1, | ||
1445 | .comp = { | ||
1446 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1447 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1448 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1449 | }, | ||
1450 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1451 | }, | ||
1452 | [AV_PIX_FMT_YUV420P10BE] = { | ||
1453 | .name = "yuv420p10be", | ||
1454 | .nb_components = 3, | ||
1455 | .log2_chroma_w = 1, | ||
1456 | .log2_chroma_h = 1, | ||
1457 | .comp = { | ||
1458 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1459 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1460 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1461 | }, | ||
1462 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1463 | }, | ||
1464 | [AV_PIX_FMT_YUV420P12LE] = { | ||
1465 | .name = "yuv420p12le", | ||
1466 | .nb_components = 3, | ||
1467 | .log2_chroma_w = 1, | ||
1468 | .log2_chroma_h = 1, | ||
1469 | .comp = { | ||
1470 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
1471 | { 1, 2, 0, 0, 12 }, /* U */ | ||
1472 | { 2, 2, 0, 0, 12 }, /* V */ | ||
1473 | }, | ||
1474 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1475 | }, | ||
1476 | [AV_PIX_FMT_YUV420P12BE] = { | ||
1477 | .name = "yuv420p12be", | ||
1478 | .nb_components = 3, | ||
1479 | .log2_chroma_w = 1, | ||
1480 | .log2_chroma_h = 1, | ||
1481 | .comp = { | ||
1482 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
1483 | { 1, 2, 0, 0, 12 }, /* U */ | ||
1484 | { 2, 2, 0, 0, 12 }, /* V */ | ||
1485 | }, | ||
1486 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1487 | }, | ||
1488 | [AV_PIX_FMT_YUV420P14LE] = { | ||
1489 | .name = "yuv420p14le", | ||
1490 | .nb_components = 3, | ||
1491 | .log2_chroma_w = 1, | ||
1492 | .log2_chroma_h = 1, | ||
1493 | .comp = { | ||
1494 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
1495 | { 1, 2, 0, 0, 14 }, /* U */ | ||
1496 | { 2, 2, 0, 0, 14 }, /* V */ | ||
1497 | }, | ||
1498 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1499 | }, | ||
1500 | [AV_PIX_FMT_YUV420P14BE] = { | ||
1501 | .name = "yuv420p14be", | ||
1502 | .nb_components = 3, | ||
1503 | .log2_chroma_w = 1, | ||
1504 | .log2_chroma_h = 1, | ||
1505 | .comp = { | ||
1506 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
1507 | { 1, 2, 0, 0, 14 }, /* U */ | ||
1508 | { 2, 2, 0, 0, 14 }, /* V */ | ||
1509 | }, | ||
1510 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1511 | }, | ||
1512 | [AV_PIX_FMT_YUV420P16LE] = { | ||
1513 | .name = "yuv420p16le", | ||
1514 | .nb_components = 3, | ||
1515 | .log2_chroma_w = 1, | ||
1516 | .log2_chroma_h = 1, | ||
1517 | .comp = { | ||
1518 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1519 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1520 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1521 | }, | ||
1522 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1523 | }, | ||
1524 | [AV_PIX_FMT_YUV420P16BE] = { | ||
1525 | .name = "yuv420p16be", | ||
1526 | .nb_components = 3, | ||
1527 | .log2_chroma_w = 1, | ||
1528 | .log2_chroma_h = 1, | ||
1529 | .comp = { | ||
1530 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1531 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1532 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1533 | }, | ||
1534 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1535 | }, | ||
1536 | [AV_PIX_FMT_YUV422P9LE] = { | ||
1537 | .name = "yuv422p9le", | ||
1538 | .nb_components = 3, | ||
1539 | .log2_chroma_w = 1, | ||
1540 | .log2_chroma_h = 0, | ||
1541 | .comp = { | ||
1542 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1543 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1544 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1545 | }, | ||
1546 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1547 | }, | ||
1548 | [AV_PIX_FMT_YUV422P9BE] = { | ||
1549 | .name = "yuv422p9be", | ||
1550 | .nb_components = 3, | ||
1551 | .log2_chroma_w = 1, | ||
1552 | .log2_chroma_h = 0, | ||
1553 | .comp = { | ||
1554 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1555 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1556 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1557 | }, | ||
1558 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1559 | }, | ||
1560 | [AV_PIX_FMT_YUV422P10LE] = { | ||
1561 | .name = "yuv422p10le", | ||
1562 | .nb_components = 3, | ||
1563 | .log2_chroma_w = 1, | ||
1564 | .log2_chroma_h = 0, | ||
1565 | .comp = { | ||
1566 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1567 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1568 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1569 | }, | ||
1570 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1571 | }, | ||
1572 | [AV_PIX_FMT_YUV422P10BE] = { | ||
1573 | .name = "yuv422p10be", | ||
1574 | .nb_components = 3, | ||
1575 | .log2_chroma_w = 1, | ||
1576 | .log2_chroma_h = 0, | ||
1577 | .comp = { | ||
1578 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1579 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1580 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1581 | }, | ||
1582 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1583 | }, | ||
1584 | [AV_PIX_FMT_YUV422P12LE] = { | ||
1585 | .name = "yuv422p12le", | ||
1586 | .nb_components = 3, | ||
1587 | .log2_chroma_w = 1, | ||
1588 | .log2_chroma_h = 0, | ||
1589 | .comp = { | ||
1590 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
1591 | { 1, 2, 0, 0, 12 }, /* U */ | ||
1592 | { 2, 2, 0, 0, 12 }, /* V */ | ||
1593 | }, | ||
1594 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1595 | }, | ||
1596 | [AV_PIX_FMT_YUV422P12BE] = { | ||
1597 | .name = "yuv422p12be", | ||
1598 | .nb_components = 3, | ||
1599 | .log2_chroma_w = 1, | ||
1600 | .log2_chroma_h = 0, | ||
1601 | .comp = { | ||
1602 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
1603 | { 1, 2, 0, 0, 12 }, /* U */ | ||
1604 | { 2, 2, 0, 0, 12 }, /* V */ | ||
1605 | }, | ||
1606 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1607 | }, | ||
1608 | [AV_PIX_FMT_YUV422P14LE] = { | ||
1609 | .name = "yuv422p14le", | ||
1610 | .nb_components = 3, | ||
1611 | .log2_chroma_w = 1, | ||
1612 | .log2_chroma_h = 0, | ||
1613 | .comp = { | ||
1614 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
1615 | { 1, 2, 0, 0, 14 }, /* U */ | ||
1616 | { 2, 2, 0, 0, 14 }, /* V */ | ||
1617 | }, | ||
1618 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1619 | }, | ||
1620 | [AV_PIX_FMT_YUV422P14BE] = { | ||
1621 | .name = "yuv422p14be", | ||
1622 | .nb_components = 3, | ||
1623 | .log2_chroma_w = 1, | ||
1624 | .log2_chroma_h = 0, | ||
1625 | .comp = { | ||
1626 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
1627 | { 1, 2, 0, 0, 14 }, /* U */ | ||
1628 | { 2, 2, 0, 0, 14 }, /* V */ | ||
1629 | }, | ||
1630 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1631 | }, | ||
1632 | [AV_PIX_FMT_YUV422P16LE] = { | ||
1633 | .name = "yuv422p16le", | ||
1634 | .nb_components = 3, | ||
1635 | .log2_chroma_w = 1, | ||
1636 | .log2_chroma_h = 0, | ||
1637 | .comp = { | ||
1638 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1639 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1640 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1641 | }, | ||
1642 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1643 | }, | ||
1644 | [AV_PIX_FMT_YUV422P16BE] = { | ||
1645 | .name = "yuv422p16be", | ||
1646 | .nb_components = 3, | ||
1647 | .log2_chroma_w = 1, | ||
1648 | .log2_chroma_h = 0, | ||
1649 | .comp = { | ||
1650 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1651 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1652 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1653 | }, | ||
1654 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1655 | }, | ||
1656 | [AV_PIX_FMT_YUV444P16LE] = { | ||
1657 | .name = "yuv444p16le", | ||
1658 | .nb_components = 3, | ||
1659 | .log2_chroma_w = 0, | ||
1660 | .log2_chroma_h = 0, | ||
1661 | .comp = { | ||
1662 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1663 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1664 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1665 | }, | ||
1666 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1667 | }, | ||
1668 | [AV_PIX_FMT_YUV444P16BE] = { | ||
1669 | .name = "yuv444p16be", | ||
1670 | .nb_components = 3, | ||
1671 | .log2_chroma_w = 0, | ||
1672 | .log2_chroma_h = 0, | ||
1673 | .comp = { | ||
1674 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
1675 | { 1, 2, 0, 0, 16 }, /* U */ | ||
1676 | { 2, 2, 0, 0, 16 }, /* V */ | ||
1677 | }, | ||
1678 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1679 | }, | ||
1680 | [AV_PIX_FMT_YUV444P10LE] = { | ||
1681 | .name = "yuv444p10le", | ||
1682 | .nb_components = 3, | ||
1683 | .log2_chroma_w = 0, | ||
1684 | .log2_chroma_h = 0, | ||
1685 | .comp = { | ||
1686 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1687 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1688 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1689 | }, | ||
1690 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1691 | }, | ||
1692 | [AV_PIX_FMT_YUV444P10BE] = { | ||
1693 | .name = "yuv444p10be", | ||
1694 | .nb_components = 3, | ||
1695 | .log2_chroma_w = 0, | ||
1696 | .log2_chroma_h = 0, | ||
1697 | .comp = { | ||
1698 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
1699 | { 1, 2, 0, 0, 10 }, /* U */ | ||
1700 | { 2, 2, 0, 0, 10 }, /* V */ | ||
1701 | }, | ||
1702 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1703 | }, | ||
1704 | [AV_PIX_FMT_YUV444P9LE] = { | ||
1705 | .name = "yuv444p9le", | ||
1706 | .nb_components = 3, | ||
1707 | .log2_chroma_w = 0, | ||
1708 | .log2_chroma_h = 0, | ||
1709 | .comp = { | ||
1710 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1711 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1712 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1713 | }, | ||
1714 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1715 | }, | ||
1716 | [AV_PIX_FMT_YUV444P9BE] = { | ||
1717 | .name = "yuv444p9be", | ||
1718 | .nb_components = 3, | ||
1719 | .log2_chroma_w = 0, | ||
1720 | .log2_chroma_h = 0, | ||
1721 | .comp = { | ||
1722 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
1723 | { 1, 2, 0, 0, 9 }, /* U */ | ||
1724 | { 2, 2, 0, 0, 9 }, /* V */ | ||
1725 | }, | ||
1726 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1727 | }, | ||
1728 | [AV_PIX_FMT_YUV444P12LE] = { | ||
1729 | .name = "yuv444p12le", | ||
1730 | .nb_components = 3, | ||
1731 | .log2_chroma_w = 0, | ||
1732 | .log2_chroma_h = 0, | ||
1733 | .comp = { | ||
1734 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
1735 | { 1, 2, 0, 0, 12 }, /* U */ | ||
1736 | { 2, 2, 0, 0, 12 }, /* V */ | ||
1737 | }, | ||
1738 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1739 | }, | ||
1740 | [AV_PIX_FMT_YUV444P12BE] = { | ||
1741 | .name = "yuv444p12be", | ||
1742 | .nb_components = 3, | ||
1743 | .log2_chroma_w = 0, | ||
1744 | .log2_chroma_h = 0, | ||
1745 | .comp = { | ||
1746 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
1747 | { 1, 2, 0, 0, 12 }, /* U */ | ||
1748 | { 2, 2, 0, 0, 12 }, /* V */ | ||
1749 | }, | ||
1750 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1751 | }, | ||
1752 | [AV_PIX_FMT_YUV444P14LE] = { | ||
1753 | .name = "yuv444p14le", | ||
1754 | .nb_components = 3, | ||
1755 | .log2_chroma_w = 0, | ||
1756 | .log2_chroma_h = 0, | ||
1757 | .comp = { | ||
1758 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
1759 | { 1, 2, 0, 0, 14 }, /* U */ | ||
1760 | { 2, 2, 0, 0, 14 }, /* V */ | ||
1761 | }, | ||
1762 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
1763 | }, | ||
1764 | [AV_PIX_FMT_YUV444P14BE] = { | ||
1765 | .name = "yuv444p14be", | ||
1766 | .nb_components = 3, | ||
1767 | .log2_chroma_w = 0, | ||
1768 | .log2_chroma_h = 0, | ||
1769 | .comp = { | ||
1770 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
1771 | { 1, 2, 0, 0, 14 }, /* U */ | ||
1772 | { 2, 2, 0, 0, 14 }, /* V */ | ||
1773 | }, | ||
1774 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
1775 | }, | ||
1776 | [AV_PIX_FMT_D3D11VA_VLD] = { | ||
1777 | .name = "d3d11va_vld", | ||
1778 | .log2_chroma_w = 1, | ||
1779 | .log2_chroma_h = 1, | ||
1780 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
1781 | }, | ||
1782 | [AV_PIX_FMT_DXVA2_VLD] = { | ||
1783 | .name = "dxva2_vld", | ||
1784 | .log2_chroma_w = 1, | ||
1785 | .log2_chroma_h = 1, | ||
1786 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
1787 | }, | ||
1788 | [AV_PIX_FMT_YA8] = { | ||
1789 | .name = "ya8", | ||
1790 | .nb_components = 2, | ||
1791 | .comp = { | ||
1792 | { 0, 2, 0, 0, 8 }, /* Y */ | ||
1793 | { 0, 2, 1, 0, 8 }, /* A */ | ||
1794 | }, | ||
1795 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
1796 | .alias = "gray8a", | ||
1797 | }, | ||
1798 | [AV_PIX_FMT_YA16LE] = { | ||
1799 | .name = "ya16le", | ||
1800 | .nb_components = 2, | ||
1801 | .comp = { | ||
1802 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
1803 | { 0, 4, 2, 0, 16 }, /* A */ | ||
1804 | }, | ||
1805 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
1806 | }, | ||
1807 | [AV_PIX_FMT_YA16BE] = { | ||
1808 | .name = "ya16be", | ||
1809 | .nb_components = 2, | ||
1810 | .comp = { | ||
1811 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
1812 | { 0, 4, 2, 0, 16 }, /* A */ | ||
1813 | }, | ||
1814 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA, | ||
1815 | }, | ||
1816 | [AV_PIX_FMT_VIDEOTOOLBOX] = { | ||
1817 | .name = "videotoolbox_vld", | ||
1818 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
1819 | }, | ||
1820 | [AV_PIX_FMT_GBRP] = { | ||
1821 | .name = "gbrp", | ||
1822 | .nb_components = 3, | ||
1823 | .log2_chroma_w = 0, | ||
1824 | .log2_chroma_h = 0, | ||
1825 | .comp = { | ||
1826 | { 2, 1, 0, 0, 8 }, /* R */ | ||
1827 | { 0, 1, 0, 0, 8 }, /* G */ | ||
1828 | { 1, 1, 0, 0, 8 }, /* B */ | ||
1829 | }, | ||
1830 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1831 | }, | ||
1832 | [AV_PIX_FMT_GBRP9LE] = { | ||
1833 | .name = "gbrp9le", | ||
1834 | .nb_components = 3, | ||
1835 | .log2_chroma_w = 0, | ||
1836 | .log2_chroma_h = 0, | ||
1837 | .comp = { | ||
1838 | { 2, 2, 0, 0, 9 }, /* R */ | ||
1839 | { 0, 2, 0, 0, 9 }, /* G */ | ||
1840 | { 1, 2, 0, 0, 9 }, /* B */ | ||
1841 | }, | ||
1842 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1843 | }, | ||
1844 | [AV_PIX_FMT_GBRP9BE] = { | ||
1845 | .name = "gbrp9be", | ||
1846 | .nb_components = 3, | ||
1847 | .log2_chroma_w = 0, | ||
1848 | .log2_chroma_h = 0, | ||
1849 | .comp = { | ||
1850 | { 2, 2, 0, 0, 9 }, /* R */ | ||
1851 | { 0, 2, 0, 0, 9 }, /* G */ | ||
1852 | { 1, 2, 0, 0, 9 }, /* B */ | ||
1853 | }, | ||
1854 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1855 | }, | ||
1856 | [AV_PIX_FMT_GBRP10LE] = { | ||
1857 | .name = "gbrp10le", | ||
1858 | .nb_components = 3, | ||
1859 | .log2_chroma_w = 0, | ||
1860 | .log2_chroma_h = 0, | ||
1861 | .comp = { | ||
1862 | { 2, 2, 0, 0, 10 }, /* R */ | ||
1863 | { 0, 2, 0, 0, 10 }, /* G */ | ||
1864 | { 1, 2, 0, 0, 10 }, /* B */ | ||
1865 | }, | ||
1866 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1867 | }, | ||
1868 | [AV_PIX_FMT_GBRP10BE] = { | ||
1869 | .name = "gbrp10be", | ||
1870 | .nb_components = 3, | ||
1871 | .log2_chroma_w = 0, | ||
1872 | .log2_chroma_h = 0, | ||
1873 | .comp = { | ||
1874 | { 2, 2, 0, 0, 10 }, /* R */ | ||
1875 | { 0, 2, 0, 0, 10 }, /* G */ | ||
1876 | { 1, 2, 0, 0, 10 }, /* B */ | ||
1877 | }, | ||
1878 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1879 | }, | ||
1880 | [AV_PIX_FMT_GBRP12LE] = { | ||
1881 | .name = "gbrp12le", | ||
1882 | .nb_components = 3, | ||
1883 | .log2_chroma_w = 0, | ||
1884 | .log2_chroma_h = 0, | ||
1885 | .comp = { | ||
1886 | { 2, 2, 0, 0, 12 }, /* R */ | ||
1887 | { 0, 2, 0, 0, 12 }, /* G */ | ||
1888 | { 1, 2, 0, 0, 12 }, /* B */ | ||
1889 | }, | ||
1890 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1891 | }, | ||
1892 | [AV_PIX_FMT_GBRP12BE] = { | ||
1893 | .name = "gbrp12be", | ||
1894 | .nb_components = 3, | ||
1895 | .log2_chroma_w = 0, | ||
1896 | .log2_chroma_h = 0, | ||
1897 | .comp = { | ||
1898 | { 2, 2, 0, 0, 12 }, /* R */ | ||
1899 | { 0, 2, 0, 0, 12 }, /* G */ | ||
1900 | { 1, 2, 0, 0, 12 }, /* B */ | ||
1901 | }, | ||
1902 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1903 | }, | ||
1904 | [AV_PIX_FMT_GBRP14LE] = { | ||
1905 | .name = "gbrp14le", | ||
1906 | .nb_components = 3, | ||
1907 | .log2_chroma_w = 0, | ||
1908 | .log2_chroma_h = 0, | ||
1909 | .comp = { | ||
1910 | { 2, 2, 0, 0, 14 }, /* R */ | ||
1911 | { 0, 2, 0, 0, 14 }, /* G */ | ||
1912 | { 1, 2, 0, 0, 14 }, /* B */ | ||
1913 | }, | ||
1914 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1915 | }, | ||
1916 | [AV_PIX_FMT_GBRP14BE] = { | ||
1917 | .name = "gbrp14be", | ||
1918 | .nb_components = 3, | ||
1919 | .log2_chroma_w = 0, | ||
1920 | .log2_chroma_h = 0, | ||
1921 | .comp = { | ||
1922 | { 2, 2, 0, 0, 14 }, /* R */ | ||
1923 | { 0, 2, 0, 0, 14 }, /* G */ | ||
1924 | { 1, 2, 0, 0, 14 }, /* B */ | ||
1925 | }, | ||
1926 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1927 | }, | ||
1928 | [AV_PIX_FMT_GBRP16LE] = { | ||
1929 | .name = "gbrp16le", | ||
1930 | .nb_components = 3, | ||
1931 | .log2_chroma_w = 0, | ||
1932 | .log2_chroma_h = 0, | ||
1933 | .comp = { | ||
1934 | { 2, 2, 0, 0, 16 }, /* R */ | ||
1935 | { 0, 2, 0, 0, 16 }, /* G */ | ||
1936 | { 1, 2, 0, 0, 16 }, /* B */ | ||
1937 | }, | ||
1938 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1939 | }, | ||
1940 | [AV_PIX_FMT_GBRP16BE] = { | ||
1941 | .name = "gbrp16be", | ||
1942 | .nb_components = 3, | ||
1943 | .log2_chroma_w = 0, | ||
1944 | .log2_chroma_h = 0, | ||
1945 | .comp = { | ||
1946 | { 2, 2, 0, 0, 16 }, /* R */ | ||
1947 | { 0, 2, 0, 0, 16 }, /* G */ | ||
1948 | { 1, 2, 0, 0, 16 }, /* B */ | ||
1949 | }, | ||
1950 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
1951 | }, | ||
1952 | [AV_PIX_FMT_GBRAP] = { | ||
1953 | .name = "gbrap", | ||
1954 | .nb_components = 4, | ||
1955 | .log2_chroma_w = 0, | ||
1956 | .log2_chroma_h = 0, | ||
1957 | .comp = { | ||
1958 | { 2, 1, 0, 0, 8 }, /* R */ | ||
1959 | { 0, 1, 0, 0, 8 }, /* G */ | ||
1960 | { 1, 1, 0, 0, 8 }, /* B */ | ||
1961 | { 3, 1, 0, 0, 8 }, /* A */ | ||
1962 | }, | ||
1963 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
1964 | AV_PIX_FMT_FLAG_ALPHA, | ||
1965 | }, | ||
1966 | [AV_PIX_FMT_GBRAP16LE] = { | ||
1967 | .name = "gbrap16le", | ||
1968 | .nb_components = 4, | ||
1969 | .log2_chroma_w = 0, | ||
1970 | .log2_chroma_h = 0, | ||
1971 | .comp = { | ||
1972 | { 2, 2, 0, 0, 16 }, /* R */ | ||
1973 | { 0, 2, 0, 0, 16 }, /* G */ | ||
1974 | { 1, 2, 0, 0, 16 }, /* B */ | ||
1975 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1976 | }, | ||
1977 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
1978 | AV_PIX_FMT_FLAG_ALPHA, | ||
1979 | }, | ||
1980 | [AV_PIX_FMT_GBRAP16BE] = { | ||
1981 | .name = "gbrap16be", | ||
1982 | .nb_components = 4, | ||
1983 | .log2_chroma_w = 0, | ||
1984 | .log2_chroma_h = 0, | ||
1985 | .comp = { | ||
1986 | { 2, 2, 0, 0, 16 }, /* R */ | ||
1987 | { 0, 2, 0, 0, 16 }, /* G */ | ||
1988 | { 1, 2, 0, 0, 16 }, /* B */ | ||
1989 | { 3, 2, 0, 0, 16 }, /* A */ | ||
1990 | }, | ||
1991 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
1992 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
1993 | }, | ||
1994 | [AV_PIX_FMT_VDPAU] = { | ||
1995 | .name = "vdpau", | ||
1996 | .log2_chroma_w = 1, | ||
1997 | .log2_chroma_h = 1, | ||
1998 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
1999 | }, | ||
2000 | [AV_PIX_FMT_XYZ12LE] = { | ||
2001 | .name = "xyz12le", | ||
2002 | .nb_components = 3, | ||
2003 | .log2_chroma_w = 0, | ||
2004 | .log2_chroma_h = 0, | ||
2005 | .comp = { | ||
2006 | { 0, 6, 0, 4, 12 }, /* X */ | ||
2007 | { 0, 6, 2, 4, 12 }, /* Y */ | ||
2008 | { 0, 6, 4, 4, 12 }, /* Z */ | ||
2009 | }, | ||
2010 | .flags = AV_PIX_FMT_FLAG_XYZ, | ||
2011 | }, | ||
2012 | [AV_PIX_FMT_XYZ12BE] = { | ||
2013 | .name = "xyz12be", | ||
2014 | .nb_components = 3, | ||
2015 | .log2_chroma_w = 0, | ||
2016 | .log2_chroma_h = 0, | ||
2017 | .comp = { | ||
2018 | { 0, 6, 0, 4, 12 }, /* X */ | ||
2019 | { 0, 6, 2, 4, 12 }, /* Y */ | ||
2020 | { 0, 6, 4, 4, 12 }, /* Z */ | ||
2021 | }, | ||
2022 | .flags = AV_PIX_FMT_FLAG_XYZ | AV_PIX_FMT_FLAG_BE, | ||
2023 | }, | ||
2024 | |||
2025 | #define BAYER8_DESC_COMMON \ | ||
2026 | .nb_components= 3, \ | ||
2027 | .log2_chroma_w= 0, \ | ||
2028 | .log2_chroma_h= 0, \ | ||
2029 | .comp = { \ | ||
2030 | { 0, 1, 0, 0, 2 }, \ | ||
2031 | { 0, 1, 0, 0, 4 }, \ | ||
2032 | { 0, 1, 0, 0, 2 }, \ | ||
2033 | }, \ | ||
2034 | |||
2035 | #define BAYER16_DESC_COMMON \ | ||
2036 | .nb_components= 3, \ | ||
2037 | .log2_chroma_w= 0, \ | ||
2038 | .log2_chroma_h= 0, \ | ||
2039 | .comp = { \ | ||
2040 | { 0, 2, 0, 0, 4 }, \ | ||
2041 | { 0, 2, 0, 0, 8 }, \ | ||
2042 | { 0, 2, 0, 0, 4 }, \ | ||
2043 | }, \ | ||
2044 | |||
2045 | [AV_PIX_FMT_BAYER_BGGR8] = { | ||
2046 | .name = "bayer_bggr8", | ||
2047 | BAYER8_DESC_COMMON | ||
2048 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2049 | }, | ||
2050 | [AV_PIX_FMT_BAYER_BGGR16LE] = { | ||
2051 | .name = "bayer_bggr16le", | ||
2052 | BAYER16_DESC_COMMON | ||
2053 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2054 | }, | ||
2055 | [AV_PIX_FMT_BAYER_BGGR16BE] = { | ||
2056 | .name = "bayer_bggr16be", | ||
2057 | BAYER16_DESC_COMMON | ||
2058 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2059 | }, | ||
2060 | [AV_PIX_FMT_BAYER_RGGB8] = { | ||
2061 | .name = "bayer_rggb8", | ||
2062 | BAYER8_DESC_COMMON | ||
2063 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2064 | }, | ||
2065 | [AV_PIX_FMT_BAYER_RGGB16LE] = { | ||
2066 | .name = "bayer_rggb16le", | ||
2067 | BAYER16_DESC_COMMON | ||
2068 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2069 | }, | ||
2070 | [AV_PIX_FMT_BAYER_RGGB16BE] = { | ||
2071 | .name = "bayer_rggb16be", | ||
2072 | BAYER16_DESC_COMMON | ||
2073 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2074 | }, | ||
2075 | [AV_PIX_FMT_BAYER_GBRG8] = { | ||
2076 | .name = "bayer_gbrg8", | ||
2077 | BAYER8_DESC_COMMON | ||
2078 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2079 | }, | ||
2080 | [AV_PIX_FMT_BAYER_GBRG16LE] = { | ||
2081 | .name = "bayer_gbrg16le", | ||
2082 | BAYER16_DESC_COMMON | ||
2083 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2084 | }, | ||
2085 | [AV_PIX_FMT_BAYER_GBRG16BE] = { | ||
2086 | .name = "bayer_gbrg16be", | ||
2087 | BAYER16_DESC_COMMON | ||
2088 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2089 | }, | ||
2090 | [AV_PIX_FMT_BAYER_GRBG8] = { | ||
2091 | .name = "bayer_grbg8", | ||
2092 | BAYER8_DESC_COMMON | ||
2093 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2094 | }, | ||
2095 | [AV_PIX_FMT_BAYER_GRBG16LE] = { | ||
2096 | .name = "bayer_grbg16le", | ||
2097 | BAYER16_DESC_COMMON | ||
2098 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2099 | }, | ||
2100 | [AV_PIX_FMT_BAYER_GRBG16BE] = { | ||
2101 | .name = "bayer_grbg16be", | ||
2102 | BAYER16_DESC_COMMON | ||
2103 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
2104 | }, | ||
2105 | [AV_PIX_FMT_NV16] = { | ||
2106 | .name = "nv16", | ||
2107 | .nb_components = 3, | ||
2108 | .log2_chroma_w = 1, | ||
2109 | .log2_chroma_h = 0, | ||
2110 | .comp = { | ||
2111 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
2112 | { 1, 2, 0, 0, 8 }, /* U */ | ||
2113 | { 1, 2, 1, 0, 8 }, /* V */ | ||
2114 | }, | ||
2115 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2116 | }, | ||
2117 | [AV_PIX_FMT_NV20LE] = { | ||
2118 | .name = "nv20le", | ||
2119 | .nb_components = 3, | ||
2120 | .log2_chroma_w = 1, | ||
2121 | .log2_chroma_h = 0, | ||
2122 | .comp = { | ||
2123 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
2124 | { 1, 4, 0, 0, 10 }, /* U */ | ||
2125 | { 1, 4, 2, 0, 10 }, /* V */ | ||
2126 | }, | ||
2127 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2128 | }, | ||
2129 | [AV_PIX_FMT_NV20BE] = { | ||
2130 | .name = "nv20be", | ||
2131 | .nb_components = 3, | ||
2132 | .log2_chroma_w = 1, | ||
2133 | .log2_chroma_h = 0, | ||
2134 | .comp = { | ||
2135 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
2136 | { 1, 4, 0, 0, 10 }, /* U */ | ||
2137 | { 1, 4, 2, 0, 10 }, /* V */ | ||
2138 | }, | ||
2139 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2140 | }, | ||
2141 | [AV_PIX_FMT_QSV] = { | ||
2142 | .name = "qsv", | ||
2143 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2144 | }, | ||
2145 | [AV_PIX_FMT_MEDIACODEC] = { | ||
2146 | .name = "mediacodec", | ||
2147 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2148 | }, | ||
2149 | [AV_PIX_FMT_MMAL] = { | ||
2150 | .name = "mmal", | ||
2151 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2152 | }, | ||
2153 | [AV_PIX_FMT_CUDA] = { | ||
2154 | .name = "cuda", | ||
2155 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2156 | }, | ||
2157 | [AV_PIX_FMT_AMF_SURFACE] = { | ||
2158 | .name = "amf", | ||
2159 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2160 | }, | ||
2161 | [AV_PIX_FMT_VYU444] = { | ||
2162 | .name = "vyu444", | ||
2163 | .nb_components = 3, | ||
2164 | .log2_chroma_w = 0, | ||
2165 | .log2_chroma_h = 0, | ||
2166 | .comp = { | ||
2167 | { 0, 3, 1, 0, 8 }, /* Y */ | ||
2168 | { 0, 3, 2, 0, 8 }, /* U */ | ||
2169 | { 0, 3, 0, 0, 8 }, /* V */ | ||
2170 | }, | ||
2171 | }, | ||
2172 | [AV_PIX_FMT_UYVA] = { | ||
2173 | .name = "uyva", | ||
2174 | .nb_components = 4, | ||
2175 | .log2_chroma_w = 0, | ||
2176 | .log2_chroma_h = 0, | ||
2177 | .comp = { | ||
2178 | { 0, 4, 1, 0, 8 }, /* Y */ | ||
2179 | { 0, 4, 0, 0, 8 }, /* U */ | ||
2180 | { 0, 4, 2, 0, 8 }, /* V */ | ||
2181 | { 0, 4, 3, 0, 8 }, /* A */ | ||
2182 | }, | ||
2183 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
2184 | }, | ||
2185 | [AV_PIX_FMT_AYUV] = { | ||
2186 | .name = "ayuv", | ||
2187 | .nb_components = 4, | ||
2188 | .log2_chroma_w = 0, | ||
2189 | .log2_chroma_h = 0, | ||
2190 | .comp = { | ||
2191 | { 0, 4, 1, 0, 8 }, /* Y */ | ||
2192 | { 0, 4, 2, 0, 8 }, /* U */ | ||
2193 | { 0, 4, 3, 0, 8 }, /* V */ | ||
2194 | { 0, 4, 0, 0, 8 }, /* A */ | ||
2195 | }, | ||
2196 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
2197 | }, | ||
2198 | [AV_PIX_FMT_AYUV64LE] = { | ||
2199 | .name = "ayuv64le", | ||
2200 | .nb_components = 4, | ||
2201 | .log2_chroma_w = 0, | ||
2202 | .log2_chroma_h = 0, | ||
2203 | .comp = { | ||
2204 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
2205 | { 0, 8, 4, 0, 16 }, /* U */ | ||
2206 | { 0, 8, 6, 0, 16 }, /* V */ | ||
2207 | { 0, 8, 0, 0, 16 }, /* A */ | ||
2208 | }, | ||
2209 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
2210 | }, | ||
2211 | [AV_PIX_FMT_AYUV64BE] = { | ||
2212 | .name = "ayuv64be", | ||
2213 | .nb_components = 4, | ||
2214 | .log2_chroma_w = 0, | ||
2215 | .log2_chroma_h = 0, | ||
2216 | .comp = { | ||
2217 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
2218 | { 0, 8, 4, 0, 16 }, /* U */ | ||
2219 | { 0, 8, 6, 0, 16 }, /* V */ | ||
2220 | { 0, 8, 0, 0, 16 }, /* A */ | ||
2221 | }, | ||
2222 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA, | ||
2223 | }, | ||
2224 | [AV_PIX_FMT_P010LE] = { | ||
2225 | .name = "p010le", | ||
2226 | .nb_components = 3, | ||
2227 | .log2_chroma_w = 1, | ||
2228 | .log2_chroma_h = 1, | ||
2229 | .comp = { | ||
2230 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
2231 | { 1, 4, 0, 6, 10 }, /* U */ | ||
2232 | { 1, 4, 2, 6, 10 }, /* V */ | ||
2233 | }, | ||
2234 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2235 | }, | ||
2236 | [AV_PIX_FMT_P010BE] = { | ||
2237 | .name = "p010be", | ||
2238 | .nb_components = 3, | ||
2239 | .log2_chroma_w = 1, | ||
2240 | .log2_chroma_h = 1, | ||
2241 | .comp = { | ||
2242 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
2243 | { 1, 4, 0, 6, 10 }, /* U */ | ||
2244 | { 1, 4, 2, 6, 10 }, /* V */ | ||
2245 | }, | ||
2246 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2247 | }, | ||
2248 | [AV_PIX_FMT_P012LE] = { | ||
2249 | .name = "p012le", | ||
2250 | .nb_components = 3, | ||
2251 | .log2_chroma_w = 1, | ||
2252 | .log2_chroma_h = 1, | ||
2253 | .comp = { | ||
2254 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
2255 | { 1, 4, 0, 4, 12 }, /* U */ | ||
2256 | { 1, 4, 2, 4, 12 }, /* V */ | ||
2257 | }, | ||
2258 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2259 | }, | ||
2260 | [AV_PIX_FMT_P012BE] = { | ||
2261 | .name = "p012be", | ||
2262 | .nb_components = 3, | ||
2263 | .log2_chroma_w = 1, | ||
2264 | .log2_chroma_h = 1, | ||
2265 | .comp = { | ||
2266 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
2267 | { 1, 4, 0, 4, 12 }, /* U */ | ||
2268 | { 1, 4, 2, 4, 12 }, /* V */ | ||
2269 | }, | ||
2270 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2271 | }, | ||
2272 | [AV_PIX_FMT_P016LE] = { | ||
2273 | .name = "p016le", | ||
2274 | .nb_components = 3, | ||
2275 | .log2_chroma_w = 1, | ||
2276 | .log2_chroma_h = 1, | ||
2277 | .comp = { | ||
2278 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2279 | { 1, 4, 0, 0, 16 }, /* U */ | ||
2280 | { 1, 4, 2, 0, 16 }, /* V */ | ||
2281 | }, | ||
2282 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2283 | }, | ||
2284 | [AV_PIX_FMT_P016BE] = { | ||
2285 | .name = "p016be", | ||
2286 | .nb_components = 3, | ||
2287 | .log2_chroma_w = 1, | ||
2288 | .log2_chroma_h = 1, | ||
2289 | .comp = { | ||
2290 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2291 | { 1, 4, 0, 0, 16 }, /* U */ | ||
2292 | { 1, 4, 2, 0, 16 }, /* V */ | ||
2293 | }, | ||
2294 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2295 | }, | ||
2296 | [AV_PIX_FMT_GBRAP14LE] = { | ||
2297 | .name = "gbrap14le", | ||
2298 | .nb_components = 4, | ||
2299 | .log2_chroma_w = 0, | ||
2300 | .log2_chroma_h = 0, | ||
2301 | .comp = { | ||
2302 | { 2, 2, 0, 0, 14 }, /* R */ | ||
2303 | { 0, 2, 0, 0, 14 }, /* G */ | ||
2304 | { 1, 2, 0, 0, 14 }, /* B */ | ||
2305 | { 3, 2, 0, 0, 14 }, /* A */ | ||
2306 | }, | ||
2307 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
2308 | AV_PIX_FMT_FLAG_ALPHA, | ||
2309 | }, | ||
2310 | [AV_PIX_FMT_GBRAP14BE] = { | ||
2311 | .name = "gbrap14be", | ||
2312 | .nb_components = 4, | ||
2313 | .log2_chroma_w = 0, | ||
2314 | .log2_chroma_h = 0, | ||
2315 | .comp = { | ||
2316 | { 2, 2, 0, 0, 14 }, /* R */ | ||
2317 | { 0, 2, 0, 0, 14 }, /* G */ | ||
2318 | { 1, 2, 0, 0, 14 }, /* B */ | ||
2319 | { 3, 2, 0, 0, 14 }, /* A */ | ||
2320 | }, | ||
2321 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2322 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
2323 | }, | ||
2324 | [AV_PIX_FMT_GBRAP12LE] = { | ||
2325 | .name = "gbrap12le", | ||
2326 | .nb_components = 4, | ||
2327 | .log2_chroma_w = 0, | ||
2328 | .log2_chroma_h = 0, | ||
2329 | .comp = { | ||
2330 | { 2, 2, 0, 0, 12 }, /* R */ | ||
2331 | { 0, 2, 0, 0, 12 }, /* G */ | ||
2332 | { 1, 2, 0, 0, 12 }, /* B */ | ||
2333 | { 3, 2, 0, 0, 12 }, /* A */ | ||
2334 | }, | ||
2335 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
2336 | AV_PIX_FMT_FLAG_ALPHA, | ||
2337 | }, | ||
2338 | [AV_PIX_FMT_GBRAP12BE] = { | ||
2339 | .name = "gbrap12be", | ||
2340 | .nb_components = 4, | ||
2341 | .log2_chroma_w = 0, | ||
2342 | .log2_chroma_h = 0, | ||
2343 | .comp = { | ||
2344 | { 2, 2, 0, 0, 12 }, /* R */ | ||
2345 | { 0, 2, 0, 0, 12 }, /* G */ | ||
2346 | { 1, 2, 0, 0, 12 }, /* B */ | ||
2347 | { 3, 2, 0, 0, 12 }, /* A */ | ||
2348 | }, | ||
2349 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2350 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
2351 | }, | ||
2352 | [AV_PIX_FMT_GBRAP10LE] = { | ||
2353 | .name = "gbrap10le", | ||
2354 | .nb_components = 4, | ||
2355 | .log2_chroma_w = 0, | ||
2356 | .log2_chroma_h = 0, | ||
2357 | .comp = { | ||
2358 | { 2, 2, 0, 0, 10 }, /* R */ | ||
2359 | { 0, 2, 0, 0, 10 }, /* G */ | ||
2360 | { 1, 2, 0, 0, 10 }, /* B */ | ||
2361 | { 3, 2, 0, 0, 10 }, /* A */ | ||
2362 | }, | ||
2363 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
2364 | AV_PIX_FMT_FLAG_ALPHA, | ||
2365 | }, | ||
2366 | [AV_PIX_FMT_GBRAP10BE] = { | ||
2367 | .name = "gbrap10be", | ||
2368 | .nb_components = 4, | ||
2369 | .log2_chroma_w = 0, | ||
2370 | .log2_chroma_h = 0, | ||
2371 | .comp = { | ||
2372 | { 2, 2, 0, 0, 10 }, /* R */ | ||
2373 | { 0, 2, 0, 0, 10 }, /* G */ | ||
2374 | { 1, 2, 0, 0, 10 }, /* B */ | ||
2375 | { 3, 2, 0, 0, 10 }, /* A */ | ||
2376 | }, | ||
2377 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2378 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
2379 | }, | ||
2380 | [AV_PIX_FMT_D3D11] = { | ||
2381 | .name = "d3d11", | ||
2382 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2383 | }, | ||
2384 | [AV_PIX_FMT_D3D12] = { | ||
2385 | .name = "d3d12", | ||
2386 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2387 | }, | ||
2388 | [AV_PIX_FMT_GBRPF32BE] = { | ||
2389 | .name = "gbrpf32be", | ||
2390 | .nb_components = 3, | ||
2391 | .log2_chroma_w = 0, | ||
2392 | .log2_chroma_h = 0, | ||
2393 | .comp = { | ||
2394 | { 2, 4, 0, 0, 32 }, /* R */ | ||
2395 | { 0, 4, 0, 0, 32 }, /* G */ | ||
2396 | { 1, 4, 0, 0, 32 }, /* B */ | ||
2397 | }, | ||
2398 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2399 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
2400 | }, | ||
2401 | [AV_PIX_FMT_GBRPF32LE] = { | ||
2402 | .name = "gbrpf32le", | ||
2403 | .nb_components = 3, | ||
2404 | .log2_chroma_w = 0, | ||
2405 | .log2_chroma_h = 0, | ||
2406 | .comp = { | ||
2407 | { 2, 4, 0, 0, 32 }, /* R */ | ||
2408 | { 0, 4, 0, 0, 32 }, /* G */ | ||
2409 | { 1, 4, 0, 0, 32 }, /* B */ | ||
2410 | }, | ||
2411 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_RGB, | ||
2412 | }, | ||
2413 | [AV_PIX_FMT_GBRAPF32BE] = { | ||
2414 | .name = "gbrapf32be", | ||
2415 | .nb_components = 4, | ||
2416 | .log2_chroma_w = 0, | ||
2417 | .log2_chroma_h = 0, | ||
2418 | .comp = { | ||
2419 | { 2, 4, 0, 0, 32 }, /* R */ | ||
2420 | { 0, 4, 0, 0, 32 }, /* G */ | ||
2421 | { 1, 4, 0, 0, 32 }, /* B */ | ||
2422 | { 3, 4, 0, 0, 32 }, /* A */ | ||
2423 | }, | ||
2424 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2425 | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB | | ||
2426 | AV_PIX_FMT_FLAG_FLOAT, | ||
2427 | }, | ||
2428 | [AV_PIX_FMT_GBRAPF32LE] = { | ||
2429 | .name = "gbrapf32le", | ||
2430 | .nb_components = 4, | ||
2431 | .log2_chroma_w = 0, | ||
2432 | .log2_chroma_h = 0, | ||
2433 | .comp = { | ||
2434 | { 2, 4, 0, 0, 32 }, /* R */ | ||
2435 | { 0, 4, 0, 0, 32 }, /* G */ | ||
2436 | { 1, 4, 0, 0, 32 }, /* B */ | ||
2437 | { 3, 4, 0, 0, 32 }, /* A */ | ||
2438 | }, | ||
2439 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA | | ||
2440 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
2441 | }, | ||
2442 | [AV_PIX_FMT_GBRPF16BE] = { | ||
2443 | .name = "gbrpf16be", | ||
2444 | .nb_components = 3, | ||
2445 | .log2_chroma_w = 0, | ||
2446 | .log2_chroma_h = 0, | ||
2447 | .comp = { | ||
2448 | { 2, 2, 0, 0, 16 }, /* R */ | ||
2449 | { 0, 2, 0, 0, 16 }, /* G */ | ||
2450 | { 1, 2, 0, 0, 16 }, /* B */ | ||
2451 | }, | ||
2452 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2453 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
2454 | }, | ||
2455 | [AV_PIX_FMT_GBRPF16LE] = { | ||
2456 | .name = "gbrpf16le", | ||
2457 | .nb_components = 3, | ||
2458 | .log2_chroma_w = 0, | ||
2459 | .log2_chroma_h = 0, | ||
2460 | .comp = { | ||
2461 | { 2, 2, 0, 0, 16 }, /* R */ | ||
2462 | { 0, 2, 0, 0, 16 }, /* G */ | ||
2463 | { 1, 2, 0, 0, 16 }, /* B */ | ||
2464 | }, | ||
2465 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_RGB, | ||
2466 | }, | ||
2467 | [AV_PIX_FMT_GBRAPF16BE] = { | ||
2468 | .name = "gbrapf16be", | ||
2469 | .nb_components = 4, | ||
2470 | .log2_chroma_w = 0, | ||
2471 | .log2_chroma_h = 0, | ||
2472 | .comp = { | ||
2473 | { 2, 2, 0, 0, 16 }, /* R */ | ||
2474 | { 0, 2, 0, 0, 16 }, /* G */ | ||
2475 | { 1, 2, 0, 0, 16 }, /* B */ | ||
2476 | { 3, 2, 0, 0, 16 }, /* A */ | ||
2477 | }, | ||
2478 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
2479 | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB | | ||
2480 | AV_PIX_FMT_FLAG_FLOAT, | ||
2481 | }, | ||
2482 | [AV_PIX_FMT_GBRAPF16LE] = { | ||
2483 | .name = "gbrapf16le", | ||
2484 | .nb_components = 4, | ||
2485 | .log2_chroma_w = 0, | ||
2486 | .log2_chroma_h = 0, | ||
2487 | .comp = { | ||
2488 | { 2, 2, 0, 0, 16 }, /* R */ | ||
2489 | { 0, 2, 0, 0, 16 }, /* G */ | ||
2490 | { 1, 2, 0, 0, 16 }, /* B */ | ||
2491 | { 3, 2, 0, 0, 16 }, /* A */ | ||
2492 | }, | ||
2493 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA | | ||
2494 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
2495 | }, | ||
2496 | [AV_PIX_FMT_DRM_PRIME] = { | ||
2497 | .name = "drm_prime", | ||
2498 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2499 | }, | ||
2500 | [AV_PIX_FMT_OPENCL] = { | ||
2501 | .name = "opencl", | ||
2502 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2503 | }, | ||
2504 | [AV_PIX_FMT_GRAYF32BE] = { | ||
2505 | .name = "grayf32be", | ||
2506 | .nb_components = 1, | ||
2507 | .log2_chroma_w = 0, | ||
2508 | .log2_chroma_h = 0, | ||
2509 | .comp = { | ||
2510 | { 0, 4, 0, 0, 32 }, /* Y */ | ||
2511 | }, | ||
2512 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT, | ||
2513 | .alias = "yf32be", | ||
2514 | }, | ||
2515 | [AV_PIX_FMT_GRAYF32LE] = { | ||
2516 | .name = "grayf32le", | ||
2517 | .nb_components = 1, | ||
2518 | .log2_chroma_w = 0, | ||
2519 | .log2_chroma_h = 0, | ||
2520 | .comp = { | ||
2521 | { 0, 4, 0, 0, 32 }, /* Y */ | ||
2522 | }, | ||
2523 | .flags = AV_PIX_FMT_FLAG_FLOAT, | ||
2524 | .alias = "yf32le", | ||
2525 | }, | ||
2526 | [AV_PIX_FMT_GRAYF16BE] = { | ||
2527 | .name = "grayf16be", | ||
2528 | .nb_components = 1, | ||
2529 | .log2_chroma_w = 0, | ||
2530 | .log2_chroma_h = 0, | ||
2531 | .comp = { | ||
2532 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2533 | }, | ||
2534 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT, | ||
2535 | }, | ||
2536 | [AV_PIX_FMT_GRAYF16LE] = { | ||
2537 | .name = "grayf16le", | ||
2538 | .nb_components = 1, | ||
2539 | .log2_chroma_w = 0, | ||
2540 | .log2_chroma_h = 0, | ||
2541 | .comp = { | ||
2542 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2543 | }, | ||
2544 | .flags = AV_PIX_FMT_FLAG_FLOAT, | ||
2545 | }, | ||
2546 | [AV_PIX_FMT_YUVA422P12BE] = { | ||
2547 | .name = "yuva422p12be", | ||
2548 | .nb_components = 4, | ||
2549 | .log2_chroma_w = 1, | ||
2550 | .log2_chroma_h = 0, | ||
2551 | .comp = { | ||
2552 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
2553 | { 1, 2, 0, 0, 12 }, /* U */ | ||
2554 | { 2, 2, 0, 0, 12 }, /* V */ | ||
2555 | { 3, 2, 0, 0, 12 }, /* A */ | ||
2556 | }, | ||
2557 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
2558 | }, | ||
2559 | [AV_PIX_FMT_YUVA422P12LE] = { | ||
2560 | .name = "yuva422p12le", | ||
2561 | .nb_components = 4, | ||
2562 | .log2_chroma_w = 1, | ||
2563 | .log2_chroma_h = 0, | ||
2564 | .comp = { | ||
2565 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
2566 | { 1, 2, 0, 0, 12 }, /* U */ | ||
2567 | { 2, 2, 0, 0, 12 }, /* V */ | ||
2568 | { 3, 2, 0, 0, 12 }, /* A */ | ||
2569 | }, | ||
2570 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
2571 | }, | ||
2572 | [AV_PIX_FMT_YUVA444P12BE] = { | ||
2573 | .name = "yuva444p12be", | ||
2574 | .nb_components = 4, | ||
2575 | .log2_chroma_w = 0, | ||
2576 | .log2_chroma_h = 0, | ||
2577 | .comp = { | ||
2578 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
2579 | { 1, 2, 0, 0, 12 }, /* U */ | ||
2580 | { 2, 2, 0, 0, 12 }, /* V */ | ||
2581 | { 3, 2, 0, 0, 12 }, /* A */ | ||
2582 | }, | ||
2583 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
2584 | }, | ||
2585 | [AV_PIX_FMT_YUVA444P12LE] = { | ||
2586 | .name = "yuva444p12le", | ||
2587 | .nb_components = 4, | ||
2588 | .log2_chroma_w = 0, | ||
2589 | .log2_chroma_h = 0, | ||
2590 | .comp = { | ||
2591 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
2592 | { 1, 2, 0, 0, 12 }, /* U */ | ||
2593 | { 2, 2, 0, 0, 12 }, /* V */ | ||
2594 | { 3, 2, 0, 0, 12 }, /* A */ | ||
2595 | }, | ||
2596 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
2597 | }, | ||
2598 | [AV_PIX_FMT_NV24] = { | ||
2599 | .name = "nv24", | ||
2600 | .nb_components = 3, | ||
2601 | .log2_chroma_w = 0, | ||
2602 | .log2_chroma_h = 0, | ||
2603 | .comp = { | ||
2604 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
2605 | { 1, 2, 0, 0, 8 }, /* U */ | ||
2606 | { 1, 2, 1, 0, 8 }, /* V */ | ||
2607 | }, | ||
2608 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2609 | }, | ||
2610 | [AV_PIX_FMT_NV42] = { | ||
2611 | .name = "nv42", | ||
2612 | .nb_components = 3, | ||
2613 | .log2_chroma_w = 0, | ||
2614 | .log2_chroma_h = 0, | ||
2615 | .comp = { | ||
2616 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
2617 | { 1, 2, 1, 0, 8 }, /* U */ | ||
2618 | { 1, 2, 0, 0, 8 }, /* V */ | ||
2619 | }, | ||
2620 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2621 | }, | ||
2622 | [AV_PIX_FMT_VULKAN] = { | ||
2623 | .name = "vulkan", | ||
2624 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
2625 | }, | ||
2626 | [AV_PIX_FMT_P210BE] = { | ||
2627 | .name = "p210be", | ||
2628 | .nb_components = 3, | ||
2629 | .log2_chroma_w = 1, | ||
2630 | .log2_chroma_h = 0, | ||
2631 | .comp = { | ||
2632 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
2633 | { 1, 4, 0, 6, 10 }, /* U */ | ||
2634 | { 1, 4, 2, 6, 10 }, /* V */ | ||
2635 | }, | ||
2636 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2637 | }, | ||
2638 | [AV_PIX_FMT_P210LE] = { | ||
2639 | .name = "p210le", | ||
2640 | .nb_components = 3, | ||
2641 | .log2_chroma_w = 1, | ||
2642 | .log2_chroma_h = 0, | ||
2643 | .comp = { | ||
2644 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
2645 | { 1, 4, 0, 6, 10 }, /* U */ | ||
2646 | { 1, 4, 2, 6, 10 }, /* V */ | ||
2647 | }, | ||
2648 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2649 | }, | ||
2650 | [AV_PIX_FMT_P410BE] = { | ||
2651 | .name = "p410be", | ||
2652 | .nb_components = 3, | ||
2653 | .log2_chroma_w = 0, | ||
2654 | .log2_chroma_h = 0, | ||
2655 | .comp = { | ||
2656 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
2657 | { 1, 4, 0, 6, 10 }, /* U */ | ||
2658 | { 1, 4, 2, 6, 10 }, /* V */ | ||
2659 | }, | ||
2660 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2661 | }, | ||
2662 | [AV_PIX_FMT_P410LE] = { | ||
2663 | .name = "p410le", | ||
2664 | .nb_components = 3, | ||
2665 | .log2_chroma_w = 0, | ||
2666 | .log2_chroma_h = 0, | ||
2667 | .comp = { | ||
2668 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
2669 | { 1, 4, 0, 6, 10 }, /* U */ | ||
2670 | { 1, 4, 2, 6, 10 }, /* V */ | ||
2671 | }, | ||
2672 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2673 | }, | ||
2674 | [AV_PIX_FMT_P216BE] = { | ||
2675 | .name = "p216be", | ||
2676 | .nb_components = 3, | ||
2677 | .log2_chroma_w = 1, | ||
2678 | .log2_chroma_h = 0, | ||
2679 | .comp = { | ||
2680 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2681 | { 1, 4, 0, 0, 16 }, /* U */ | ||
2682 | { 1, 4, 2, 0, 16 }, /* V */ | ||
2683 | }, | ||
2684 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2685 | }, | ||
2686 | [AV_PIX_FMT_P216LE] = { | ||
2687 | .name = "p216le", | ||
2688 | .nb_components = 3, | ||
2689 | .log2_chroma_w = 1, | ||
2690 | .log2_chroma_h = 0, | ||
2691 | .comp = { | ||
2692 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2693 | { 1, 4, 0, 0, 16 }, /* U */ | ||
2694 | { 1, 4, 2, 0, 16 }, /* V */ | ||
2695 | }, | ||
2696 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2697 | }, | ||
2698 | [AV_PIX_FMT_P416BE] = { | ||
2699 | .name = "p416be", | ||
2700 | .nb_components = 3, | ||
2701 | .log2_chroma_w = 0, | ||
2702 | .log2_chroma_h = 0, | ||
2703 | .comp = { | ||
2704 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2705 | { 1, 4, 0, 0, 16 }, /* U */ | ||
2706 | { 1, 4, 2, 0, 16 }, /* V */ | ||
2707 | }, | ||
2708 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
2709 | }, | ||
2710 | [AV_PIX_FMT_P416LE] = { | ||
2711 | .name = "p416le", | ||
2712 | .nb_components = 3, | ||
2713 | .log2_chroma_w = 0, | ||
2714 | .log2_chroma_h = 0, | ||
2715 | .comp = { | ||
2716 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
2717 | { 1, 4, 0, 0, 16 }, /* U */ | ||
2718 | { 1, 4, 2, 0, 16 }, /* V */ | ||
2719 | }, | ||
2720 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
2721 | }, | ||
2722 | [AV_PIX_FMT_VUYA] = { | ||
2723 | .name = "vuya", | ||
2724 | .nb_components = 4, | ||
2725 | .log2_chroma_w = 0, | ||
2726 | .log2_chroma_h = 0, | ||
2727 | .comp = { | ||
2728 | { 0, 4, 2, 0, 8 }, /* Y */ | ||
2729 | { 0, 4, 1, 0, 8 }, /* U */ | ||
2730 | { 0, 4, 0, 0, 8 }, /* V */ | ||
2731 | { 0, 4, 3, 0, 8 }, /* A */ | ||
2732 | }, | ||
2733 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
2734 | }, | ||
2735 | [AV_PIX_FMT_VUYX] = { | ||
2736 | .name = "vuyx", | ||
2737 | .nb_components = 3, | ||
2738 | .log2_chroma_w = 0, | ||
2739 | .log2_chroma_h = 0, | ||
2740 | .comp = { | ||
2741 | { 0, 4, 2, 0, 8 }, /* Y */ | ||
2742 | { 0, 4, 1, 0, 8 }, /* U */ | ||
2743 | { 0, 4, 0, 0, 8 }, /* V */ | ||
2744 | { 0, 4, 3, 0, 8 }, /* X */ | ||
2745 | }, | ||
2746 | }, | ||
2747 | [AV_PIX_FMT_RGBF16BE] = { | ||
2748 | .name = "rgbf16be", | ||
2749 | .nb_components = 3, | ||
2750 | .log2_chroma_w = 0, | ||
2751 | .log2_chroma_h = 0, | ||
2752 | .comp = { | ||
2753 | { 0, 6, 0, 0, 16 }, /* R */ | ||
2754 | { 0, 6, 2, 0, 16 }, /* G */ | ||
2755 | { 0, 6, 4, 0, 16 }, /* B */ | ||
2756 | }, | ||
2757 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
2758 | AV_PIX_FMT_FLAG_FLOAT, | ||
2759 | }, | ||
2760 | [AV_PIX_FMT_RGBF16LE] = { | ||
2761 | .name = "rgbf16le", | ||
2762 | .nb_components = 3, | ||
2763 | .log2_chroma_w = 0, | ||
2764 | .log2_chroma_h = 0, | ||
2765 | .comp = { | ||
2766 | { 0, 6, 0, 0, 16 }, /* R */ | ||
2767 | { 0, 6, 2, 0, 16 }, /* G */ | ||
2768 | { 0, 6, 4, 0, 16 }, /* B */ | ||
2769 | }, | ||
2770 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT | ||
2771 | }, | ||
2772 | [AV_PIX_FMT_RGBAF16BE] = { | ||
2773 | .name = "rgbaf16be", | ||
2774 | .nb_components = 4, | ||
2775 | .log2_chroma_w = 0, | ||
2776 | .log2_chroma_h = 0, | ||
2777 | .comp = { | ||
2778 | { 0, 8, 0, 0, 16 }, /* R */ | ||
2779 | { 0, 8, 2, 0, 16 }, /* G */ | ||
2780 | { 0, 8, 4, 0, 16 }, /* B */ | ||
2781 | { 0, 8, 6, 0, 16 }, /* A */ | ||
2782 | }, | ||
2783 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
2784 | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_FLOAT, | ||
2785 | }, | ||
2786 | [AV_PIX_FMT_RGBAF16LE] = { | ||
2787 | .name = "rgbaf16le", | ||
2788 | .nb_components = 4, | ||
2789 | .log2_chroma_w = 0, | ||
2790 | .log2_chroma_h = 0, | ||
2791 | .comp = { | ||
2792 | { 0, 8, 0, 0, 16 }, /* R */ | ||
2793 | { 0, 8, 2, 0, 16 }, /* G */ | ||
2794 | { 0, 8, 4, 0, 16 }, /* B */ | ||
2795 | { 0, 8, 6, 0, 16 }, /* A */ | ||
2796 | }, | ||
2797 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA | | ||
2798 | AV_PIX_FMT_FLAG_FLOAT, | ||
2799 | }, | ||
2800 | [AV_PIX_FMT_Y212LE] = { | ||
2801 | .name = "y212le", | ||
2802 | .nb_components = 3, | ||
2803 | .log2_chroma_w = 1, | ||
2804 | .log2_chroma_h = 0, | ||
2805 | .comp = { | ||
2806 | { 0, 4, 0, 4, 12 }, /* Y */ | ||
2807 | { 0, 8, 2, 4, 12 }, /* U */ | ||
2808 | { 0, 8, 6, 4, 12 }, /* V */ | ||
2809 | }, | ||
2810 | }, | ||
2811 | [AV_PIX_FMT_Y212BE] = { | ||
2812 | .name = "y212be", | ||
2813 | .nb_components = 3, | ||
2814 | .log2_chroma_w = 1, | ||
2815 | .log2_chroma_h = 0, | ||
2816 | .comp = { | ||
2817 | { 0, 4, 0, 4, 12 }, /* Y */ | ||
2818 | { 0, 8, 2, 4, 12 }, /* U */ | ||
2819 | { 0, 8, 6, 4, 12 }, /* V */ | ||
2820 | }, | ||
2821 | .flags = AV_PIX_FMT_FLAG_BE, | ||
2822 | }, | ||
2823 | [AV_PIX_FMT_XV30LE] = { | ||
2824 | .name = "xv30le", | ||
2825 | .nb_components= 3, | ||
2826 | .log2_chroma_w= 0, | ||
2827 | .log2_chroma_h= 0, | ||
2828 | .comp = { | ||
2829 | { 0, 4, 1, 2, 10 }, /* Y */ | ||
2830 | { 0, 4, 0, 0, 10 }, /* U */ | ||
2831 | { 0, 4, 2, 4, 10 }, /* V */ | ||
2832 | { 0, 4, 3, 6, 2 }, /* X */ | ||
2833 | }, | ||
2834 | }, | ||
2835 | [AV_PIX_FMT_XV30BE] = { | ||
2836 | .name = "xv30be", | ||
2837 | .nb_components= 3, | ||
2838 | .log2_chroma_w= 0, | ||
2839 | .log2_chroma_h= 0, | ||
2840 | .comp = { | ||
2841 | { 0, 32, 10, 0, 10 }, /* Y */ | ||
2842 | { 0, 32, 0, 0, 10 }, /* U */ | ||
2843 | { 0, 32, 20, 0, 10 }, /* V */ | ||
2844 | { 0, 32, 30, 0, 2 }, /* X */ | ||
2845 | }, | ||
2846 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_BITSTREAM, | ||
2847 | }, | ||
2848 | [AV_PIX_FMT_XV36LE] = { | ||
2849 | .name = "xv36le", | ||
2850 | .nb_components= 3, | ||
2851 | .log2_chroma_w= 0, | ||
2852 | .log2_chroma_h= 0, | ||
2853 | .comp = { | ||
2854 | { 0, 8, 2, 4, 12 }, /* Y */ | ||
2855 | { 0, 8, 0, 4, 12 }, /* U */ | ||
2856 | { 0, 8, 4, 4, 12 }, /* V */ | ||
2857 | { 0, 8, 6, 4, 12 }, /* X */ | ||
2858 | }, | ||
2859 | }, | ||
2860 | [AV_PIX_FMT_XV36BE] = { | ||
2861 | .name = "xv36be", | ||
2862 | .nb_components= 3, | ||
2863 | .log2_chroma_w= 0, | ||
2864 | .log2_chroma_h= 0, | ||
2865 | .comp = { | ||
2866 | { 0, 8, 2, 4, 12 }, /* Y */ | ||
2867 | { 0, 8, 0, 4, 12 }, /* U */ | ||
2868 | { 0, 8, 4, 4, 12 }, /* V */ | ||
2869 | { 0, 8, 6, 4, 12 }, /* X */ | ||
2870 | }, | ||
2871 | .flags = AV_PIX_FMT_FLAG_BE, | ||
2872 | }, | ||
2873 | [AV_PIX_FMT_XV48LE] = { | ||
2874 | .name = "xv48le", | ||
2875 | .nb_components = 3, | ||
2876 | .log2_chroma_w = 0, | ||
2877 | .log2_chroma_h = 0, | ||
2878 | .comp = { | ||
2879 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
2880 | { 0, 8, 0, 0, 16 }, /* U */ | ||
2881 | { 0, 8, 4, 0, 16 }, /* V */ | ||
2882 | { 0, 8, 6, 0, 16 }, /* X */ | ||
2883 | }, | ||
2884 | }, | ||
2885 | [AV_PIX_FMT_XV48BE] = { | ||
2886 | .name = "xv48be", | ||
2887 | .nb_components = 3, | ||
2888 | .log2_chroma_w = 0, | ||
2889 | .log2_chroma_h = 0, | ||
2890 | .comp = { | ||
2891 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
2892 | { 0, 8, 0, 0, 16 }, /* U */ | ||
2893 | { 0, 8, 4, 0, 16 }, /* V */ | ||
2894 | { 0, 8, 6, 0, 16 }, /* X */ | ||
2895 | }, | ||
2896 | .flags = AV_PIX_FMT_FLAG_BE, | ||
2897 | }, | ||
2898 | [AV_PIX_FMT_V30XLE] = { | ||
2899 | .name = "v30xle", | ||
2900 | .nb_components = 3, | ||
2901 | .log2_chroma_w = 0, | ||
2902 | .log2_chroma_h = 0, | ||
2903 | .comp = { | ||
2904 | { 0, 4, 1, 4, 10 }, /* Y */ | ||
2905 | { 0, 4, 0, 2, 10 }, /* U */ | ||
2906 | { 0, 4, 2, 6, 10 }, /* V */ | ||
2907 | { 0, 4, 0, 0, 2 }, /* X */ | ||
2908 | }, | ||
2909 | }, | ||
2910 | [AV_PIX_FMT_V30XBE] = { | ||
2911 | .name = "v30xbe", | ||
2912 | .nb_components= 3, | ||
2913 | .log2_chroma_w= 0, | ||
2914 | .log2_chroma_h= 0, | ||
2915 | .comp = { | ||
2916 | { 0, 32, 12, 0, 10 }, /* Y */ | ||
2917 | { 0, 32, 2, 0, 10 }, /* U */ | ||
2918 | { 0, 32, 22, 0, 10 }, /* V */ | ||
2919 | { 0, 32, 0, 0, 2 }, /* X */ | ||
2920 | }, | ||
2921 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_BITSTREAM, | ||
2922 | }, | ||
2923 | [AV_PIX_FMT_RGBF32BE] = { | ||
2924 | .name = "rgbf32be", | ||
2925 | .nb_components = 3, | ||
2926 | .log2_chroma_w = 0, | ||
2927 | .log2_chroma_h = 0, | ||
2928 | .comp = { | ||
2929 | { 0, 12, 0, 0, 32 }, /* R */ | ||
2930 | { 0, 12, 4, 0, 32 }, /* G */ | ||
2931 | { 0, 12, 8, 0, 32 }, /* B */ | ||
2932 | }, | ||
2933 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
2934 | AV_PIX_FMT_FLAG_FLOAT, | ||
2935 | }, | ||
2936 | [AV_PIX_FMT_RGBF32LE] = { | ||
2937 | .name = "rgbf32le", | ||
2938 | .nb_components = 3, | ||
2939 | .log2_chroma_w = 0, | ||
2940 | .log2_chroma_h = 0, | ||
2941 | .comp = { | ||
2942 | { 0, 12, 0, 0, 32 }, /* R */ | ||
2943 | { 0, 12, 4, 0, 32 }, /* G */ | ||
2944 | { 0, 12, 8, 0, 32 }, /* B */ | ||
2945 | }, | ||
2946 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
2947 | }, | ||
2948 | [AV_PIX_FMT_RGB96BE] = { | ||
2949 | .name = "rgb96be", | ||
2950 | .nb_components = 3, | ||
2951 | .log2_chroma_w = 0, | ||
2952 | .log2_chroma_h = 0, | ||
2953 | .comp = { | ||
2954 | { 0, 12, 0, 0, 32 }, /* R */ | ||
2955 | { 0, 12, 4, 0, 32 }, /* G */ | ||
2956 | { 0, 12, 8, 0, 32 }, /* B */ | ||
2957 | }, | ||
2958 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
2959 | }, | ||
2960 | [AV_PIX_FMT_RGB96LE] = { | ||
2961 | .name = "rgb96le", | ||
2962 | .nb_components = 3, | ||
2963 | .log2_chroma_w = 0, | ||
2964 | .log2_chroma_h = 0, | ||
2965 | .comp = { | ||
2966 | { 0, 12, 0, 0, 32 }, /* R */ | ||
2967 | { 0, 12, 4, 0, 32 }, /* G */ | ||
2968 | { 0, 12, 8, 0, 32 }, /* B */ | ||
2969 | }, | ||
2970 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
2971 | }, | ||
2972 | [AV_PIX_FMT_RGBAF32BE] = { | ||
2973 | .name = "rgbaf32be", | ||
2974 | .nb_components = 4, | ||
2975 | .log2_chroma_w = 0, | ||
2976 | .log2_chroma_h = 0, | ||
2977 | .comp = { | ||
2978 | { 0, 16, 0, 0, 32 }, /* R */ | ||
2979 | { 0, 16, 4, 0, 32 }, /* G */ | ||
2980 | { 0, 16, 8, 0, 32 }, /* B */ | ||
2981 | { 0, 16, 12, 0, 32 }, /* A */ | ||
2982 | }, | ||
2983 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
2984 | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_ALPHA, | ||
2985 | }, | ||
2986 | [AV_PIX_FMT_RGBAF32LE] = { | ||
2987 | .name = "rgbaf32le", | ||
2988 | .nb_components = 4, | ||
2989 | .log2_chroma_w = 0, | ||
2990 | .log2_chroma_h = 0, | ||
2991 | .comp = { | ||
2992 | { 0, 16, 0, 0, 32 }, /* R */ | ||
2993 | { 0, 16, 4, 0, 32 }, /* G */ | ||
2994 | { 0, 16, 8, 0, 32 }, /* B */ | ||
2995 | { 0, 16, 12, 0, 32 }, /* A */ | ||
2996 | }, | ||
2997 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT | | ||
2998 | AV_PIX_FMT_FLAG_ALPHA, | ||
2999 | }, | ||
3000 | [AV_PIX_FMT_RGBA128BE] = { | ||
3001 | .name = "rgba128be", | ||
3002 | .nb_components = 4, | ||
3003 | .log2_chroma_w = 0, | ||
3004 | .log2_chroma_h = 0, | ||
3005 | .comp = { | ||
3006 | { 0, 16, 0, 0, 32 }, /* R */ | ||
3007 | { 0, 16, 4, 0, 32 }, /* G */ | ||
3008 | { 0, 16, 8, 0, 32 }, /* B */ | ||
3009 | { 0, 16, 12, 0, 32 }, /* A */ | ||
3010 | }, | ||
3011 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
3012 | AV_PIX_FMT_FLAG_ALPHA, | ||
3013 | }, | ||
3014 | [AV_PIX_FMT_RGBA128LE] = { | ||
3015 | .name = "rgba128le", | ||
3016 | .nb_components = 4, | ||
3017 | .log2_chroma_w = 0, | ||
3018 | .log2_chroma_h = 0, | ||
3019 | .comp = { | ||
3020 | { 0, 16, 0, 0, 32 }, /* R */ | ||
3021 | { 0, 16, 4, 0, 32 }, /* G */ | ||
3022 | { 0, 16, 8, 0, 32 }, /* B */ | ||
3023 | { 0, 16, 12, 0, 32 }, /* A */ | ||
3024 | }, | ||
3025 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
3026 | }, | ||
3027 | [AV_PIX_FMT_P212BE] = { | ||
3028 | .name = "p212be", | ||
3029 | .nb_components = 3, | ||
3030 | .log2_chroma_w = 1, | ||
3031 | .log2_chroma_h = 0, | ||
3032 | .comp = { | ||
3033 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
3034 | { 1, 4, 0, 4, 12 }, /* U */ | ||
3035 | { 1, 4, 2, 4, 12 }, /* V */ | ||
3036 | }, | ||
3037 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
3038 | }, | ||
3039 | [AV_PIX_FMT_P212LE] = { | ||
3040 | .name = "p212le", | ||
3041 | .nb_components = 3, | ||
3042 | .log2_chroma_w = 1, | ||
3043 | .log2_chroma_h = 0, | ||
3044 | .comp = { | ||
3045 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
3046 | { 1, 4, 0, 4, 12 }, /* U */ | ||
3047 | { 1, 4, 2, 4, 12 }, /* V */ | ||
3048 | }, | ||
3049 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
3050 | }, | ||
3051 | [AV_PIX_FMT_P412BE] = { | ||
3052 | .name = "p412be", | ||
3053 | .nb_components = 3, | ||
3054 | .log2_chroma_w = 0, | ||
3055 | .log2_chroma_h = 0, | ||
3056 | .comp = { | ||
3057 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
3058 | { 1, 4, 0, 4, 12 }, /* U */ | ||
3059 | { 1, 4, 2, 4, 12 }, /* V */ | ||
3060 | }, | ||
3061 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
3062 | }, | ||
3063 | [AV_PIX_FMT_P412LE] = { | ||
3064 | .name = "p412le", | ||
3065 | .nb_components = 3, | ||
3066 | .log2_chroma_w = 0, | ||
3067 | .log2_chroma_h = 0, | ||
3068 | .comp = { | ||
3069 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
3070 | { 1, 4, 0, 4, 12 }, /* U */ | ||
3071 | { 1, 4, 2, 4, 12 }, /* V */ | ||
3072 | }, | ||
3073 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
3074 | }, | ||
3075 | [AV_PIX_FMT_Y216LE] = { | ||
3076 | .name = "y216le", | ||
3077 | .nb_components = 3, | ||
3078 | .log2_chroma_w = 1, | ||
3079 | .log2_chroma_h = 0, | ||
3080 | .comp = { | ||
3081 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
3082 | { 0, 8, 2, 0, 16 }, /* U */ | ||
3083 | { 0, 8, 6, 0, 16 }, /* V */ | ||
3084 | }, | ||
3085 | }, | ||
3086 | [AV_PIX_FMT_Y216BE] = { | ||
3087 | .name = "y216be", | ||
3088 | .nb_components = 3, | ||
3089 | .log2_chroma_w = 1, | ||
3090 | .log2_chroma_h = 0, | ||
3091 | .comp = { | ||
3092 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
3093 | { 0, 8, 2, 0, 16 }, /* U */ | ||
3094 | { 0, 8, 6, 0, 16 }, /* V */ | ||
3095 | }, | ||
3096 | .flags = AV_PIX_FMT_FLAG_BE, | ||
3097 | }, | ||
3098 | }; | ||
3099 | |||
3100 | static const char * const color_range_names[] = { | ||
3101 | [AVCOL_RANGE_UNSPECIFIED] = "unknown", | ||
3102 | [AVCOL_RANGE_MPEG] = "tv", | ||
3103 | [AVCOL_RANGE_JPEG] = "pc", | ||
3104 | }; | ||
3105 | |||
3106 | static const char * const color_primaries_names[AVCOL_PRI_NB] = { | ||
3107 | [AVCOL_PRI_RESERVED0] = "reserved", | ||
3108 | [AVCOL_PRI_BT709] = "bt709", | ||
3109 | [AVCOL_PRI_UNSPECIFIED] = "unknown", | ||
3110 | [AVCOL_PRI_RESERVED] = "reserved", | ||
3111 | [AVCOL_PRI_BT470M] = "bt470m", | ||
3112 | [AVCOL_PRI_BT470BG] = "bt470bg", | ||
3113 | [AVCOL_PRI_SMPTE170M] = "smpte170m", | ||
3114 | [AVCOL_PRI_SMPTE240M] = "smpte240m", | ||
3115 | [AVCOL_PRI_FILM] = "film", | ||
3116 | [AVCOL_PRI_BT2020] = "bt2020", | ||
3117 | [AVCOL_PRI_SMPTE428] = "smpte428", | ||
3118 | [AVCOL_PRI_SMPTE431] = "smpte431", | ||
3119 | [AVCOL_PRI_SMPTE432] = "smpte432", | ||
3120 | [AVCOL_PRI_EBU3213] = "ebu3213", | ||
3121 | }; | ||
3122 | |||
3123 | static const char * const color_transfer_names[] = { | ||
3124 | [AVCOL_TRC_RESERVED0] = "reserved", | ||
3125 | [AVCOL_TRC_BT709] = "bt709", | ||
3126 | [AVCOL_TRC_UNSPECIFIED] = "unknown", | ||
3127 | [AVCOL_TRC_RESERVED] = "reserved", | ||
3128 | [AVCOL_TRC_GAMMA22] = "bt470m", | ||
3129 | [AVCOL_TRC_GAMMA28] = "bt470bg", | ||
3130 | [AVCOL_TRC_SMPTE170M] = "smpte170m", | ||
3131 | [AVCOL_TRC_SMPTE240M] = "smpte240m", | ||
3132 | [AVCOL_TRC_LINEAR] = "linear", | ||
3133 | [AVCOL_TRC_LOG] = "log100", | ||
3134 | [AVCOL_TRC_LOG_SQRT] = "log316", | ||
3135 | [AVCOL_TRC_IEC61966_2_4] = "iec61966-2-4", | ||
3136 | [AVCOL_TRC_BT1361_ECG] = "bt1361e", | ||
3137 | [AVCOL_TRC_IEC61966_2_1] = "iec61966-2-1", | ||
3138 | [AVCOL_TRC_BT2020_10] = "bt2020-10", | ||
3139 | [AVCOL_TRC_BT2020_12] = "bt2020-12", | ||
3140 | [AVCOL_TRC_SMPTE2084] = "smpte2084", | ||
3141 | [AVCOL_TRC_SMPTE428] = "smpte428", | ||
3142 | [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67", | ||
3143 | }; | ||
3144 | |||
3145 | static const char * const color_space_names[] = { | ||
3146 | [AVCOL_SPC_RGB] = "gbr", | ||
3147 | [AVCOL_SPC_BT709] = "bt709", | ||
3148 | [AVCOL_SPC_UNSPECIFIED] = "unknown", | ||
3149 | [AVCOL_SPC_RESERVED] = "reserved", | ||
3150 | [AVCOL_SPC_FCC] = "fcc", | ||
3151 | [AVCOL_SPC_BT470BG] = "bt470bg", | ||
3152 | [AVCOL_SPC_SMPTE170M] = "smpte170m", | ||
3153 | [AVCOL_SPC_SMPTE240M] = "smpte240m", | ||
3154 | [AVCOL_SPC_YCGCO] = "ycgco", | ||
3155 | [AVCOL_SPC_BT2020_NCL] = "bt2020nc", | ||
3156 | [AVCOL_SPC_BT2020_CL] = "bt2020c", | ||
3157 | [AVCOL_SPC_SMPTE2085] = "smpte2085", | ||
3158 | [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc", | ||
3159 | [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c", | ||
3160 | [AVCOL_SPC_ICTCP] = "ictcp", | ||
3161 | [AVCOL_SPC_IPT_C2] = "ipt-c2", | ||
3162 | [AVCOL_SPC_YCGCO_RE] = "ycgco-re", | ||
3163 | [AVCOL_SPC_YCGCO_RO] = "ycgco-ro", | ||
3164 | }; | ||
3165 | |||
3166 | static const char * const chroma_location_names[] = { | ||
3167 | [AVCHROMA_LOC_UNSPECIFIED] = "unspecified", | ||
3168 | [AVCHROMA_LOC_LEFT] = "left", | ||
3169 | [AVCHROMA_LOC_CENTER] = "center", | ||
3170 | [AVCHROMA_LOC_TOPLEFT] = "topleft", | ||
3171 | [AVCHROMA_LOC_TOP] = "top", | ||
3172 | [AVCHROMA_LOC_BOTTOMLEFT] = "bottomleft", | ||
3173 | [AVCHROMA_LOC_BOTTOM] = "bottom", | ||
3174 | }; | ||
3175 | |||
3176 | 22445 | static enum AVPixelFormat get_pix_fmt_internal(const char *name) | |
3177 | { | ||
3178 | enum AVPixelFormat pix_fmt; | ||
3179 | |||
3180 |
2/2✓ Branch 0 taken 2073083 times.
✓ Branch 1 taken 1158 times.
|
2074241 | for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) |
3181 |
1/2✓ Branch 0 taken 2073083 times.
✗ Branch 1 not taken.
|
2073083 | if (av_pix_fmt_descriptors[pix_fmt].name && |
3182 |
4/4✓ Branch 0 taken 2051798 times.
✓ Branch 1 taken 21285 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 2051796 times.
|
4124881 | (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) || |
3183 | 2051798 | av_match_name(name, av_pix_fmt_descriptors[pix_fmt].alias))) | |
3184 | 21287 | return pix_fmt; | |
3185 | |||
3186 | 1158 | return AV_PIX_FMT_NONE; | |
3187 | } | ||
3188 | |||
3189 | 84822 | const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt) | |
3190 | { | ||
3191 | 84822 | return (unsigned)pix_fmt < AV_PIX_FMT_NB ? | |
3192 |
2/2✓ Branch 0 taken 84820 times.
✓ Branch 1 taken 2 times.
|
84822 | av_pix_fmt_descriptors[pix_fmt].name : NULL; |
3193 | } | ||
3194 | |||
3195 | #if HAVE_BIGENDIAN | ||
3196 | # define X_NE(be, le) be | ||
3197 | #else | ||
3198 | # define X_NE(be, le) le | ||
3199 | #endif | ||
3200 | |||
3201 | 21276 | enum AVPixelFormat av_get_pix_fmt(const char *name) | |
3202 | { | ||
3203 | enum AVPixelFormat pix_fmt; | ||
3204 | |||
3205 |
2/2✓ Branch 0 taken 37 times.
✓ Branch 1 taken 21239 times.
|
21276 | if (!strcmp(name, "rgb32")) |
3206 | 37 | name = X_NE("argb", "bgra"); | |
3207 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 21239 times.
|
21239 | else if (!strcmp(name, "bgr32")) |
3208 | ✗ | name = X_NE("abgr", "rgba"); | |
3209 | |||
3210 | 21276 | pix_fmt = get_pix_fmt_internal(name); | |
3211 |
2/2✓ Branch 0 taken 1156 times.
✓ Branch 1 taken 20120 times.
|
21276 | if (pix_fmt == AV_PIX_FMT_NONE) { |
3212 | char name2[32]; | ||
3213 | |||
3214 | 1156 | snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le")); | |
3215 | 1156 | pix_fmt = get_pix_fmt_internal(name2); | |
3216 | } | ||
3217 | |||
3218 | 21276 | return pix_fmt; | |
3219 | } | ||
3220 | |||
3221 | 192906 | int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc) | |
3222 | { | ||
3223 | 192906 | int c, bits = 0; | |
3224 | 192906 | int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h; | |
3225 | |||
3226 |
2/2✓ Branch 0 taken 573966 times.
✓ Branch 1 taken 192906 times.
|
766872 | for (c = 0; c < pixdesc->nb_components; c++) { |
3227 |
4/4✓ Branch 0 taken 390296 times.
✓ Branch 1 taken 183670 times.
✓ Branch 2 taken 206937 times.
✓ Branch 3 taken 183359 times.
|
573966 | int s = c == 1 || c == 2 ? 0 : log2_pixels; |
3228 | 573966 | bits += pixdesc->comp[c].depth << s; | |
3229 | } | ||
3230 | |||
3231 | 192906 | return bits >> log2_pixels; | |
3232 | } | ||
3233 | |||
3234 | 1162 | int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc) | |
3235 | { | ||
3236 | 1162 | int c, bits = 0; | |
3237 | 1162 | int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h; | |
3238 | 1162 | int steps[4] = {0}; | |
3239 | |||
3240 |
2/2✓ Branch 0 taken 3525 times.
✓ Branch 1 taken 1162 times.
|
4687 | for (c = 0; c < pixdesc->nb_components; c++) { |
3241 | 3525 | const AVComponentDescriptor *comp = &pixdesc->comp[c]; | |
3242 |
4/4✓ Branch 0 taken 2489 times.
✓ Branch 1 taken 1036 times.
✓ Branch 2 taken 1453 times.
✓ Branch 3 taken 1036 times.
|
3525 | int s = c == 1 || c == 2 ? 0 : log2_pixels; |
3243 | 3525 | steps[comp->plane] = comp->step << s; | |
3244 | } | ||
3245 |
2/2✓ Branch 0 taken 4648 times.
✓ Branch 1 taken 1162 times.
|
5810 | for (c = 0; c < 4; c++) |
3246 | 4648 | bits += steps[c]; | |
3247 | |||
3248 |
2/2✓ Branch 0 taken 1068 times.
✓ Branch 1 taken 94 times.
|
1162 | if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM)) |
3249 | 1068 | bits *= 8; | |
3250 | |||
3251 | 1162 | return bits >> log2_pixels; | |
3252 | } | ||
3253 | |||
3254 | ✗ | char *av_get_pix_fmt_string(char *buf, int buf_size, | |
3255 | enum AVPixelFormat pix_fmt) | ||
3256 | { | ||
3257 | /* print header */ | ||
3258 | ✗ | if (pix_fmt < 0) { | |
3259 | ✗ | snprintf (buf, buf_size, "name" " nb_components" " nb_bits"); | |
3260 | } else { | ||
3261 | ✗ | const AVPixFmtDescriptor *pixdesc = &av_pix_fmt_descriptors[pix_fmt]; | |
3262 | ✗ | snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name, | |
3263 | ✗ | pixdesc->nb_components, av_get_bits_per_pixel(pixdesc)); | |
3264 | } | ||
3265 | |||
3266 | ✗ | return buf; | |
3267 | } | ||
3268 | |||
3269 | 311763902 | const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt) | |
3270 | { | ||
3271 |
4/4✓ Branch 0 taken 310846738 times.
✓ Branch 1 taken 917164 times.
✓ Branch 2 taken 67787 times.
✓ Branch 3 taken 310778951 times.
|
311763902 | if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB) |
3272 | 984951 | return NULL; | |
3273 | 310778951 | return &av_pix_fmt_descriptors[pix_fmt]; | |
3274 | } | ||
3275 | |||
3276 | 2994002 | const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev) | |
3277 | { | ||
3278 |
2/2✓ Branch 0 taken 11834 times.
✓ Branch 1 taken 2982168 times.
|
2994002 | if (!prev) |
3279 | 11834 | return &av_pix_fmt_descriptors[0]; | |
3280 |
2/2✓ Branch 0 taken 2970334 times.
✓ Branch 1 taken 11834 times.
|
2982168 | while (prev - av_pix_fmt_descriptors < FF_ARRAY_ELEMS(av_pix_fmt_descriptors) - 1) { |
3281 | 2970334 | prev++; | |
3282 |
1/2✓ Branch 0 taken 2970334 times.
✗ Branch 1 not taken.
|
2970334 | if (prev->name) |
3283 | 2970334 | return prev; | |
3284 | } | ||
3285 | 11834 | return NULL; | |
3286 | } | ||
3287 | |||
3288 | 2982420 | enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc) | |
3289 | { | ||
3290 |
1/2✓ Branch 0 taken 2982420 times.
✗ Branch 1 not taken.
|
2982420 | if (desc < av_pix_fmt_descriptors || |
3291 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2982420 times.
|
2982420 | desc >= av_pix_fmt_descriptors + FF_ARRAY_ELEMS(av_pix_fmt_descriptors)) |
3292 | ✗ | return AV_PIX_FMT_NONE; | |
3293 | |||
3294 | 2982420 | return desc - av_pix_fmt_descriptors; | |
3295 | } | ||
3296 | |||
3297 | 57903 | int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, | |
3298 | int *h_shift, int *v_shift) | ||
3299 | { | ||
3300 | 57903 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
3301 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 57903 times.
|
57903 | if (!desc) |
3302 | ✗ | return AVERROR(ENOSYS); | |
3303 | 57903 | *h_shift = desc->log2_chroma_w; | |
3304 | 57903 | *v_shift = desc->log2_chroma_h; | |
3305 | |||
3306 | 57903 | return 0; | |
3307 | } | ||
3308 | |||
3309 | 155262 | int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt) | |
3310 | { | ||
3311 | 155262 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
3312 | 155262 | int i, planes[4] = { 0 }, ret = 0; | |
3313 | |||
3314 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 155262 times.
|
155262 | if (!desc) |
3315 | ✗ | return AVERROR(EINVAL); | |
3316 | |||
3317 |
2/2✓ Branch 0 taken 456013 times.
✓ Branch 1 taken 155262 times.
|
611275 | for (i = 0; i < desc->nb_components; i++) |
3318 | 456013 | planes[desc->comp[i].plane] = 1; | |
3319 |
2/2✓ Branch 0 taken 621048 times.
✓ Branch 1 taken 155262 times.
|
776310 | for (i = 0; i < FF_ARRAY_ELEMS(planes); i++) |
3320 | 621048 | ret += planes[i]; | |
3321 | 155262 | return ret; | |
3322 | } | ||
3323 | |||
3324 | 13 | enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt) | |
3325 | { | ||
3326 | 13 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
3327 | char name[16]; | ||
3328 | int i; | ||
3329 | |||
3330 |
2/4✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 13 times.
|
13 | if (!desc || strlen(desc->name) < 2) |
3331 | ✗ | return AV_PIX_FMT_NONE; | |
3332 | 13 | av_strlcpy(name, desc->name, sizeof(name)); | |
3333 | 13 | i = strlen(name) - 2; | |
3334 |
3/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 11 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
|
13 | if (strcmp(name + i, "be") && strcmp(name + i, "le")) |
3335 | ✗ | return AV_PIX_FMT_NONE; | |
3336 | |||
3337 | 13 | name[i] ^= 'b' ^ 'l'; | |
3338 | |||
3339 | 13 | return get_pix_fmt_internal(name); | |
3340 | } | ||
3341 | |||
3342 | #define FF_COLOR_NA -1 | ||
3343 | #define FF_COLOR_RGB 0 /**< RGB color space */ | ||
3344 | #define FF_COLOR_GRAY 1 /**< gray color space */ | ||
3345 | #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */ | ||
3346 | #define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */ | ||
3347 | #define FF_COLOR_XYZ 4 | ||
3348 | |||
3349 | #define pixdesc_has_alpha(pixdesc) \ | ||
3350 | ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA) | ||
3351 | |||
3352 | |||
3353 | 8522 | static int get_color_type(const AVPixFmtDescriptor *desc) { | |
3354 |
2/2✓ Branch 0 taken 18 times.
✓ Branch 1 taken 8504 times.
|
8522 | if (desc->flags & AV_PIX_FMT_FLAG_PAL) |
3355 | 18 | return FF_COLOR_RGB; | |
3356 | |||
3357 |
4/4✓ Branch 0 taken 7554 times.
✓ Branch 1 taken 950 times.
✓ Branch 2 taken 87 times.
✓ Branch 3 taken 7467 times.
|
8504 | if(desc->nb_components == 1 || desc->nb_components == 2) |
3358 | 1037 | return FF_COLOR_GRAY; | |
3359 | |||
3360 |
1/2✓ Branch 0 taken 7467 times.
✗ Branch 1 not taken.
|
7467 | if (desc->name) { |
3361 |
2/2✓ Branch 1 taken 242 times.
✓ Branch 2 taken 7225 times.
|
7467 | if (av_strstart(desc->name, "yuvj", NULL)) |
3362 | 242 | return FF_COLOR_YUV_JPEG; | |
3363 | } | ||
3364 | |||
3365 |
2/2✓ Branch 0 taken 2497 times.
✓ Branch 1 taken 4728 times.
|
7225 | if(desc->flags & AV_PIX_FMT_FLAG_RGB) |
3366 | 2497 | return FF_COLOR_RGB; | |
3367 | |||
3368 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 4726 times.
|
4728 | if(desc->flags & AV_PIX_FMT_FLAG_XYZ) |
3369 | 2 | return FF_COLOR_XYZ; | |
3370 | |||
3371 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 4726 times.
|
4726 | if(desc->nb_components == 0) |
3372 | ✗ | return FF_COLOR_NA; | |
3373 | |||
3374 | 4726 | return FF_COLOR_YUV; | |
3375 | } | ||
3376 | |||
3377 | 8522 | static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt) | |
3378 | { | ||
3379 | 8522 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
3380 | int i; | ||
3381 | |||
3382 |
2/4✓ Branch 0 taken 8522 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 8522 times.
|
8522 | if (!desc || !desc->nb_components) { |
3383 | ✗ | *min = *max = 0; | |
3384 | ✗ | return AVERROR(EINVAL); | |
3385 | } | ||
3386 | |||
3387 | 8522 | *min = INT_MAX, *max = -INT_MAX; | |
3388 |
2/2✓ Branch 0 taken 24733 times.
✓ Branch 1 taken 8522 times.
|
33255 | for (i = 0; i < desc->nb_components; i++) { |
3389 | 24733 | *min = FFMIN(desc->comp[i].depth, *min); | |
3390 | 24733 | *max = FFMAX(desc->comp[i].depth, *max); | |
3391 | } | ||
3392 | 8522 | return 0; | |
3393 | } | ||
3394 | |||
3395 | 4824 | static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, | |
3396 | enum AVPixelFormat src_pix_fmt, | ||
3397 | unsigned *lossp, unsigned consider) | ||
3398 | { | ||
3399 | 4824 | const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt); | |
3400 | 4824 | const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt); | |
3401 | int src_color, dst_color; | ||
3402 | int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth; | ||
3403 | int ret, loss, i, nb_components; | ||
3404 | 4824 | int score = INT_MAX - 1; | |
3405 | |||
3406 |
2/4✓ Branch 0 taken 4824 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 4824 times.
|
4824 | if (!src_desc || !dst_desc) |
3407 | ✗ | return -4; | |
3408 | |||
3409 |
2/2✓ Branch 0 taken 4722 times.
✓ Branch 1 taken 102 times.
|
4824 | if ((src_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) || |
3410 |
2/2✓ Branch 0 taken 150 times.
✓ Branch 1 taken 4572 times.
|
4722 | (dst_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) { |
3411 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 249 times.
|
252 | if (dst_pix_fmt == src_pix_fmt) |
3412 | 3 | return -1; | |
3413 | else | ||
3414 | 249 | return -2; | |
3415 | } | ||
3416 | |||
3417 | /* compute loss */ | ||
3418 | 4572 | *lossp = loss = 0; | |
3419 | |||
3420 |
2/2✓ Branch 0 taken 311 times.
✓ Branch 1 taken 4261 times.
|
4572 | if (dst_pix_fmt == src_pix_fmt) |
3421 | 311 | return INT_MAX; | |
3422 | |||
3423 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4261 times.
|
4261 | if ((ret = get_pix_fmt_depth(&src_min_depth, &src_max_depth, src_pix_fmt)) < 0) |
3424 | ✗ | return -3; | |
3425 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4261 times.
|
4261 | if ((ret = get_pix_fmt_depth(&dst_min_depth, &dst_max_depth, dst_pix_fmt)) < 0) |
3426 | ✗ | return -3; | |
3427 | |||
3428 | 4261 | src_color = get_color_type(src_desc); | |
3429 | 4261 | dst_color = get_color_type(dst_desc); | |
3430 |
2/2✓ Branch 0 taken 18 times.
✓ Branch 1 taken 4243 times.
|
4261 | if (dst_pix_fmt == AV_PIX_FMT_PAL8) |
3431 | 18 | nb_components = FFMIN(src_desc->nb_components, 4); | |
3432 | else | ||
3433 | 4243 | nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components); | |
3434 | |||
3435 |
2/2✓ Branch 0 taken 11218 times.
✓ Branch 1 taken 4261 times.
|
15479 | for (i = 0; i < nb_components; i++) { |
3436 |
2/2✓ Branch 0 taken 54 times.
✓ Branch 1 taken 11164 times.
|
11218 | int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1); |
3437 | 11218 | int depth_delta = src_desc->comp[i].depth - 1 - depth_minus1; | |
3438 |
3/4✓ Branch 0 taken 1693 times.
✓ Branch 1 taken 9525 times.
✓ Branch 2 taken 1693 times.
✗ Branch 3 not taken.
|
11218 | if (depth_delta > 0 && (consider & FF_LOSS_DEPTH)) { |
3439 | 1693 | loss |= FF_LOSS_DEPTH; | |
3440 | 1693 | score -= 65536 >> depth_minus1; | |
3441 |
3/4✓ Branch 0 taken 3308 times.
✓ Branch 1 taken 6217 times.
✓ Branch 2 taken 3308 times.
✗ Branch 3 not taken.
|
9525 | } else if (depth_delta < 0 && (consider & FF_LOSS_EXCESS_DEPTH)) { |
3442 | // Favour formats where bit depth exactly matches. If all other | ||
3443 | // scoring is equal, we'd rather use the bit depth that most closely | ||
3444 | // matches the source. | ||
3445 | 3308 | loss |= FF_LOSS_EXCESS_DEPTH; | |
3446 | 3308 | score += depth_delta; | |
3447 | } | ||
3448 | } | ||
3449 | |||
3450 |
1/2✓ Branch 0 taken 4261 times.
✗ Branch 1 not taken.
|
4261 | if (consider & FF_LOSS_RESOLUTION) { |
3451 |
2/2✓ Branch 0 taken 872 times.
✓ Branch 1 taken 3389 times.
|
4261 | if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w) { |
3452 | 872 | loss |= FF_LOSS_RESOLUTION; | |
3453 | 872 | score -= 256 << dst_desc->log2_chroma_w; | |
3454 | } | ||
3455 |
2/2✓ Branch 0 taken 638 times.
✓ Branch 1 taken 3623 times.
|
4261 | if (dst_desc->log2_chroma_h > src_desc->log2_chroma_h) { |
3456 | 638 | loss |= FF_LOSS_RESOLUTION; | |
3457 | 638 | score -= 256 << dst_desc->log2_chroma_h; | |
3458 | } | ||
3459 | // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side | ||
3460 |
4/4✓ Branch 0 taken 1552 times.
✓ Branch 1 taken 2709 times.
✓ Branch 2 taken 839 times.
✓ Branch 3 taken 713 times.
|
4261 | if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 && |
3461 |
4/4✓ Branch 0 taken 568 times.
✓ Branch 1 taken 271 times.
✓ Branch 2 taken 539 times.
✓ Branch 3 taken 29 times.
|
839 | dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) { |
3462 | 539 | score += 512; | |
3463 | } | ||
3464 | } | ||
3465 | |||
3466 |
1/2✓ Branch 0 taken 4261 times.
✗ Branch 1 not taken.
|
4261 | if (consider & FF_LOSS_EXCESS_RESOLUTION) { |
3467 | // Favour formats where chroma subsampling exactly matches. If all other | ||
3468 | // scoring is equal, we'd rather use the subsampling that most closely | ||
3469 | // matches the source. | ||
3470 |
2/2✓ Branch 0 taken 1178 times.
✓ Branch 1 taken 3083 times.
|
4261 | if (dst_desc->log2_chroma_w < src_desc->log2_chroma_w) { |
3471 | 1178 | loss |= FF_LOSS_EXCESS_RESOLUTION; | |
3472 | 1178 | score -= 1 << (src_desc->log2_chroma_w - dst_desc->log2_chroma_w); | |
3473 | } | ||
3474 | |||
3475 |
2/2✓ Branch 0 taken 1260 times.
✓ Branch 1 taken 3001 times.
|
4261 | if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) { |
3476 | 1260 | loss |= FF_LOSS_EXCESS_RESOLUTION; | |
3477 | 1260 | score -= 1 << (src_desc->log2_chroma_h - dst_desc->log2_chroma_h); | |
3478 | } | ||
3479 | |||
3480 | // don't favour 411 over 420, because 420 has much better support on the | ||
3481 | // decoder side. | ||
3482 |
4/4✓ Branch 0 taken 1552 times.
✓ Branch 1 taken 2709 times.
✓ Branch 2 taken 63 times.
✓ Branch 3 taken 1489 times.
|
4261 | if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 2 && |
3483 |
4/4✓ Branch 0 taken 32 times.
✓ Branch 1 taken 31 times.
✓ Branch 2 taken 19 times.
✓ Branch 3 taken 13 times.
|
63 | dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 2) { |
3484 | 19 | score += 4; | |
3485 | } | ||
3486 | } | ||
3487 | |||
3488 |
1/2✓ Branch 0 taken 4261 times.
✗ Branch 1 not taken.
|
4261 | if(consider & FF_LOSS_COLORSPACE) |
3489 |
5/5✓ Branch 0 taken 1027 times.
✓ Branch 1 taken 749 times.
✓ Branch 2 taken 2429 times.
✓ Branch 3 taken 54 times.
✓ Branch 4 taken 2 times.
|
4261 | switch(dst_color) { |
3490 | 1027 | case FF_COLOR_RGB: | |
3491 |
4/4✓ Branch 0 taken 666 times.
✓ Branch 1 taken 361 times.
✓ Branch 2 taken 630 times.
✓ Branch 3 taken 36 times.
|
1027 | if (src_color != FF_COLOR_RGB && |
3492 | src_color != FF_COLOR_GRAY) | ||
3493 | 630 | loss |= FF_LOSS_COLORSPACE; | |
3494 | 1027 | break; | |
3495 | 749 | case FF_COLOR_GRAY: | |
3496 |
2/2✓ Branch 0 taken 605 times.
✓ Branch 1 taken 144 times.
|
749 | if (src_color != FF_COLOR_GRAY) |
3497 | 605 | loss |= FF_LOSS_COLORSPACE; | |
3498 | 749 | break; | |
3499 | 2429 | case FF_COLOR_YUV: | |
3500 |
2/2✓ Branch 0 taken 1025 times.
✓ Branch 1 taken 1404 times.
|
2429 | if (src_color != FF_COLOR_YUV) |
3501 | 1025 | loss |= FF_LOSS_COLORSPACE; | |
3502 | 2429 | break; | |
3503 | 54 | case FF_COLOR_YUV_JPEG: | |
3504 |
3/4✓ Branch 0 taken 54 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 38 times.
✓ Branch 3 taken 16 times.
|
54 | if (src_color != FF_COLOR_YUV_JPEG && |
3505 |
1/2✓ Branch 0 taken 38 times.
✗ Branch 1 not taken.
|
38 | src_color != FF_COLOR_YUV && |
3506 | src_color != FF_COLOR_GRAY) | ||
3507 | 38 | loss |= FF_LOSS_COLORSPACE; | |
3508 | 54 | break; | |
3509 | 2 | default: | |
3510 | /* fail safe test */ | ||
3511 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (src_color != dst_color) |
3512 | 2 | loss |= FF_LOSS_COLORSPACE; | |
3513 | 2 | break; | |
3514 | } | ||
3515 |
2/2✓ Branch 0 taken 2300 times.
✓ Branch 1 taken 1961 times.
|
4261 | if(loss & FF_LOSS_COLORSPACE) |
3516 |
2/2✓ Branch 0 taken 698 times.
✓ Branch 1 taken 1602 times.
|
2300 | score -= (nb_components * 65536) >> FFMIN(dst_desc->comp[0].depth - 1, src_desc->comp[0].depth - 1); |
3517 | |||
3518 |
4/4✓ Branch 0 taken 749 times.
✓ Branch 1 taken 3512 times.
✓ Branch 2 taken 605 times.
✓ Branch 3 taken 144 times.
|
4261 | if (dst_color == FF_COLOR_GRAY && |
3519 |
1/2✓ Branch 0 taken 605 times.
✗ Branch 1 not taken.
|
605 | src_color != FF_COLOR_GRAY && (consider & FF_LOSS_CHROMA)) { |
3520 | 605 | loss |= FF_LOSS_CHROMA; | |
3521 | 605 | score -= 2 * 65536; | |
3522 | } | ||
3523 |
6/6✓ Branch 0 taken 3838 times.
✓ Branch 1 taken 423 times.
✓ Branch 2 taken 698 times.
✓ Branch 3 taken 3140 times.
✓ Branch 4 taken 154 times.
✓ Branch 5 taken 544 times.
|
4261 | if (!pixdesc_has_alpha(dst_desc) && (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))) { |
3524 | 154 | loss |= FF_LOSS_ALPHA; | |
3525 | 154 | score -= 65536; | |
3526 | } | ||
3527 |
4/6✓ Branch 0 taken 18 times.
✓ Branch 1 taken 4243 times.
✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 18 times.
✗ Branch 5 not taken.
|
4261 | if (dst_pix_fmt == AV_PIX_FMT_PAL8 && (consider & FF_LOSS_COLORQUANT) && |
3528 |
1/6✗ Branch 0 not taken.
✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
|
18 | (src_pix_fmt != AV_PIX_FMT_PAL8 && (src_color != FF_COLOR_GRAY || (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))))) { |
3529 | 18 | loss |= FF_LOSS_COLORQUANT; | |
3530 | 18 | score -= 65536; | |
3531 | } | ||
3532 | |||
3533 | 4261 | *lossp = loss; | |
3534 | 4261 | return score; | |
3535 | } | ||
3536 | |||
3537 | ✗ | int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, | |
3538 | enum AVPixelFormat src_pix_fmt, | ||
3539 | int has_alpha) | ||
3540 | { | ||
3541 | int loss; | ||
3542 | ✗ | int ret = get_pix_fmt_score(dst_pix_fmt, src_pix_fmt, &loss, has_alpha ? ~0 : ~FF_LOSS_ALPHA); | |
3543 | ✗ | if (ret < 0) | |
3544 | ✗ | return ret; | |
3545 | ✗ | return loss; | |
3546 | } | ||
3547 | |||
3548 | 2622 | enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, | |
3549 | enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr) | ||
3550 | { | ||
3551 | enum AVPixelFormat dst_pix_fmt; | ||
3552 | int loss1, loss2, loss_mask; | ||
3553 | 2622 | const AVPixFmtDescriptor *desc1 = av_pix_fmt_desc_get(dst_pix_fmt1); | |
3554 | 2622 | const AVPixFmtDescriptor *desc2 = av_pix_fmt_desc_get(dst_pix_fmt2); | |
3555 | int score1, score2; | ||
3556 | |||
3557 |
2/2✓ Branch 0 taken 210 times.
✓ Branch 1 taken 2412 times.
|
2622 | if (!desc1) { |
3558 | 210 | dst_pix_fmt = dst_pix_fmt2; | |
3559 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2412 times.
|
2412 | } else if (!desc2) { |
3560 | ✗ | dst_pix_fmt = dst_pix_fmt1; | |
3561 | } else { | ||
3562 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2412 times.
|
2412 | loss_mask= loss_ptr?~*loss_ptr:~0; /* use loss mask if provided */ |
3563 |
2/2✓ Branch 0 taken 2248 times.
✓ Branch 1 taken 164 times.
|
2412 | if(!has_alpha) |
3564 | 2248 | loss_mask &= ~FF_LOSS_ALPHA; | |
3565 | |||
3566 | 2412 | score1 = get_pix_fmt_score(dst_pix_fmt1, src_pix_fmt, &loss1, loss_mask); | |
3567 | 2412 | score2 = get_pix_fmt_score(dst_pix_fmt2, src_pix_fmt, &loss2, loss_mask); | |
3568 | |||
3569 |
2/2✓ Branch 0 taken 205 times.
✓ Branch 1 taken 2207 times.
|
2412 | if (score1 == score2) { |
3570 |
2/2✓ Branch 2 taken 155 times.
✓ Branch 3 taken 50 times.
|
205 | if(av_get_padded_bits_per_pixel(desc2) != av_get_padded_bits_per_pixel(desc1)) { |
3571 |
2/2✓ Branch 2 taken 8 times.
✓ Branch 3 taken 147 times.
|
155 | dst_pix_fmt = av_get_padded_bits_per_pixel(desc2) < av_get_padded_bits_per_pixel(desc1) ? dst_pix_fmt2 : dst_pix_fmt1; |
3572 | } else { | ||
3573 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
|
50 | dst_pix_fmt = desc2->nb_components < desc1->nb_components ? dst_pix_fmt2 : dst_pix_fmt1; |
3574 | } | ||
3575 | } else { | ||
3576 |
2/2✓ Branch 0 taken 408 times.
✓ Branch 1 taken 1799 times.
|
2207 | dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1; |
3577 | } | ||
3578 | } | ||
3579 | |||
3580 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2622 times.
|
2622 | if (loss_ptr) |
3581 | ✗ | *loss_ptr = av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha); | |
3582 | 2622 | return dst_pix_fmt; | |
3583 | } | ||
3584 | |||
3585 | 30974 | const char *av_color_range_name(enum AVColorRange range) | |
3586 | { | ||
3587 | return (unsigned) range < AVCOL_RANGE_NB ? | ||
3588 |
1/2✓ Branch 0 taken 30974 times.
✗ Branch 1 not taken.
|
30974 | color_range_names[range] : NULL; |
3589 | } | ||
3590 | |||
3591 | 1869 | int av_color_range_from_name(const char *name) | |
3592 | { | ||
3593 | int i; | ||
3594 | |||
3595 |
1/2✓ Branch 0 taken 3821 times.
✗ Branch 1 not taken.
|
3821 | for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) { |
3596 |
2/2✓ Branch 1 taken 1869 times.
✓ Branch 2 taken 1952 times.
|
3821 | if (av_strstart(name, color_range_names[i], NULL)) |
3597 | 1869 | return i; | |
3598 | } | ||
3599 | |||
3600 | ✗ | return AVERROR(EINVAL); | |
3601 | } | ||
3602 | |||
3603 | 3810 | const char *av_color_primaries_name(enum AVColorPrimaries primaries) | |
3604 | { | ||
3605 | return (unsigned) primaries < AVCOL_PRI_NB ? | ||
3606 |
1/2✓ Branch 0 taken 3810 times.
✗ Branch 1 not taken.
|
3810 | color_primaries_names[primaries] : NULL; |
3607 | } | ||
3608 | |||
3609 | ✗ | int av_color_primaries_from_name(const char *name) | |
3610 | { | ||
3611 | int i; | ||
3612 | |||
3613 | ✗ | for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) { | |
3614 | ✗ | if (!color_primaries_names[i]) | |
3615 | ✗ | continue; | |
3616 | |||
3617 | ✗ | if (av_strstart(name, color_primaries_names[i], NULL)) | |
3618 | ✗ | return i; | |
3619 | } | ||
3620 | |||
3621 | ✗ | return AVERROR(EINVAL); | |
3622 | } | ||
3623 | |||
3624 | 3848 | const char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer) | |
3625 | { | ||
3626 | return (unsigned) transfer < AVCOL_TRC_NB ? | ||
3627 |
1/2✓ Branch 0 taken 3848 times.
✗ Branch 1 not taken.
|
3848 | color_transfer_names[transfer] : NULL; |
3628 | } | ||
3629 | |||
3630 | ✗ | int av_color_transfer_from_name(const char *name) | |
3631 | { | ||
3632 | int i; | ||
3633 | |||
3634 | ✗ | for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) { | |
3635 | ✗ | if (!color_transfer_names[i]) | |
3636 | ✗ | continue; | |
3637 | |||
3638 | ✗ | if (av_strstart(name, color_transfer_names[i], NULL)) | |
3639 | ✗ | return i; | |
3640 | } | ||
3641 | |||
3642 | ✗ | return AVERROR(EINVAL); | |
3643 | } | ||
3644 | |||
3645 | 21109 | const char *av_color_space_name(enum AVColorSpace space) | |
3646 | { | ||
3647 | return (unsigned) space < AVCOL_SPC_NB ? | ||
3648 |
1/2✓ Branch 0 taken 21109 times.
✗ Branch 1 not taken.
|
21109 | color_space_names[space] : NULL; |
3649 | } | ||
3650 | |||
3651 | 20 | int av_color_space_from_name(const char *name) | |
3652 | { | ||
3653 | int i; | ||
3654 | |||
3655 |
1/2✓ Branch 0 taken 65 times.
✗ Branch 1 not taken.
|
65 | for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) { |
3656 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 65 times.
|
65 | if (!color_space_names[i]) |
3657 | ✗ | continue; | |
3658 | |||
3659 |
2/2✓ Branch 1 taken 20 times.
✓ Branch 2 taken 45 times.
|
65 | if (av_strstart(name, color_space_names[i], NULL)) |
3660 | 20 | return i; | |
3661 | } | ||
3662 | |||
3663 | ✗ | return AVERROR(EINVAL); | |
3664 | } | ||
3665 | |||
3666 | 697 | const char *av_chroma_location_name(enum AVChromaLocation location) | |
3667 | { | ||
3668 | return (unsigned) location < AVCHROMA_LOC_NB ? | ||
3669 |
1/2✓ Branch 0 taken 697 times.
✗ Branch 1 not taken.
|
697 | chroma_location_names[location] : NULL; |
3670 | } | ||
3671 | |||
3672 | ✗ | int av_chroma_location_from_name(const char *name) | |
3673 | { | ||
3674 | int i; | ||
3675 | |||
3676 | ✗ | for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) { | |
3677 | ✗ | if (!chroma_location_names[i]) | |
3678 | ✗ | continue; | |
3679 | |||
3680 | ✗ | if (av_strstart(name, chroma_location_names[i], NULL)) | |
3681 | ✗ | return i; | |
3682 | } | ||
3683 | |||
3684 | ✗ | return AVERROR(EINVAL); | |
3685 | } | ||
3686 | |||
3687 | 11188 | int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos) | |
3688 | { | ||
3689 |
2/4✓ Branch 0 taken 11188 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 11188 times.
|
11188 | if (pos <= AVCHROMA_LOC_UNSPECIFIED || pos >= AVCHROMA_LOC_NB) |
3690 | ✗ | return AVERROR(EINVAL); | |
3691 | 11188 | pos--; | |
3692 | |||
3693 | 11188 | *xpos = (pos&1) * 128; | |
3694 | 11188 | *ypos = ((pos>>1)^(pos<4)) * 128; | |
3695 | |||
3696 | 11188 | return 0; | |
3697 | } | ||
3698 | |||
3699 | 37 | enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos) | |
3700 | { | ||
3701 | int pos, xout, yout; | ||
3702 | |||
3703 |
1/2✓ Branch 0 taken 67 times.
✗ Branch 1 not taken.
|
67 | for (pos = AVCHROMA_LOC_UNSPECIFIED + 1; pos < AVCHROMA_LOC_NB; pos++) { |
3704 |
5/6✓ Branch 1 taken 67 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 45 times.
✓ Branch 4 taken 22 times.
✓ Branch 5 taken 37 times.
✓ Branch 6 taken 8 times.
|
67 | if (av_chroma_location_enum_to_pos(&xout, &yout, pos) == 0 && xout == xpos && yout == ypos) |
3705 | 37 | return pos; | |
3706 | } | ||
3707 | ✗ | return AVCHROMA_LOC_UNSPECIFIED; | |
3708 | } | ||
3709 |