| 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 | 1337354 | 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 | 1337354 | AVComponentDescriptor comp = desc->comp[c]; | |
| 39 | 1337354 | int plane = comp.plane; | |
| 40 | 1337354 | int depth = comp.depth; | |
| 41 | 1337354 | unsigned mask = (1ULL << depth) - 1; | |
| 42 | 1337354 | int shift = comp.shift; | |
| 43 | 1337354 | int step = comp.step; | |
| 44 | 1337354 | int flags = desc->flags; | |
| 45 | 1337354 | uint16_t *dst16 = dst; | |
| 46 | 1337354 | uint32_t *dst32 = dst; | |
| 47 | |||
| 48 |
2/2✓ Branch 0 taken 298944 times.
✓ Branch 1 taken 1038410 times.
|
1337354 | if (!depth) |
| 49 | 298944 | return; | |
| 50 | |||
| 51 |
2/2✓ Branch 0 taken 3472 times.
✓ Branch 1 taken 1034938 times.
|
1038410 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { |
| 52 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 3464 times.
|
3472 | 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 | 3464 | int skip = x * step + comp.offset; | |
| 68 | 3464 | const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3); | |
| 69 | 3464 | int shift = 8 - depth - (skip & 7); | |
| 70 | |||
| 71 |
2/2✓ Branch 0 taken 1216528 times.
✓ Branch 1 taken 3464 times.
|
1219992 | while (w--) { |
| 72 | 1216528 | int val = (*p >> shift) & mask; | |
| 73 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1216528 times.
|
1216528 | if (read_pal_component) |
| 74 | ✗ | val = data[1][4*val + c]; | |
| 75 | 1216528 | shift -= step; | |
| 76 | 1216528 | p -= shift >> 3; | |
| 77 | 1216528 | shift &= 7; | |
| 78 |
2/2✓ Branch 0 taken 1216512 times.
✓ Branch 1 taken 16 times.
|
1216528 | if (dst_element_size == 4) *dst32++ = val; |
| 79 | 16 | else *dst16++ = val; | |
| 80 | } | ||
| 81 | } | ||
| 82 | } else { | ||
| 83 | 1034938 | const uint8_t *p = data[plane] + y * linesize[plane] + | |
| 84 | 1034938 | x * step + comp.offset; | |
| 85 | 1034938 | int is_8bit = shift + depth <= 8; | |
| 86 | 1034938 | int is_16bit= shift + depth <=16; | |
| 87 | |||
| 88 |
2/2✓ Branch 0 taken 296538 times.
✓ Branch 1 taken 738400 times.
|
1034938 | if (is_8bit) |
| 89 | 296538 | p += !!(flags & AV_PIX_FMT_FLAG_BE); | |
| 90 | |||
| 91 |
2/2✓ Branch 0 taken 331881140 times.
✓ Branch 1 taken 1034938 times.
|
332916078 | while (w--) { |
| 92 | unsigned val; | ||
| 93 |
2/2✓ Branch 0 taken 96484980 times.
✓ Branch 1 taken 235396160 times.
|
331881140 | if (is_8bit) val = *p; |
| 94 |
4/4✓ Branch 0 taken 225663948 times.
✓ Branch 1 taken 9732212 times.
✓ Branch 2 taken 107357664 times.
✓ Branch 3 taken 118306284 times.
|
235396160 | else if(is_16bit) val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p); |
| 95 |
2/2✓ Branch 0 taken 4866106 times.
✓ Branch 1 taken 4866106 times.
|
9732212 | else val = flags & AV_PIX_FMT_FLAG_BE ? AV_RB32(p) : AV_RL32(p); |
| 96 | 331881140 | val = (val >> shift) & mask; | |
| 97 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 331881140 times.
|
331881140 | if (read_pal_component) |
| 98 | ✗ | val = data[1][4 * val + c]; | |
| 99 | 331881140 | p += step; | |
| 100 |
2/2✓ Branch 0 taken 331879680 times.
✓ Branch 1 taken 1460 times.
|
331881140 | if (dst_element_size == 4) *dst32++ = val; |
| 101 | 1460 | else *dst16++ = val; | |
| 102 | } | ||
| 103 | } | ||
| 104 | } | ||
| 105 | |||
| 106 | 746 | 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 | 746 | av_read_image_line2(dst, data, linesize, desc,x, y, c, w, | |
| 113 | read_pal_component, | ||
| 114 | 2); | ||
| 115 | 746 | } | |
| 116 | |||
| 117 | 1339649 | 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 | 1339649 | AVComponentDescriptor comp = desc->comp[c]; | |
| 123 | 1339649 | int plane = comp.plane; | |
| 124 | 1339649 | int depth = comp.depth; | |
| 125 | 1339649 | int step = comp.step; | |
| 126 | 1339649 | int flags = desc->flags; | |
| 127 | 1339649 | const uint32_t *src32 = src; | |
| 128 | 1339649 | const uint16_t *src16 = src; | |
| 129 | |||
| 130 |
2/2✓ Branch 0 taken 298944 times.
✓ Branch 1 taken 1040705 times.
|
1339649 | if (!depth) |
| 131 | 298944 | return; | |
| 132 | |||
| 133 |
2/2✓ Branch 0 taken 3514 times.
✓ Branch 1 taken 1037191 times.
|
1040705 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { |
| 134 |
2/2✓ Branch 0 taken 26 times.
✓ Branch 1 taken 3488 times.
|
3514 | 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 | 3488 | int skip = x * step + comp.offset; | |
| 148 | 3488 | uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3); | |
| 149 | 3488 | int shift = 8 - depth - (skip & 7); | |
| 150 | |||
| 151 |
2/2✓ Branch 0 taken 1216720 times.
✓ Branch 1 taken 3488 times.
|
1220208 | while (w--) { |
| 152 |
2/2✓ Branch 0 taken 1216704 times.
✓ Branch 1 taken 16 times.
|
1216720 | *p |= (src_element_size == 4 ? *src32++ : *src16++) << shift; |
| 153 | 1216720 | shift -= step; | |
| 154 | 1216720 | p -= shift >> 3; | |
| 155 | 1216720 | shift &= 7; | |
| 156 | } | ||
| 157 | } | ||
| 158 | } else { | ||
| 159 | 1037191 | int shift = comp.shift; | |
| 160 | 1037191 | uint8_t *p = data[plane] + y * linesize[plane] + | |
| 161 | 1037191 | x * step + comp.offset; | |
| 162 | |||
| 163 |
2/2✓ Branch 0 taken 297171 times.
✓ Branch 1 taken 740020 times.
|
1037191 | if (shift + depth <= 8) { |
| 164 | 297171 | p += !!(flags & AV_PIX_FMT_FLAG_BE); | |
| 165 |
2/2✓ Branch 0 taken 96485622 times.
✓ Branch 1 taken 297171 times.
|
96782793 | while (w--) { |
| 166 |
2/2✓ Branch 0 taken 96485250 times.
✓ Branch 1 taken 372 times.
|
96485622 | *p |= ((src_element_size == 4 ? *src32++ : *src16++) << shift); |
| 167 | 96485622 | p += step; | |
| 168 | } | ||
| 169 | } else { | ||
| 170 |
2/2✓ Branch 0 taken 235397798 times.
✓ Branch 1 taken 740020 times.
|
236137818 | while (w--) { |
| 171 |
2/2✓ Branch 0 taken 235396710 times.
✓ Branch 1 taken 1088 times.
|
235397798 | unsigned s = (src_element_size == 4 ? *src32++ : *src16++); |
| 172 |
2/2✓ Branch 0 taken 225665412 times.
✓ Branch 1 taken 9732386 times.
|
235397798 | if (shift + depth <= 16) { |
| 173 |
2/2✓ Branch 0 taken 107358387 times.
✓ Branch 1 taken 118307025 times.
|
225665412 | if (flags & AV_PIX_FMT_FLAG_BE) { |
| 174 | 107358387 | uint16_t val = AV_RB16(p) | (s << shift); | |
| 175 | 107358387 | AV_WB16(p, val); | |
| 176 | } else { | ||
| 177 | 118307025 | uint16_t val = AV_RL16(p) | (s << shift); | |
| 178 | 118307025 | AV_WL16(p, val); | |
| 179 | } | ||
| 180 | } else { | ||
| 181 |
2/2✓ Branch 0 taken 4866193 times.
✓ Branch 1 taken 4866193 times.
|
9732386 | if (flags & AV_PIX_FMT_FLAG_BE) { |
| 182 | 4866193 | uint32_t val = AV_RB32(p) | (s << shift); | |
| 183 | 4866193 | AV_WB32(p, val); | |
| 184 | } else { | ||
| 185 | 4866193 | uint32_t val = AV_RL32(p) | (s << shift); | |
| 186 | 4866193 | AV_WL32(p, val); | |
| 187 | } | ||
| 188 | } | ||
| 189 | 235397798 | p += step; | |
| 190 | } | ||
| 191 | } | ||
| 192 | } | ||
| 193 | } | ||
| 194 | |||
| 195 | 746 | 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 | 746 | av_write_image_line2(src, data, linesize, desc, x, y, c, w, 2); | |
| 201 | 746 | } | |
| 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_YUV444P10MSBLE] = { | ||
| 1705 | .name = "yuv444p10msble", | ||
| 1706 | .nb_components = 3, | ||
| 1707 | .log2_chroma_w = 0, | ||
| 1708 | .log2_chroma_h = 0, | ||
| 1709 | .comp = { | ||
| 1710 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 1711 | { 1, 2, 0, 6, 10 }, /* U */ | ||
| 1712 | { 2, 2, 0, 6, 10 }, /* V */ | ||
| 1713 | }, | ||
| 1714 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 1715 | }, | ||
| 1716 | [AV_PIX_FMT_YUV444P10MSBBE] = { | ||
| 1717 | .name = "yuv444p10msbbe", | ||
| 1718 | .nb_components = 3, | ||
| 1719 | .log2_chroma_w = 0, | ||
| 1720 | .log2_chroma_h = 0, | ||
| 1721 | .comp = { | ||
| 1722 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 1723 | { 1, 2, 0, 6, 10 }, /* U */ | ||
| 1724 | { 2, 2, 0, 6, 10 }, /* V */ | ||
| 1725 | }, | ||
| 1726 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
| 1727 | }, | ||
| 1728 | [AV_PIX_FMT_YUV444P9LE] = { | ||
| 1729 | .name = "yuv444p9le", | ||
| 1730 | .nb_components = 3, | ||
| 1731 | .log2_chroma_w = 0, | ||
| 1732 | .log2_chroma_h = 0, | ||
| 1733 | .comp = { | ||
| 1734 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
| 1735 | { 1, 2, 0, 0, 9 }, /* U */ | ||
| 1736 | { 2, 2, 0, 0, 9 }, /* V */ | ||
| 1737 | }, | ||
| 1738 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 1739 | }, | ||
| 1740 | [AV_PIX_FMT_YUV444P9BE] = { | ||
| 1741 | .name = "yuv444p9be", | ||
| 1742 | .nb_components = 3, | ||
| 1743 | .log2_chroma_w = 0, | ||
| 1744 | .log2_chroma_h = 0, | ||
| 1745 | .comp = { | ||
| 1746 | { 0, 2, 0, 0, 9 }, /* Y */ | ||
| 1747 | { 1, 2, 0, 0, 9 }, /* U */ | ||
| 1748 | { 2, 2, 0, 0, 9 }, /* V */ | ||
| 1749 | }, | ||
| 1750 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
| 1751 | }, | ||
| 1752 | [AV_PIX_FMT_YUV444P12LE] = { | ||
| 1753 | .name = "yuv444p12le", | ||
| 1754 | .nb_components = 3, | ||
| 1755 | .log2_chroma_w = 0, | ||
| 1756 | .log2_chroma_h = 0, | ||
| 1757 | .comp = { | ||
| 1758 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
| 1759 | { 1, 2, 0, 0, 12 }, /* U */ | ||
| 1760 | { 2, 2, 0, 0, 12 }, /* V */ | ||
| 1761 | }, | ||
| 1762 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 1763 | }, | ||
| 1764 | [AV_PIX_FMT_YUV444P12BE] = { | ||
| 1765 | .name = "yuv444p12be", | ||
| 1766 | .nb_components = 3, | ||
| 1767 | .log2_chroma_w = 0, | ||
| 1768 | .log2_chroma_h = 0, | ||
| 1769 | .comp = { | ||
| 1770 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
| 1771 | { 1, 2, 0, 0, 12 }, /* U */ | ||
| 1772 | { 2, 2, 0, 0, 12 }, /* V */ | ||
| 1773 | }, | ||
| 1774 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
| 1775 | }, | ||
| 1776 | [AV_PIX_FMT_YUV444P12MSBLE] = { | ||
| 1777 | .name = "yuv444p12msble", | ||
| 1778 | .nb_components = 3, | ||
| 1779 | .log2_chroma_w = 0, | ||
| 1780 | .log2_chroma_h = 0, | ||
| 1781 | .comp = { | ||
| 1782 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 1783 | { 1, 2, 0, 4, 12 }, /* U */ | ||
| 1784 | { 2, 2, 0, 4, 12 }, /* V */ | ||
| 1785 | }, | ||
| 1786 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 1787 | }, | ||
| 1788 | [AV_PIX_FMT_YUV444P12MSBBE] = { | ||
| 1789 | .name = "yuv444p12msbbe", | ||
| 1790 | .nb_components = 3, | ||
| 1791 | .log2_chroma_w = 0, | ||
| 1792 | .log2_chroma_h = 0, | ||
| 1793 | .comp = { | ||
| 1794 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 1795 | { 1, 2, 0, 4, 12 }, /* U */ | ||
| 1796 | { 2, 2, 0, 4, 12 }, /* V */ | ||
| 1797 | }, | ||
| 1798 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
| 1799 | }, | ||
| 1800 | [AV_PIX_FMT_YUV444P14LE] = { | ||
| 1801 | .name = "yuv444p14le", | ||
| 1802 | .nb_components = 3, | ||
| 1803 | .log2_chroma_w = 0, | ||
| 1804 | .log2_chroma_h = 0, | ||
| 1805 | .comp = { | ||
| 1806 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
| 1807 | { 1, 2, 0, 0, 14 }, /* U */ | ||
| 1808 | { 2, 2, 0, 0, 14 }, /* V */ | ||
| 1809 | }, | ||
| 1810 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 1811 | }, | ||
| 1812 | [AV_PIX_FMT_YUV444P14BE] = { | ||
| 1813 | .name = "yuv444p14be", | ||
| 1814 | .nb_components = 3, | ||
| 1815 | .log2_chroma_w = 0, | ||
| 1816 | .log2_chroma_h = 0, | ||
| 1817 | .comp = { | ||
| 1818 | { 0, 2, 0, 0, 14 }, /* Y */ | ||
| 1819 | { 1, 2, 0, 0, 14 }, /* U */ | ||
| 1820 | { 2, 2, 0, 0, 14 }, /* V */ | ||
| 1821 | }, | ||
| 1822 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR, | ||
| 1823 | }, | ||
| 1824 | [AV_PIX_FMT_D3D11VA_VLD] = { | ||
| 1825 | .name = "d3d11va_vld", | ||
| 1826 | .log2_chroma_w = 1, | ||
| 1827 | .log2_chroma_h = 1, | ||
| 1828 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 1829 | }, | ||
| 1830 | [AV_PIX_FMT_DXVA2_VLD] = { | ||
| 1831 | .name = "dxva2_vld", | ||
| 1832 | .log2_chroma_w = 1, | ||
| 1833 | .log2_chroma_h = 1, | ||
| 1834 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 1835 | }, | ||
| 1836 | [AV_PIX_FMT_YA8] = { | ||
| 1837 | .name = "ya8", | ||
| 1838 | .nb_components = 2, | ||
| 1839 | .comp = { | ||
| 1840 | { 0, 2, 0, 0, 8 }, /* Y */ | ||
| 1841 | { 0, 2, 1, 0, 8 }, /* A */ | ||
| 1842 | }, | ||
| 1843 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
| 1844 | .alias = "gray8a", | ||
| 1845 | }, | ||
| 1846 | [AV_PIX_FMT_YA16LE] = { | ||
| 1847 | .name = "ya16le", | ||
| 1848 | .nb_components = 2, | ||
| 1849 | .comp = { | ||
| 1850 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
| 1851 | { 0, 4, 2, 0, 16 }, /* A */ | ||
| 1852 | }, | ||
| 1853 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
| 1854 | }, | ||
| 1855 | [AV_PIX_FMT_YA16BE] = { | ||
| 1856 | .name = "ya16be", | ||
| 1857 | .nb_components = 2, | ||
| 1858 | .comp = { | ||
| 1859 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
| 1860 | { 0, 4, 2, 0, 16 }, /* A */ | ||
| 1861 | }, | ||
| 1862 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA, | ||
| 1863 | }, | ||
| 1864 | [AV_PIX_FMT_VIDEOTOOLBOX] = { | ||
| 1865 | .name = "videotoolbox_vld", | ||
| 1866 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 1867 | }, | ||
| 1868 | [AV_PIX_FMT_GBRP] = { | ||
| 1869 | .name = "gbrp", | ||
| 1870 | .nb_components = 3, | ||
| 1871 | .log2_chroma_w = 0, | ||
| 1872 | .log2_chroma_h = 0, | ||
| 1873 | .comp = { | ||
| 1874 | { 2, 1, 0, 0, 8 }, /* R */ | ||
| 1875 | { 0, 1, 0, 0, 8 }, /* G */ | ||
| 1876 | { 1, 1, 0, 0, 8 }, /* B */ | ||
| 1877 | }, | ||
| 1878 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1879 | }, | ||
| 1880 | [AV_PIX_FMT_GBRP9LE] = { | ||
| 1881 | .name = "gbrp9le", | ||
| 1882 | .nb_components = 3, | ||
| 1883 | .log2_chroma_w = 0, | ||
| 1884 | .log2_chroma_h = 0, | ||
| 1885 | .comp = { | ||
| 1886 | { 2, 2, 0, 0, 9 }, /* R */ | ||
| 1887 | { 0, 2, 0, 0, 9 }, /* G */ | ||
| 1888 | { 1, 2, 0, 0, 9 }, /* B */ | ||
| 1889 | }, | ||
| 1890 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1891 | }, | ||
| 1892 | [AV_PIX_FMT_GBRP9BE] = { | ||
| 1893 | .name = "gbrp9be", | ||
| 1894 | .nb_components = 3, | ||
| 1895 | .log2_chroma_w = 0, | ||
| 1896 | .log2_chroma_h = 0, | ||
| 1897 | .comp = { | ||
| 1898 | { 2, 2, 0, 0, 9 }, /* R */ | ||
| 1899 | { 0, 2, 0, 0, 9 }, /* G */ | ||
| 1900 | { 1, 2, 0, 0, 9 }, /* B */ | ||
| 1901 | }, | ||
| 1902 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1903 | }, | ||
| 1904 | [AV_PIX_FMT_GBRP10LE] = { | ||
| 1905 | .name = "gbrp10le", | ||
| 1906 | .nb_components = 3, | ||
| 1907 | .log2_chroma_w = 0, | ||
| 1908 | .log2_chroma_h = 0, | ||
| 1909 | .comp = { | ||
| 1910 | { 2, 2, 0, 0, 10 }, /* R */ | ||
| 1911 | { 0, 2, 0, 0, 10 }, /* G */ | ||
| 1912 | { 1, 2, 0, 0, 10 }, /* B */ | ||
| 1913 | }, | ||
| 1914 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1915 | }, | ||
| 1916 | [AV_PIX_FMT_GBRP10BE] = { | ||
| 1917 | .name = "gbrp10be", | ||
| 1918 | .nb_components = 3, | ||
| 1919 | .log2_chroma_w = 0, | ||
| 1920 | .log2_chroma_h = 0, | ||
| 1921 | .comp = { | ||
| 1922 | { 2, 2, 0, 0, 10 }, /* R */ | ||
| 1923 | { 0, 2, 0, 0, 10 }, /* G */ | ||
| 1924 | { 1, 2, 0, 0, 10 }, /* B */ | ||
| 1925 | }, | ||
| 1926 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1927 | }, | ||
| 1928 | [AV_PIX_FMT_GBRP10MSBLE] = { | ||
| 1929 | .name = "gbrp10msble", | ||
| 1930 | .nb_components = 3, | ||
| 1931 | .log2_chroma_w = 0, | ||
| 1932 | .log2_chroma_h = 0, | ||
| 1933 | .comp = { | ||
| 1934 | { 2, 2, 0, 6, 10 }, /* R */ | ||
| 1935 | { 0, 2, 0, 6, 10 }, /* G */ | ||
| 1936 | { 1, 2, 0, 6, 10 }, /* B */ | ||
| 1937 | }, | ||
| 1938 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1939 | }, | ||
| 1940 | [AV_PIX_FMT_GBRP10MSBBE] = { | ||
| 1941 | .name = "gbrp10msbbe", | ||
| 1942 | .nb_components = 3, | ||
| 1943 | .log2_chroma_w = 0, | ||
| 1944 | .log2_chroma_h = 0, | ||
| 1945 | .comp = { | ||
| 1946 | { 2, 2, 0, 6, 10 }, /* R */ | ||
| 1947 | { 0, 2, 0, 6, 10 }, /* G */ | ||
| 1948 | { 1, 2, 0, 6, 10 }, /* B */ | ||
| 1949 | }, | ||
| 1950 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1951 | }, | ||
| 1952 | [AV_PIX_FMT_GBRP12LE] = { | ||
| 1953 | .name = "gbrp12le", | ||
| 1954 | .nb_components = 3, | ||
| 1955 | .log2_chroma_w = 0, | ||
| 1956 | .log2_chroma_h = 0, | ||
| 1957 | .comp = { | ||
| 1958 | { 2, 2, 0, 0, 12 }, /* R */ | ||
| 1959 | { 0, 2, 0, 0, 12 }, /* G */ | ||
| 1960 | { 1, 2, 0, 0, 12 }, /* B */ | ||
| 1961 | }, | ||
| 1962 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1963 | }, | ||
| 1964 | [AV_PIX_FMT_GBRP12BE] = { | ||
| 1965 | .name = "gbrp12be", | ||
| 1966 | .nb_components = 3, | ||
| 1967 | .log2_chroma_w = 0, | ||
| 1968 | .log2_chroma_h = 0, | ||
| 1969 | .comp = { | ||
| 1970 | { 2, 2, 0, 0, 12 }, /* R */ | ||
| 1971 | { 0, 2, 0, 0, 12 }, /* G */ | ||
| 1972 | { 1, 2, 0, 0, 12 }, /* B */ | ||
| 1973 | }, | ||
| 1974 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1975 | }, | ||
| 1976 | [AV_PIX_FMT_GBRP12MSBLE] = { | ||
| 1977 | .name = "gbrp12msble", | ||
| 1978 | .nb_components = 3, | ||
| 1979 | .log2_chroma_w = 0, | ||
| 1980 | .log2_chroma_h = 0, | ||
| 1981 | .comp = { | ||
| 1982 | { 2, 2, 0, 4, 12 }, /* R */ | ||
| 1983 | { 0, 2, 0, 4, 12 }, /* G */ | ||
| 1984 | { 1, 2, 0, 4, 12 }, /* B */ | ||
| 1985 | }, | ||
| 1986 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1987 | }, | ||
| 1988 | [AV_PIX_FMT_GBRP12MSBBE] = { | ||
| 1989 | .name = "gbrp12msbbe", | ||
| 1990 | .nb_components = 3, | ||
| 1991 | .log2_chroma_w = 0, | ||
| 1992 | .log2_chroma_h = 0, | ||
| 1993 | .comp = { | ||
| 1994 | { 2, 2, 0, 4, 12 }, /* R */ | ||
| 1995 | { 0, 2, 0, 4, 12 }, /* G */ | ||
| 1996 | { 1, 2, 0, 4, 12 }, /* B */ | ||
| 1997 | }, | ||
| 1998 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 1999 | }, | ||
| 2000 | [AV_PIX_FMT_GBRP14LE] = { | ||
| 2001 | .name = "gbrp14le", | ||
| 2002 | .nb_components = 3, | ||
| 2003 | .log2_chroma_w = 0, | ||
| 2004 | .log2_chroma_h = 0, | ||
| 2005 | .comp = { | ||
| 2006 | { 2, 2, 0, 0, 14 }, /* R */ | ||
| 2007 | { 0, 2, 0, 0, 14 }, /* G */ | ||
| 2008 | { 1, 2, 0, 0, 14 }, /* B */ | ||
| 2009 | }, | ||
| 2010 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 2011 | }, | ||
| 2012 | [AV_PIX_FMT_GBRP14BE] = { | ||
| 2013 | .name = "gbrp14be", | ||
| 2014 | .nb_components = 3, | ||
| 2015 | .log2_chroma_w = 0, | ||
| 2016 | .log2_chroma_h = 0, | ||
| 2017 | .comp = { | ||
| 2018 | { 2, 2, 0, 0, 14 }, /* R */ | ||
| 2019 | { 0, 2, 0, 0, 14 }, /* G */ | ||
| 2020 | { 1, 2, 0, 0, 14 }, /* B */ | ||
| 2021 | }, | ||
| 2022 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 2023 | }, | ||
| 2024 | [AV_PIX_FMT_GBRP16LE] = { | ||
| 2025 | .name = "gbrp16le", | ||
| 2026 | .nb_components = 3, | ||
| 2027 | .log2_chroma_w = 0, | ||
| 2028 | .log2_chroma_h = 0, | ||
| 2029 | .comp = { | ||
| 2030 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2031 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2032 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2033 | }, | ||
| 2034 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 2035 | }, | ||
| 2036 | [AV_PIX_FMT_GBRP16BE] = { | ||
| 2037 | .name = "gbrp16be", | ||
| 2038 | .nb_components = 3, | ||
| 2039 | .log2_chroma_w = 0, | ||
| 2040 | .log2_chroma_h = 0, | ||
| 2041 | .comp = { | ||
| 2042 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2043 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2044 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2045 | }, | ||
| 2046 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB, | ||
| 2047 | }, | ||
| 2048 | [AV_PIX_FMT_GBRAP] = { | ||
| 2049 | .name = "gbrap", | ||
| 2050 | .nb_components = 4, | ||
| 2051 | .log2_chroma_w = 0, | ||
| 2052 | .log2_chroma_h = 0, | ||
| 2053 | .comp = { | ||
| 2054 | { 2, 1, 0, 0, 8 }, /* R */ | ||
| 2055 | { 0, 1, 0, 0, 8 }, /* G */ | ||
| 2056 | { 1, 1, 0, 0, 8 }, /* B */ | ||
| 2057 | { 3, 1, 0, 0, 8 }, /* A */ | ||
| 2058 | }, | ||
| 2059 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
| 2060 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2061 | }, | ||
| 2062 | [AV_PIX_FMT_GBRAP16LE] = { | ||
| 2063 | .name = "gbrap16le", | ||
| 2064 | .nb_components = 4, | ||
| 2065 | .log2_chroma_w = 0, | ||
| 2066 | .log2_chroma_h = 0, | ||
| 2067 | .comp = { | ||
| 2068 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2069 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2070 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2071 | { 3, 2, 0, 0, 16 }, /* A */ | ||
| 2072 | }, | ||
| 2073 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
| 2074 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2075 | }, | ||
| 2076 | [AV_PIX_FMT_GBRAP16BE] = { | ||
| 2077 | .name = "gbrap16be", | ||
| 2078 | .nb_components = 4, | ||
| 2079 | .log2_chroma_w = 0, | ||
| 2080 | .log2_chroma_h = 0, | ||
| 2081 | .comp = { | ||
| 2082 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2083 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2084 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2085 | { 3, 2, 0, 0, 16 }, /* A */ | ||
| 2086 | }, | ||
| 2087 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2088 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2089 | }, | ||
| 2090 | [AV_PIX_FMT_GBRAP32LE] = { | ||
| 2091 | .name = "gbrap32le", | ||
| 2092 | .nb_components = 4, | ||
| 2093 | .log2_chroma_w = 0, | ||
| 2094 | .log2_chroma_h = 0, | ||
| 2095 | .comp = { | ||
| 2096 | { 2, 4, 0, 0, 32 }, /* R */ | ||
| 2097 | { 0, 4, 0, 0, 32 }, /* G */ | ||
| 2098 | { 1, 4, 0, 0, 32 }, /* B */ | ||
| 2099 | { 3, 4, 0, 0, 32 }, /* A */ | ||
| 2100 | }, | ||
| 2101 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
| 2102 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2103 | }, | ||
| 2104 | [AV_PIX_FMT_GBRAP32BE] = { | ||
| 2105 | .name = "gbrap32be", | ||
| 2106 | .nb_components = 4, | ||
| 2107 | .log2_chroma_w = 0, | ||
| 2108 | .log2_chroma_h = 0, | ||
| 2109 | .comp = { | ||
| 2110 | { 2, 4, 0, 0, 32 }, /* R */ | ||
| 2111 | { 0, 4, 0, 0, 32 }, /* G */ | ||
| 2112 | { 1, 4, 0, 0, 32 }, /* B */ | ||
| 2113 | { 3, 4, 0, 0, 32 }, /* A */ | ||
| 2114 | }, | ||
| 2115 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2116 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2117 | }, | ||
| 2118 | [AV_PIX_FMT_VDPAU] = { | ||
| 2119 | .name = "vdpau", | ||
| 2120 | .log2_chroma_w = 1, | ||
| 2121 | .log2_chroma_h = 1, | ||
| 2122 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2123 | }, | ||
| 2124 | [AV_PIX_FMT_XYZ12LE] = { | ||
| 2125 | .name = "xyz12le", | ||
| 2126 | .nb_components = 3, | ||
| 2127 | .log2_chroma_w = 0, | ||
| 2128 | .log2_chroma_h = 0, | ||
| 2129 | .comp = { | ||
| 2130 | { 0, 6, 0, 4, 12 }, /* X */ | ||
| 2131 | { 0, 6, 2, 4, 12 }, /* Y */ | ||
| 2132 | { 0, 6, 4, 4, 12 }, /* Z */ | ||
| 2133 | }, | ||
| 2134 | .flags = AV_PIX_FMT_FLAG_XYZ, | ||
| 2135 | }, | ||
| 2136 | [AV_PIX_FMT_XYZ12BE] = { | ||
| 2137 | .name = "xyz12be", | ||
| 2138 | .nb_components = 3, | ||
| 2139 | .log2_chroma_w = 0, | ||
| 2140 | .log2_chroma_h = 0, | ||
| 2141 | .comp = { | ||
| 2142 | { 0, 6, 0, 4, 12 }, /* X */ | ||
| 2143 | { 0, 6, 2, 4, 12 }, /* Y */ | ||
| 2144 | { 0, 6, 4, 4, 12 }, /* Z */ | ||
| 2145 | }, | ||
| 2146 | .flags = AV_PIX_FMT_FLAG_XYZ | AV_PIX_FMT_FLAG_BE, | ||
| 2147 | }, | ||
| 2148 | |||
| 2149 | #define BAYER8_DESC_COMMON \ | ||
| 2150 | .nb_components= 3, \ | ||
| 2151 | .log2_chroma_w= 0, \ | ||
| 2152 | .log2_chroma_h= 0, \ | ||
| 2153 | .comp = { \ | ||
| 2154 | { 0, 1, 0, 0, 2 }, \ | ||
| 2155 | { 0, 1, 0, 0, 4 }, \ | ||
| 2156 | { 0, 1, 0, 0, 2 }, \ | ||
| 2157 | }, \ | ||
| 2158 | |||
| 2159 | #define BAYER16_DESC_COMMON \ | ||
| 2160 | .nb_components= 3, \ | ||
| 2161 | .log2_chroma_w= 0, \ | ||
| 2162 | .log2_chroma_h= 0, \ | ||
| 2163 | .comp = { \ | ||
| 2164 | { 0, 2, 0, 0, 4 }, \ | ||
| 2165 | { 0, 2, 0, 0, 8 }, \ | ||
| 2166 | { 0, 2, 0, 0, 4 }, \ | ||
| 2167 | }, \ | ||
| 2168 | |||
| 2169 | [AV_PIX_FMT_BAYER_BGGR8] = { | ||
| 2170 | .name = "bayer_bggr8", | ||
| 2171 | BAYER8_DESC_COMMON | ||
| 2172 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2173 | }, | ||
| 2174 | [AV_PIX_FMT_BAYER_BGGR16LE] = { | ||
| 2175 | .name = "bayer_bggr16le", | ||
| 2176 | BAYER16_DESC_COMMON | ||
| 2177 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2178 | }, | ||
| 2179 | [AV_PIX_FMT_BAYER_BGGR16BE] = { | ||
| 2180 | .name = "bayer_bggr16be", | ||
| 2181 | BAYER16_DESC_COMMON | ||
| 2182 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2183 | }, | ||
| 2184 | [AV_PIX_FMT_BAYER_RGGB8] = { | ||
| 2185 | .name = "bayer_rggb8", | ||
| 2186 | BAYER8_DESC_COMMON | ||
| 2187 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2188 | }, | ||
| 2189 | [AV_PIX_FMT_BAYER_RGGB16LE] = { | ||
| 2190 | .name = "bayer_rggb16le", | ||
| 2191 | BAYER16_DESC_COMMON | ||
| 2192 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2193 | }, | ||
| 2194 | [AV_PIX_FMT_BAYER_RGGB16BE] = { | ||
| 2195 | .name = "bayer_rggb16be", | ||
| 2196 | BAYER16_DESC_COMMON | ||
| 2197 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2198 | }, | ||
| 2199 | [AV_PIX_FMT_BAYER_GBRG8] = { | ||
| 2200 | .name = "bayer_gbrg8", | ||
| 2201 | BAYER8_DESC_COMMON | ||
| 2202 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2203 | }, | ||
| 2204 | [AV_PIX_FMT_BAYER_GBRG16LE] = { | ||
| 2205 | .name = "bayer_gbrg16le", | ||
| 2206 | BAYER16_DESC_COMMON | ||
| 2207 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2208 | }, | ||
| 2209 | [AV_PIX_FMT_BAYER_GBRG16BE] = { | ||
| 2210 | .name = "bayer_gbrg16be", | ||
| 2211 | BAYER16_DESC_COMMON | ||
| 2212 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2213 | }, | ||
| 2214 | [AV_PIX_FMT_BAYER_GRBG8] = { | ||
| 2215 | .name = "bayer_grbg8", | ||
| 2216 | BAYER8_DESC_COMMON | ||
| 2217 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2218 | }, | ||
| 2219 | [AV_PIX_FMT_BAYER_GRBG16LE] = { | ||
| 2220 | .name = "bayer_grbg16le", | ||
| 2221 | BAYER16_DESC_COMMON | ||
| 2222 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2223 | }, | ||
| 2224 | [AV_PIX_FMT_BAYER_GRBG16BE] = { | ||
| 2225 | .name = "bayer_grbg16be", | ||
| 2226 | BAYER16_DESC_COMMON | ||
| 2227 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BAYER, | ||
| 2228 | }, | ||
| 2229 | [AV_PIX_FMT_NV16] = { | ||
| 2230 | .name = "nv16", | ||
| 2231 | .nb_components = 3, | ||
| 2232 | .log2_chroma_w = 1, | ||
| 2233 | .log2_chroma_h = 0, | ||
| 2234 | .comp = { | ||
| 2235 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
| 2236 | { 1, 2, 0, 0, 8 }, /* U */ | ||
| 2237 | { 1, 2, 1, 0, 8 }, /* V */ | ||
| 2238 | }, | ||
| 2239 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2240 | }, | ||
| 2241 | [AV_PIX_FMT_NV20LE] = { | ||
| 2242 | .name = "nv20le", | ||
| 2243 | .nb_components = 3, | ||
| 2244 | .log2_chroma_w = 1, | ||
| 2245 | .log2_chroma_h = 0, | ||
| 2246 | .comp = { | ||
| 2247 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
| 2248 | { 1, 4, 0, 0, 10 }, /* U */ | ||
| 2249 | { 1, 4, 2, 0, 10 }, /* V */ | ||
| 2250 | }, | ||
| 2251 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2252 | }, | ||
| 2253 | [AV_PIX_FMT_NV20BE] = { | ||
| 2254 | .name = "nv20be", | ||
| 2255 | .nb_components = 3, | ||
| 2256 | .log2_chroma_w = 1, | ||
| 2257 | .log2_chroma_h = 0, | ||
| 2258 | .comp = { | ||
| 2259 | { 0, 2, 0, 0, 10 }, /* Y */ | ||
| 2260 | { 1, 4, 0, 0, 10 }, /* U */ | ||
| 2261 | { 1, 4, 2, 0, 10 }, /* V */ | ||
| 2262 | }, | ||
| 2263 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2264 | }, | ||
| 2265 | [AV_PIX_FMT_QSV] = { | ||
| 2266 | .name = "qsv", | ||
| 2267 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2268 | }, | ||
| 2269 | [AV_PIX_FMT_MEDIACODEC] = { | ||
| 2270 | .name = "mediacodec", | ||
| 2271 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2272 | }, | ||
| 2273 | [AV_PIX_FMT_MMAL] = { | ||
| 2274 | .name = "mmal", | ||
| 2275 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2276 | }, | ||
| 2277 | [AV_PIX_FMT_CUDA] = { | ||
| 2278 | .name = "cuda", | ||
| 2279 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2280 | }, | ||
| 2281 | [AV_PIX_FMT_AMF_SURFACE] = { | ||
| 2282 | .name = "amf", | ||
| 2283 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2284 | }, | ||
| 2285 | [AV_PIX_FMT_VYU444] = { | ||
| 2286 | .name = "vyu444", | ||
| 2287 | .nb_components = 3, | ||
| 2288 | .log2_chroma_w = 0, | ||
| 2289 | .log2_chroma_h = 0, | ||
| 2290 | .comp = { | ||
| 2291 | { 0, 3, 1, 0, 8 }, /* Y */ | ||
| 2292 | { 0, 3, 2, 0, 8 }, /* U */ | ||
| 2293 | { 0, 3, 0, 0, 8 }, /* V */ | ||
| 2294 | }, | ||
| 2295 | }, | ||
| 2296 | [AV_PIX_FMT_UYVA] = { | ||
| 2297 | .name = "uyva", | ||
| 2298 | .nb_components = 4, | ||
| 2299 | .log2_chroma_w = 0, | ||
| 2300 | .log2_chroma_h = 0, | ||
| 2301 | .comp = { | ||
| 2302 | { 0, 4, 1, 0, 8 }, /* Y */ | ||
| 2303 | { 0, 4, 0, 0, 8 }, /* U */ | ||
| 2304 | { 0, 4, 2, 0, 8 }, /* V */ | ||
| 2305 | { 0, 4, 3, 0, 8 }, /* A */ | ||
| 2306 | }, | ||
| 2307 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
| 2308 | }, | ||
| 2309 | [AV_PIX_FMT_AYUV] = { | ||
| 2310 | .name = "ayuv", | ||
| 2311 | .nb_components = 4, | ||
| 2312 | .log2_chroma_w = 0, | ||
| 2313 | .log2_chroma_h = 0, | ||
| 2314 | .comp = { | ||
| 2315 | { 0, 4, 1, 0, 8 }, /* Y */ | ||
| 2316 | { 0, 4, 2, 0, 8 }, /* U */ | ||
| 2317 | { 0, 4, 3, 0, 8 }, /* V */ | ||
| 2318 | { 0, 4, 0, 0, 8 }, /* A */ | ||
| 2319 | }, | ||
| 2320 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
| 2321 | }, | ||
| 2322 | [AV_PIX_FMT_AYUV64LE] = { | ||
| 2323 | .name = "ayuv64le", | ||
| 2324 | .nb_components = 4, | ||
| 2325 | .log2_chroma_w = 0, | ||
| 2326 | .log2_chroma_h = 0, | ||
| 2327 | .comp = { | ||
| 2328 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
| 2329 | { 0, 8, 4, 0, 16 }, /* U */ | ||
| 2330 | { 0, 8, 6, 0, 16 }, /* V */ | ||
| 2331 | { 0, 8, 0, 0, 16 }, /* A */ | ||
| 2332 | }, | ||
| 2333 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
| 2334 | }, | ||
| 2335 | [AV_PIX_FMT_AYUV64BE] = { | ||
| 2336 | .name = "ayuv64be", | ||
| 2337 | .nb_components = 4, | ||
| 2338 | .log2_chroma_w = 0, | ||
| 2339 | .log2_chroma_h = 0, | ||
| 2340 | .comp = { | ||
| 2341 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
| 2342 | { 0, 8, 4, 0, 16 }, /* U */ | ||
| 2343 | { 0, 8, 6, 0, 16 }, /* V */ | ||
| 2344 | { 0, 8, 0, 0, 16 }, /* A */ | ||
| 2345 | }, | ||
| 2346 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2347 | }, | ||
| 2348 | [AV_PIX_FMT_P010LE] = { | ||
| 2349 | .name = "p010le", | ||
| 2350 | .nb_components = 3, | ||
| 2351 | .log2_chroma_w = 1, | ||
| 2352 | .log2_chroma_h = 1, | ||
| 2353 | .comp = { | ||
| 2354 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 2355 | { 1, 4, 0, 6, 10 }, /* U */ | ||
| 2356 | { 1, 4, 2, 6, 10 }, /* V */ | ||
| 2357 | }, | ||
| 2358 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2359 | }, | ||
| 2360 | [AV_PIX_FMT_P010BE] = { | ||
| 2361 | .name = "p010be", | ||
| 2362 | .nb_components = 3, | ||
| 2363 | .log2_chroma_w = 1, | ||
| 2364 | .log2_chroma_h = 1, | ||
| 2365 | .comp = { | ||
| 2366 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 2367 | { 1, 4, 0, 6, 10 }, /* U */ | ||
| 2368 | { 1, 4, 2, 6, 10 }, /* V */ | ||
| 2369 | }, | ||
| 2370 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2371 | }, | ||
| 2372 | [AV_PIX_FMT_P012LE] = { | ||
| 2373 | .name = "p012le", | ||
| 2374 | .nb_components = 3, | ||
| 2375 | .log2_chroma_w = 1, | ||
| 2376 | .log2_chroma_h = 1, | ||
| 2377 | .comp = { | ||
| 2378 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 2379 | { 1, 4, 0, 4, 12 }, /* U */ | ||
| 2380 | { 1, 4, 2, 4, 12 }, /* V */ | ||
| 2381 | }, | ||
| 2382 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2383 | }, | ||
| 2384 | [AV_PIX_FMT_P012BE] = { | ||
| 2385 | .name = "p012be", | ||
| 2386 | .nb_components = 3, | ||
| 2387 | .log2_chroma_w = 1, | ||
| 2388 | .log2_chroma_h = 1, | ||
| 2389 | .comp = { | ||
| 2390 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 2391 | { 1, 4, 0, 4, 12 }, /* U */ | ||
| 2392 | { 1, 4, 2, 4, 12 }, /* V */ | ||
| 2393 | }, | ||
| 2394 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2395 | }, | ||
| 2396 | [AV_PIX_FMT_P016LE] = { | ||
| 2397 | .name = "p016le", | ||
| 2398 | .nb_components = 3, | ||
| 2399 | .log2_chroma_w = 1, | ||
| 2400 | .log2_chroma_h = 1, | ||
| 2401 | .comp = { | ||
| 2402 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2403 | { 1, 4, 0, 0, 16 }, /* U */ | ||
| 2404 | { 1, 4, 2, 0, 16 }, /* V */ | ||
| 2405 | }, | ||
| 2406 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2407 | }, | ||
| 2408 | [AV_PIX_FMT_P016BE] = { | ||
| 2409 | .name = "p016be", | ||
| 2410 | .nb_components = 3, | ||
| 2411 | .log2_chroma_w = 1, | ||
| 2412 | .log2_chroma_h = 1, | ||
| 2413 | .comp = { | ||
| 2414 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2415 | { 1, 4, 0, 0, 16 }, /* U */ | ||
| 2416 | { 1, 4, 2, 0, 16 }, /* V */ | ||
| 2417 | }, | ||
| 2418 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2419 | }, | ||
| 2420 | [AV_PIX_FMT_GBRAP14LE] = { | ||
| 2421 | .name = "gbrap14le", | ||
| 2422 | .nb_components = 4, | ||
| 2423 | .log2_chroma_w = 0, | ||
| 2424 | .log2_chroma_h = 0, | ||
| 2425 | .comp = { | ||
| 2426 | { 2, 2, 0, 0, 14 }, /* R */ | ||
| 2427 | { 0, 2, 0, 0, 14 }, /* G */ | ||
| 2428 | { 1, 2, 0, 0, 14 }, /* B */ | ||
| 2429 | { 3, 2, 0, 0, 14 }, /* A */ | ||
| 2430 | }, | ||
| 2431 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
| 2432 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2433 | }, | ||
| 2434 | [AV_PIX_FMT_GBRAP14BE] = { | ||
| 2435 | .name = "gbrap14be", | ||
| 2436 | .nb_components = 4, | ||
| 2437 | .log2_chroma_w = 0, | ||
| 2438 | .log2_chroma_h = 0, | ||
| 2439 | .comp = { | ||
| 2440 | { 2, 2, 0, 0, 14 }, /* R */ | ||
| 2441 | { 0, 2, 0, 0, 14 }, /* G */ | ||
| 2442 | { 1, 2, 0, 0, 14 }, /* B */ | ||
| 2443 | { 3, 2, 0, 0, 14 }, /* A */ | ||
| 2444 | }, | ||
| 2445 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2446 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2447 | }, | ||
| 2448 | [AV_PIX_FMT_GBRAP12LE] = { | ||
| 2449 | .name = "gbrap12le", | ||
| 2450 | .nb_components = 4, | ||
| 2451 | .log2_chroma_w = 0, | ||
| 2452 | .log2_chroma_h = 0, | ||
| 2453 | .comp = { | ||
| 2454 | { 2, 2, 0, 0, 12 }, /* R */ | ||
| 2455 | { 0, 2, 0, 0, 12 }, /* G */ | ||
| 2456 | { 1, 2, 0, 0, 12 }, /* B */ | ||
| 2457 | { 3, 2, 0, 0, 12 }, /* A */ | ||
| 2458 | }, | ||
| 2459 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
| 2460 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2461 | }, | ||
| 2462 | [AV_PIX_FMT_GBRAP12BE] = { | ||
| 2463 | .name = "gbrap12be", | ||
| 2464 | .nb_components = 4, | ||
| 2465 | .log2_chroma_w = 0, | ||
| 2466 | .log2_chroma_h = 0, | ||
| 2467 | .comp = { | ||
| 2468 | { 2, 2, 0, 0, 12 }, /* R */ | ||
| 2469 | { 0, 2, 0, 0, 12 }, /* G */ | ||
| 2470 | { 1, 2, 0, 0, 12 }, /* B */ | ||
| 2471 | { 3, 2, 0, 0, 12 }, /* A */ | ||
| 2472 | }, | ||
| 2473 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2474 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2475 | }, | ||
| 2476 | [AV_PIX_FMT_GBRAP10LE] = { | ||
| 2477 | .name = "gbrap10le", | ||
| 2478 | .nb_components = 4, | ||
| 2479 | .log2_chroma_w = 0, | ||
| 2480 | .log2_chroma_h = 0, | ||
| 2481 | .comp = { | ||
| 2482 | { 2, 2, 0, 0, 10 }, /* R */ | ||
| 2483 | { 0, 2, 0, 0, 10 }, /* G */ | ||
| 2484 | { 1, 2, 0, 0, 10 }, /* B */ | ||
| 2485 | { 3, 2, 0, 0, 10 }, /* A */ | ||
| 2486 | }, | ||
| 2487 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | | ||
| 2488 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2489 | }, | ||
| 2490 | [AV_PIX_FMT_GBRAP10BE] = { | ||
| 2491 | .name = "gbrap10be", | ||
| 2492 | .nb_components = 4, | ||
| 2493 | .log2_chroma_w = 0, | ||
| 2494 | .log2_chroma_h = 0, | ||
| 2495 | .comp = { | ||
| 2496 | { 2, 2, 0, 0, 10 }, /* R */ | ||
| 2497 | { 0, 2, 0, 0, 10 }, /* G */ | ||
| 2498 | { 1, 2, 0, 0, 10 }, /* B */ | ||
| 2499 | { 3, 2, 0, 0, 10 }, /* A */ | ||
| 2500 | }, | ||
| 2501 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2502 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2503 | }, | ||
| 2504 | [AV_PIX_FMT_D3D11] = { | ||
| 2505 | .name = "d3d11", | ||
| 2506 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2507 | }, | ||
| 2508 | [AV_PIX_FMT_D3D12] = { | ||
| 2509 | .name = "d3d12", | ||
| 2510 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2511 | }, | ||
| 2512 | [AV_PIX_FMT_GBRPF32BE] = { | ||
| 2513 | .name = "gbrpf32be", | ||
| 2514 | .nb_components = 3, | ||
| 2515 | .log2_chroma_w = 0, | ||
| 2516 | .log2_chroma_h = 0, | ||
| 2517 | .comp = { | ||
| 2518 | { 2, 4, 0, 0, 32 }, /* R */ | ||
| 2519 | { 0, 4, 0, 0, 32 }, /* G */ | ||
| 2520 | { 1, 4, 0, 0, 32 }, /* B */ | ||
| 2521 | }, | ||
| 2522 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2523 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2524 | }, | ||
| 2525 | [AV_PIX_FMT_GBRPF32LE] = { | ||
| 2526 | .name = "gbrpf32le", | ||
| 2527 | .nb_components = 3, | ||
| 2528 | .log2_chroma_w = 0, | ||
| 2529 | .log2_chroma_h = 0, | ||
| 2530 | .comp = { | ||
| 2531 | { 2, 4, 0, 0, 32 }, /* R */ | ||
| 2532 | { 0, 4, 0, 0, 32 }, /* G */ | ||
| 2533 | { 1, 4, 0, 0, 32 }, /* B */ | ||
| 2534 | }, | ||
| 2535 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_RGB, | ||
| 2536 | }, | ||
| 2537 | [AV_PIX_FMT_GBRAPF32BE] = { | ||
| 2538 | .name = "gbrapf32be", | ||
| 2539 | .nb_components = 4, | ||
| 2540 | .log2_chroma_w = 0, | ||
| 2541 | .log2_chroma_h = 0, | ||
| 2542 | .comp = { | ||
| 2543 | { 2, 4, 0, 0, 32 }, /* R */ | ||
| 2544 | { 0, 4, 0, 0, 32 }, /* G */ | ||
| 2545 | { 1, 4, 0, 0, 32 }, /* B */ | ||
| 2546 | { 3, 4, 0, 0, 32 }, /* A */ | ||
| 2547 | }, | ||
| 2548 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2549 | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB | | ||
| 2550 | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2551 | }, | ||
| 2552 | [AV_PIX_FMT_GBRAPF32LE] = { | ||
| 2553 | .name = "gbrapf32le", | ||
| 2554 | .nb_components = 4, | ||
| 2555 | .log2_chroma_w = 0, | ||
| 2556 | .log2_chroma_h = 0, | ||
| 2557 | .comp = { | ||
| 2558 | { 2, 4, 0, 0, 32 }, /* R */ | ||
| 2559 | { 0, 4, 0, 0, 32 }, /* G */ | ||
| 2560 | { 1, 4, 0, 0, 32 }, /* B */ | ||
| 2561 | { 3, 4, 0, 0, 32 }, /* A */ | ||
| 2562 | }, | ||
| 2563 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA | | ||
| 2564 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2565 | }, | ||
| 2566 | [AV_PIX_FMT_GBRPF16BE] = { | ||
| 2567 | .name = "gbrpf16be", | ||
| 2568 | .nb_components = 3, | ||
| 2569 | .log2_chroma_w = 0, | ||
| 2570 | .log2_chroma_h = 0, | ||
| 2571 | .comp = { | ||
| 2572 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2573 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2574 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2575 | }, | ||
| 2576 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2577 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2578 | }, | ||
| 2579 | [AV_PIX_FMT_GBRPF16LE] = { | ||
| 2580 | .name = "gbrpf16le", | ||
| 2581 | .nb_components = 3, | ||
| 2582 | .log2_chroma_w = 0, | ||
| 2583 | .log2_chroma_h = 0, | ||
| 2584 | .comp = { | ||
| 2585 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2586 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2587 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2588 | }, | ||
| 2589 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_RGB, | ||
| 2590 | }, | ||
| 2591 | [AV_PIX_FMT_GBRAPF16BE] = { | ||
| 2592 | .name = "gbrapf16be", | ||
| 2593 | .nb_components = 4, | ||
| 2594 | .log2_chroma_w = 0, | ||
| 2595 | .log2_chroma_h = 0, | ||
| 2596 | .comp = { | ||
| 2597 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2598 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2599 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2600 | { 3, 2, 0, 0, 16 }, /* A */ | ||
| 2601 | }, | ||
| 2602 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | | ||
| 2603 | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_RGB | | ||
| 2604 | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2605 | }, | ||
| 2606 | [AV_PIX_FMT_GBRAPF16LE] = { | ||
| 2607 | .name = "gbrapf16le", | ||
| 2608 | .nb_components = 4, | ||
| 2609 | .log2_chroma_w = 0, | ||
| 2610 | .log2_chroma_h = 0, | ||
| 2611 | .comp = { | ||
| 2612 | { 2, 2, 0, 0, 16 }, /* R */ | ||
| 2613 | { 0, 2, 0, 0, 16 }, /* G */ | ||
| 2614 | { 1, 2, 0, 0, 16 }, /* B */ | ||
| 2615 | { 3, 2, 0, 0, 16 }, /* A */ | ||
| 2616 | }, | ||
| 2617 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA | | ||
| 2618 | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2619 | }, | ||
| 2620 | [AV_PIX_FMT_DRM_PRIME] = { | ||
| 2621 | .name = "drm_prime", | ||
| 2622 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2623 | }, | ||
| 2624 | [AV_PIX_FMT_OPENCL] = { | ||
| 2625 | .name = "opencl", | ||
| 2626 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2627 | }, | ||
| 2628 | [AV_PIX_FMT_GRAYF32BE] = { | ||
| 2629 | .name = "grayf32be", | ||
| 2630 | .nb_components = 1, | ||
| 2631 | .log2_chroma_w = 0, | ||
| 2632 | .log2_chroma_h = 0, | ||
| 2633 | .comp = { | ||
| 2634 | { 0, 4, 0, 0, 32 }, /* Y */ | ||
| 2635 | }, | ||
| 2636 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2637 | .alias = "yf32be", | ||
| 2638 | }, | ||
| 2639 | [AV_PIX_FMT_GRAYF32LE] = { | ||
| 2640 | .name = "grayf32le", | ||
| 2641 | .nb_components = 1, | ||
| 2642 | .log2_chroma_w = 0, | ||
| 2643 | .log2_chroma_h = 0, | ||
| 2644 | .comp = { | ||
| 2645 | { 0, 4, 0, 0, 32 }, /* Y */ | ||
| 2646 | }, | ||
| 2647 | .flags = AV_PIX_FMT_FLAG_FLOAT, | ||
| 2648 | .alias = "yf32le", | ||
| 2649 | }, | ||
| 2650 | [AV_PIX_FMT_GRAYF16BE] = { | ||
| 2651 | .name = "grayf16be", | ||
| 2652 | .nb_components = 1, | ||
| 2653 | .log2_chroma_w = 0, | ||
| 2654 | .log2_chroma_h = 0, | ||
| 2655 | .comp = { | ||
| 2656 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2657 | }, | ||
| 2658 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2659 | }, | ||
| 2660 | [AV_PIX_FMT_GRAYF16LE] = { | ||
| 2661 | .name = "grayf16le", | ||
| 2662 | .nb_components = 1, | ||
| 2663 | .log2_chroma_w = 0, | ||
| 2664 | .log2_chroma_h = 0, | ||
| 2665 | .comp = { | ||
| 2666 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2667 | }, | ||
| 2668 | .flags = AV_PIX_FMT_FLAG_FLOAT, | ||
| 2669 | }, | ||
| 2670 | [AV_PIX_FMT_YAF32BE] = { | ||
| 2671 | .name = "yaf32be", | ||
| 2672 | .nb_components = 2, | ||
| 2673 | .log2_chroma_w = 0, | ||
| 2674 | .log2_chroma_h = 0, | ||
| 2675 | .comp = { | ||
| 2676 | { 0, 8, 0, 0, 32 }, /* Y */ | ||
| 2677 | { 0, 8, 4, 0, 32 }, /* A */ | ||
| 2678 | }, | ||
| 2679 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2680 | }, | ||
| 2681 | [AV_PIX_FMT_YAF32LE] = { | ||
| 2682 | .name = "yaf32le", | ||
| 2683 | .nb_components = 2, | ||
| 2684 | .log2_chroma_w = 0, | ||
| 2685 | .log2_chroma_h = 0, | ||
| 2686 | .comp = { | ||
| 2687 | { 0, 8, 0, 0, 32 }, /* Y */ | ||
| 2688 | { 0, 8, 4, 0, 32 }, /* A */ | ||
| 2689 | }, | ||
| 2690 | .flags = AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2691 | }, | ||
| 2692 | [AV_PIX_FMT_YAF16BE] = { | ||
| 2693 | .name = "yaf16be", | ||
| 2694 | .nb_components = 2, | ||
| 2695 | .log2_chroma_w = 0, | ||
| 2696 | .log2_chroma_h = 0, | ||
| 2697 | .comp = { | ||
| 2698 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
| 2699 | { 0, 4, 2, 0, 16 }, /* A */ | ||
| 2700 | }, | ||
| 2701 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2702 | }, | ||
| 2703 | [AV_PIX_FMT_YAF16LE] = { | ||
| 2704 | .name = "yaf16le", | ||
| 2705 | .nb_components = 2, | ||
| 2706 | .log2_chroma_w = 0, | ||
| 2707 | .log2_chroma_h = 0, | ||
| 2708 | .comp = { | ||
| 2709 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
| 2710 | { 0, 4, 2, 0, 16 }, /* A */ | ||
| 2711 | }, | ||
| 2712 | .flags = AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2713 | }, | ||
| 2714 | [AV_PIX_FMT_YUVA422P12BE] = { | ||
| 2715 | .name = "yuva422p12be", | ||
| 2716 | .nb_components = 4, | ||
| 2717 | .log2_chroma_w = 1, | ||
| 2718 | .log2_chroma_h = 0, | ||
| 2719 | .comp = { | ||
| 2720 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
| 2721 | { 1, 2, 0, 0, 12 }, /* U */ | ||
| 2722 | { 2, 2, 0, 0, 12 }, /* V */ | ||
| 2723 | { 3, 2, 0, 0, 12 }, /* A */ | ||
| 2724 | }, | ||
| 2725 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2726 | }, | ||
| 2727 | [AV_PIX_FMT_YUVA422P12LE] = { | ||
| 2728 | .name = "yuva422p12le", | ||
| 2729 | .nb_components = 4, | ||
| 2730 | .log2_chroma_w = 1, | ||
| 2731 | .log2_chroma_h = 0, | ||
| 2732 | .comp = { | ||
| 2733 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
| 2734 | { 1, 2, 0, 0, 12 }, /* U */ | ||
| 2735 | { 2, 2, 0, 0, 12 }, /* V */ | ||
| 2736 | { 3, 2, 0, 0, 12 }, /* A */ | ||
| 2737 | }, | ||
| 2738 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2739 | }, | ||
| 2740 | [AV_PIX_FMT_YUVA444P12BE] = { | ||
| 2741 | .name = "yuva444p12be", | ||
| 2742 | .nb_components = 4, | ||
| 2743 | .log2_chroma_w = 0, | ||
| 2744 | .log2_chroma_h = 0, | ||
| 2745 | .comp = { | ||
| 2746 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
| 2747 | { 1, 2, 0, 0, 12 }, /* U */ | ||
| 2748 | { 2, 2, 0, 0, 12 }, /* V */ | ||
| 2749 | { 3, 2, 0, 0, 12 }, /* A */ | ||
| 2750 | }, | ||
| 2751 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2752 | }, | ||
| 2753 | [AV_PIX_FMT_YUVA444P12LE] = { | ||
| 2754 | .name = "yuva444p12le", | ||
| 2755 | .nb_components = 4, | ||
| 2756 | .log2_chroma_w = 0, | ||
| 2757 | .log2_chroma_h = 0, | ||
| 2758 | .comp = { | ||
| 2759 | { 0, 2, 0, 0, 12 }, /* Y */ | ||
| 2760 | { 1, 2, 0, 0, 12 }, /* U */ | ||
| 2761 | { 2, 2, 0, 0, 12 }, /* V */ | ||
| 2762 | { 3, 2, 0, 0, 12 }, /* A */ | ||
| 2763 | }, | ||
| 2764 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA, | ||
| 2765 | }, | ||
| 2766 | [AV_PIX_FMT_NV24] = { | ||
| 2767 | .name = "nv24", | ||
| 2768 | .nb_components = 3, | ||
| 2769 | .log2_chroma_w = 0, | ||
| 2770 | .log2_chroma_h = 0, | ||
| 2771 | .comp = { | ||
| 2772 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
| 2773 | { 1, 2, 0, 0, 8 }, /* U */ | ||
| 2774 | { 1, 2, 1, 0, 8 }, /* V */ | ||
| 2775 | }, | ||
| 2776 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2777 | }, | ||
| 2778 | [AV_PIX_FMT_NV42] = { | ||
| 2779 | .name = "nv42", | ||
| 2780 | .nb_components = 3, | ||
| 2781 | .log2_chroma_w = 0, | ||
| 2782 | .log2_chroma_h = 0, | ||
| 2783 | .comp = { | ||
| 2784 | { 0, 1, 0, 0, 8 }, /* Y */ | ||
| 2785 | { 1, 2, 1, 0, 8 }, /* U */ | ||
| 2786 | { 1, 2, 0, 0, 8 }, /* V */ | ||
| 2787 | }, | ||
| 2788 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2789 | }, | ||
| 2790 | [AV_PIX_FMT_VULKAN] = { | ||
| 2791 | .name = "vulkan", | ||
| 2792 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 2793 | }, | ||
| 2794 | [AV_PIX_FMT_P210BE] = { | ||
| 2795 | .name = "p210be", | ||
| 2796 | .nb_components = 3, | ||
| 2797 | .log2_chroma_w = 1, | ||
| 2798 | .log2_chroma_h = 0, | ||
| 2799 | .comp = { | ||
| 2800 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 2801 | { 1, 4, 0, 6, 10 }, /* U */ | ||
| 2802 | { 1, 4, 2, 6, 10 }, /* V */ | ||
| 2803 | }, | ||
| 2804 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2805 | }, | ||
| 2806 | [AV_PIX_FMT_P210LE] = { | ||
| 2807 | .name = "p210le", | ||
| 2808 | .nb_components = 3, | ||
| 2809 | .log2_chroma_w = 1, | ||
| 2810 | .log2_chroma_h = 0, | ||
| 2811 | .comp = { | ||
| 2812 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 2813 | { 1, 4, 0, 6, 10 }, /* U */ | ||
| 2814 | { 1, 4, 2, 6, 10 }, /* V */ | ||
| 2815 | }, | ||
| 2816 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2817 | }, | ||
| 2818 | [AV_PIX_FMT_P410BE] = { | ||
| 2819 | .name = "p410be", | ||
| 2820 | .nb_components = 3, | ||
| 2821 | .log2_chroma_w = 0, | ||
| 2822 | .log2_chroma_h = 0, | ||
| 2823 | .comp = { | ||
| 2824 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 2825 | { 1, 4, 0, 6, 10 }, /* U */ | ||
| 2826 | { 1, 4, 2, 6, 10 }, /* V */ | ||
| 2827 | }, | ||
| 2828 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2829 | }, | ||
| 2830 | [AV_PIX_FMT_P410LE] = { | ||
| 2831 | .name = "p410le", | ||
| 2832 | .nb_components = 3, | ||
| 2833 | .log2_chroma_w = 0, | ||
| 2834 | .log2_chroma_h = 0, | ||
| 2835 | .comp = { | ||
| 2836 | { 0, 2, 0, 6, 10 }, /* Y */ | ||
| 2837 | { 1, 4, 0, 6, 10 }, /* U */ | ||
| 2838 | { 1, 4, 2, 6, 10 }, /* V */ | ||
| 2839 | }, | ||
| 2840 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2841 | }, | ||
| 2842 | [AV_PIX_FMT_P216BE] = { | ||
| 2843 | .name = "p216be", | ||
| 2844 | .nb_components = 3, | ||
| 2845 | .log2_chroma_w = 1, | ||
| 2846 | .log2_chroma_h = 0, | ||
| 2847 | .comp = { | ||
| 2848 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2849 | { 1, 4, 0, 0, 16 }, /* U */ | ||
| 2850 | { 1, 4, 2, 0, 16 }, /* V */ | ||
| 2851 | }, | ||
| 2852 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2853 | }, | ||
| 2854 | [AV_PIX_FMT_P216LE] = { | ||
| 2855 | .name = "p216le", | ||
| 2856 | .nb_components = 3, | ||
| 2857 | .log2_chroma_w = 1, | ||
| 2858 | .log2_chroma_h = 0, | ||
| 2859 | .comp = { | ||
| 2860 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2861 | { 1, 4, 0, 0, 16 }, /* U */ | ||
| 2862 | { 1, 4, 2, 0, 16 }, /* V */ | ||
| 2863 | }, | ||
| 2864 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2865 | }, | ||
| 2866 | [AV_PIX_FMT_P416BE] = { | ||
| 2867 | .name = "p416be", | ||
| 2868 | .nb_components = 3, | ||
| 2869 | .log2_chroma_w = 0, | ||
| 2870 | .log2_chroma_h = 0, | ||
| 2871 | .comp = { | ||
| 2872 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2873 | { 1, 4, 0, 0, 16 }, /* U */ | ||
| 2874 | { 1, 4, 2, 0, 16 }, /* V */ | ||
| 2875 | }, | ||
| 2876 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 2877 | }, | ||
| 2878 | [AV_PIX_FMT_P416LE] = { | ||
| 2879 | .name = "p416le", | ||
| 2880 | .nb_components = 3, | ||
| 2881 | .log2_chroma_w = 0, | ||
| 2882 | .log2_chroma_h = 0, | ||
| 2883 | .comp = { | ||
| 2884 | { 0, 2, 0, 0, 16 }, /* Y */ | ||
| 2885 | { 1, 4, 0, 0, 16 }, /* U */ | ||
| 2886 | { 1, 4, 2, 0, 16 }, /* V */ | ||
| 2887 | }, | ||
| 2888 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 2889 | }, | ||
| 2890 | [AV_PIX_FMT_VUYA] = { | ||
| 2891 | .name = "vuya", | ||
| 2892 | .nb_components = 4, | ||
| 2893 | .log2_chroma_w = 0, | ||
| 2894 | .log2_chroma_h = 0, | ||
| 2895 | .comp = { | ||
| 2896 | { 0, 4, 2, 0, 8 }, /* Y */ | ||
| 2897 | { 0, 4, 1, 0, 8 }, /* U */ | ||
| 2898 | { 0, 4, 0, 0, 8 }, /* V */ | ||
| 2899 | { 0, 4, 3, 0, 8 }, /* A */ | ||
| 2900 | }, | ||
| 2901 | .flags = AV_PIX_FMT_FLAG_ALPHA, | ||
| 2902 | }, | ||
| 2903 | [AV_PIX_FMT_VUYX] = { | ||
| 2904 | .name = "vuyx", | ||
| 2905 | .nb_components = 3, | ||
| 2906 | .log2_chroma_w = 0, | ||
| 2907 | .log2_chroma_h = 0, | ||
| 2908 | .comp = { | ||
| 2909 | { 0, 4, 2, 0, 8 }, /* Y */ | ||
| 2910 | { 0, 4, 1, 0, 8 }, /* U */ | ||
| 2911 | { 0, 4, 0, 0, 8 }, /* V */ | ||
| 2912 | { 0, 4, 3, 0, 8 }, /* X */ | ||
| 2913 | }, | ||
| 2914 | }, | ||
| 2915 | [AV_PIX_FMT_RGBF16BE] = { | ||
| 2916 | .name = "rgbf16be", | ||
| 2917 | .nb_components = 3, | ||
| 2918 | .log2_chroma_w = 0, | ||
| 2919 | .log2_chroma_h = 0, | ||
| 2920 | .comp = { | ||
| 2921 | { 0, 6, 0, 0, 16 }, /* R */ | ||
| 2922 | { 0, 6, 2, 0, 16 }, /* G */ | ||
| 2923 | { 0, 6, 4, 0, 16 }, /* B */ | ||
| 2924 | }, | ||
| 2925 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
| 2926 | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2927 | }, | ||
| 2928 | [AV_PIX_FMT_RGBF16LE] = { | ||
| 2929 | .name = "rgbf16le", | ||
| 2930 | .nb_components = 3, | ||
| 2931 | .log2_chroma_w = 0, | ||
| 2932 | .log2_chroma_h = 0, | ||
| 2933 | .comp = { | ||
| 2934 | { 0, 6, 0, 0, 16 }, /* R */ | ||
| 2935 | { 0, 6, 2, 0, 16 }, /* G */ | ||
| 2936 | { 0, 6, 4, 0, 16 }, /* B */ | ||
| 2937 | }, | ||
| 2938 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT | ||
| 2939 | }, | ||
| 2940 | [AV_PIX_FMT_RGBAF16BE] = { | ||
| 2941 | .name = "rgbaf16be", | ||
| 2942 | .nb_components = 4, | ||
| 2943 | .log2_chroma_w = 0, | ||
| 2944 | .log2_chroma_h = 0, | ||
| 2945 | .comp = { | ||
| 2946 | { 0, 8, 0, 0, 16 }, /* R */ | ||
| 2947 | { 0, 8, 2, 0, 16 }, /* G */ | ||
| 2948 | { 0, 8, 4, 0, 16 }, /* B */ | ||
| 2949 | { 0, 8, 6, 0, 16 }, /* A */ | ||
| 2950 | }, | ||
| 2951 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
| 2952 | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2953 | }, | ||
| 2954 | [AV_PIX_FMT_RGBAF16LE] = { | ||
| 2955 | .name = "rgbaf16le", | ||
| 2956 | .nb_components = 4, | ||
| 2957 | .log2_chroma_w = 0, | ||
| 2958 | .log2_chroma_h = 0, | ||
| 2959 | .comp = { | ||
| 2960 | { 0, 8, 0, 0, 16 }, /* R */ | ||
| 2961 | { 0, 8, 2, 0, 16 }, /* G */ | ||
| 2962 | { 0, 8, 4, 0, 16 }, /* B */ | ||
| 2963 | { 0, 8, 6, 0, 16 }, /* A */ | ||
| 2964 | }, | ||
| 2965 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA | | ||
| 2966 | AV_PIX_FMT_FLAG_FLOAT, | ||
| 2967 | }, | ||
| 2968 | [AV_PIX_FMT_Y212LE] = { | ||
| 2969 | .name = "y212le", | ||
| 2970 | .nb_components = 3, | ||
| 2971 | .log2_chroma_w = 1, | ||
| 2972 | .log2_chroma_h = 0, | ||
| 2973 | .comp = { | ||
| 2974 | { 0, 4, 0, 4, 12 }, /* Y */ | ||
| 2975 | { 0, 8, 2, 4, 12 }, /* U */ | ||
| 2976 | { 0, 8, 6, 4, 12 }, /* V */ | ||
| 2977 | }, | ||
| 2978 | }, | ||
| 2979 | [AV_PIX_FMT_Y212BE] = { | ||
| 2980 | .name = "y212be", | ||
| 2981 | .nb_components = 3, | ||
| 2982 | .log2_chroma_w = 1, | ||
| 2983 | .log2_chroma_h = 0, | ||
| 2984 | .comp = { | ||
| 2985 | { 0, 4, 0, 4, 12 }, /* Y */ | ||
| 2986 | { 0, 8, 2, 4, 12 }, /* U */ | ||
| 2987 | { 0, 8, 6, 4, 12 }, /* V */ | ||
| 2988 | }, | ||
| 2989 | .flags = AV_PIX_FMT_FLAG_BE, | ||
| 2990 | }, | ||
| 2991 | [AV_PIX_FMT_XV30LE] = { | ||
| 2992 | .name = "xv30le", | ||
| 2993 | .nb_components= 3, | ||
| 2994 | .log2_chroma_w= 0, | ||
| 2995 | .log2_chroma_h= 0, | ||
| 2996 | .comp = { | ||
| 2997 | { 0, 4, 1, 2, 10 }, /* Y */ | ||
| 2998 | { 0, 4, 0, 0, 10 }, /* U */ | ||
| 2999 | { 0, 4, 2, 4, 10 }, /* V */ | ||
| 3000 | { 0, 4, 3, 6, 2 }, /* X */ | ||
| 3001 | }, | ||
| 3002 | }, | ||
| 3003 | [AV_PIX_FMT_XV30BE] = { | ||
| 3004 | .name = "xv30be", | ||
| 3005 | .nb_components= 3, | ||
| 3006 | .log2_chroma_w= 0, | ||
| 3007 | .log2_chroma_h= 0, | ||
| 3008 | .comp = { | ||
| 3009 | { 0, 32, 10, 0, 10 }, /* Y */ | ||
| 3010 | { 0, 32, 0, 0, 10 }, /* U */ | ||
| 3011 | { 0, 32, 20, 0, 10 }, /* V */ | ||
| 3012 | { 0, 32, 30, 0, 2 }, /* X */ | ||
| 3013 | }, | ||
| 3014 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_BITSTREAM, | ||
| 3015 | }, | ||
| 3016 | [AV_PIX_FMT_XV36LE] = { | ||
| 3017 | .name = "xv36le", | ||
| 3018 | .nb_components= 3, | ||
| 3019 | .log2_chroma_w= 0, | ||
| 3020 | .log2_chroma_h= 0, | ||
| 3021 | .comp = { | ||
| 3022 | { 0, 8, 2, 4, 12 }, /* Y */ | ||
| 3023 | { 0, 8, 0, 4, 12 }, /* U */ | ||
| 3024 | { 0, 8, 4, 4, 12 }, /* V */ | ||
| 3025 | { 0, 8, 6, 4, 12 }, /* X */ | ||
| 3026 | }, | ||
| 3027 | }, | ||
| 3028 | [AV_PIX_FMT_XV36BE] = { | ||
| 3029 | .name = "xv36be", | ||
| 3030 | .nb_components= 3, | ||
| 3031 | .log2_chroma_w= 0, | ||
| 3032 | .log2_chroma_h= 0, | ||
| 3033 | .comp = { | ||
| 3034 | { 0, 8, 2, 4, 12 }, /* Y */ | ||
| 3035 | { 0, 8, 0, 4, 12 }, /* U */ | ||
| 3036 | { 0, 8, 4, 4, 12 }, /* V */ | ||
| 3037 | { 0, 8, 6, 4, 12 }, /* X */ | ||
| 3038 | }, | ||
| 3039 | .flags = AV_PIX_FMT_FLAG_BE, | ||
| 3040 | }, | ||
| 3041 | [AV_PIX_FMT_XV48LE] = { | ||
| 3042 | .name = "xv48le", | ||
| 3043 | .nb_components = 3, | ||
| 3044 | .log2_chroma_w = 0, | ||
| 3045 | .log2_chroma_h = 0, | ||
| 3046 | .comp = { | ||
| 3047 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
| 3048 | { 0, 8, 0, 0, 16 }, /* U */ | ||
| 3049 | { 0, 8, 4, 0, 16 }, /* V */ | ||
| 3050 | { 0, 8, 6, 0, 16 }, /* X */ | ||
| 3051 | }, | ||
| 3052 | }, | ||
| 3053 | [AV_PIX_FMT_XV48BE] = { | ||
| 3054 | .name = "xv48be", | ||
| 3055 | .nb_components = 3, | ||
| 3056 | .log2_chroma_w = 0, | ||
| 3057 | .log2_chroma_h = 0, | ||
| 3058 | .comp = { | ||
| 3059 | { 0, 8, 2, 0, 16 }, /* Y */ | ||
| 3060 | { 0, 8, 0, 0, 16 }, /* U */ | ||
| 3061 | { 0, 8, 4, 0, 16 }, /* V */ | ||
| 3062 | { 0, 8, 6, 0, 16 }, /* X */ | ||
| 3063 | }, | ||
| 3064 | .flags = AV_PIX_FMT_FLAG_BE, | ||
| 3065 | }, | ||
| 3066 | [AV_PIX_FMT_V30XLE] = { | ||
| 3067 | .name = "v30xle", | ||
| 3068 | .nb_components = 3, | ||
| 3069 | .log2_chroma_w = 0, | ||
| 3070 | .log2_chroma_h = 0, | ||
| 3071 | .comp = { | ||
| 3072 | { 0, 4, 1, 4, 10 }, /* Y */ | ||
| 3073 | { 0, 4, 0, 2, 10 }, /* U */ | ||
| 3074 | { 0, 4, 2, 6, 10 }, /* V */ | ||
| 3075 | { 0, 4, 0, 0, 2 }, /* X */ | ||
| 3076 | }, | ||
| 3077 | }, | ||
| 3078 | [AV_PIX_FMT_V30XBE] = { | ||
| 3079 | .name = "v30xbe", | ||
| 3080 | .nb_components= 3, | ||
| 3081 | .log2_chroma_w= 0, | ||
| 3082 | .log2_chroma_h= 0, | ||
| 3083 | .comp = { | ||
| 3084 | { 0, 32, 12, 0, 10 }, /* Y */ | ||
| 3085 | { 0, 32, 2, 0, 10 }, /* U */ | ||
| 3086 | { 0, 32, 22, 0, 10 }, /* V */ | ||
| 3087 | { 0, 32, 0, 0, 2 }, /* X */ | ||
| 3088 | }, | ||
| 3089 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_BITSTREAM, | ||
| 3090 | }, | ||
| 3091 | [AV_PIX_FMT_RGBF32BE] = { | ||
| 3092 | .name = "rgbf32be", | ||
| 3093 | .nb_components = 3, | ||
| 3094 | .log2_chroma_w = 0, | ||
| 3095 | .log2_chroma_h = 0, | ||
| 3096 | .comp = { | ||
| 3097 | { 0, 12, 0, 0, 32 }, /* R */ | ||
| 3098 | { 0, 12, 4, 0, 32 }, /* G */ | ||
| 3099 | { 0, 12, 8, 0, 32 }, /* B */ | ||
| 3100 | }, | ||
| 3101 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
| 3102 | AV_PIX_FMT_FLAG_FLOAT, | ||
| 3103 | }, | ||
| 3104 | [AV_PIX_FMT_RGBF32LE] = { | ||
| 3105 | .name = "rgbf32le", | ||
| 3106 | .nb_components = 3, | ||
| 3107 | .log2_chroma_w = 0, | ||
| 3108 | .log2_chroma_h = 0, | ||
| 3109 | .comp = { | ||
| 3110 | { 0, 12, 0, 0, 32 }, /* R */ | ||
| 3111 | { 0, 12, 4, 0, 32 }, /* G */ | ||
| 3112 | { 0, 12, 8, 0, 32 }, /* B */ | ||
| 3113 | }, | ||
| 3114 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT, | ||
| 3115 | }, | ||
| 3116 | [AV_PIX_FMT_RGB96BE] = { | ||
| 3117 | .name = "rgb96be", | ||
| 3118 | .nb_components = 3, | ||
| 3119 | .log2_chroma_w = 0, | ||
| 3120 | .log2_chroma_h = 0, | ||
| 3121 | .comp = { | ||
| 3122 | { 0, 12, 0, 0, 32 }, /* R */ | ||
| 3123 | { 0, 12, 4, 0, 32 }, /* G */ | ||
| 3124 | { 0, 12, 8, 0, 32 }, /* B */ | ||
| 3125 | }, | ||
| 3126 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB, | ||
| 3127 | }, | ||
| 3128 | [AV_PIX_FMT_RGB96LE] = { | ||
| 3129 | .name = "rgb96le", | ||
| 3130 | .nb_components = 3, | ||
| 3131 | .log2_chroma_w = 0, | ||
| 3132 | .log2_chroma_h = 0, | ||
| 3133 | .comp = { | ||
| 3134 | { 0, 12, 0, 0, 32 }, /* R */ | ||
| 3135 | { 0, 12, 4, 0, 32 }, /* G */ | ||
| 3136 | { 0, 12, 8, 0, 32 }, /* B */ | ||
| 3137 | }, | ||
| 3138 | .flags = AV_PIX_FMT_FLAG_RGB, | ||
| 3139 | }, | ||
| 3140 | [AV_PIX_FMT_RGBAF32BE] = { | ||
| 3141 | .name = "rgbaf32be", | ||
| 3142 | .nb_components = 4, | ||
| 3143 | .log2_chroma_w = 0, | ||
| 3144 | .log2_chroma_h = 0, | ||
| 3145 | .comp = { | ||
| 3146 | { 0, 16, 0, 0, 32 }, /* R */ | ||
| 3147 | { 0, 16, 4, 0, 32 }, /* G */ | ||
| 3148 | { 0, 16, 8, 0, 32 }, /* B */ | ||
| 3149 | { 0, 16, 12, 0, 32 }, /* A */ | ||
| 3150 | }, | ||
| 3151 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
| 3152 | AV_PIX_FMT_FLAG_FLOAT | AV_PIX_FMT_FLAG_ALPHA, | ||
| 3153 | }, | ||
| 3154 | [AV_PIX_FMT_RGBAF32LE] = { | ||
| 3155 | .name = "rgbaf32le", | ||
| 3156 | .nb_components = 4, | ||
| 3157 | .log2_chroma_w = 0, | ||
| 3158 | .log2_chroma_h = 0, | ||
| 3159 | .comp = { | ||
| 3160 | { 0, 16, 0, 0, 32 }, /* R */ | ||
| 3161 | { 0, 16, 4, 0, 32 }, /* G */ | ||
| 3162 | { 0, 16, 8, 0, 32 }, /* B */ | ||
| 3163 | { 0, 16, 12, 0, 32 }, /* A */ | ||
| 3164 | }, | ||
| 3165 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_FLOAT | | ||
| 3166 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 3167 | }, | ||
| 3168 | [AV_PIX_FMT_RGBA128BE] = { | ||
| 3169 | .name = "rgba128be", | ||
| 3170 | .nb_components = 4, | ||
| 3171 | .log2_chroma_w = 0, | ||
| 3172 | .log2_chroma_h = 0, | ||
| 3173 | .comp = { | ||
| 3174 | { 0, 16, 0, 0, 32 }, /* R */ | ||
| 3175 | { 0, 16, 4, 0, 32 }, /* G */ | ||
| 3176 | { 0, 16, 8, 0, 32 }, /* B */ | ||
| 3177 | { 0, 16, 12, 0, 32 }, /* A */ | ||
| 3178 | }, | ||
| 3179 | .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | | ||
| 3180 | AV_PIX_FMT_FLAG_ALPHA, | ||
| 3181 | }, | ||
| 3182 | [AV_PIX_FMT_RGBA128LE] = { | ||
| 3183 | .name = "rgba128le", | ||
| 3184 | .nb_components = 4, | ||
| 3185 | .log2_chroma_w = 0, | ||
| 3186 | .log2_chroma_h = 0, | ||
| 3187 | .comp = { | ||
| 3188 | { 0, 16, 0, 0, 32 }, /* R */ | ||
| 3189 | { 0, 16, 4, 0, 32 }, /* G */ | ||
| 3190 | { 0, 16, 8, 0, 32 }, /* B */ | ||
| 3191 | { 0, 16, 12, 0, 32 }, /* A */ | ||
| 3192 | }, | ||
| 3193 | .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, | ||
| 3194 | }, | ||
| 3195 | [AV_PIX_FMT_P212BE] = { | ||
| 3196 | .name = "p212be", | ||
| 3197 | .nb_components = 3, | ||
| 3198 | .log2_chroma_w = 1, | ||
| 3199 | .log2_chroma_h = 0, | ||
| 3200 | .comp = { | ||
| 3201 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 3202 | { 1, 4, 0, 4, 12 }, /* U */ | ||
| 3203 | { 1, 4, 2, 4, 12 }, /* V */ | ||
| 3204 | }, | ||
| 3205 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 3206 | }, | ||
| 3207 | [AV_PIX_FMT_P212LE] = { | ||
| 3208 | .name = "p212le", | ||
| 3209 | .nb_components = 3, | ||
| 3210 | .log2_chroma_w = 1, | ||
| 3211 | .log2_chroma_h = 0, | ||
| 3212 | .comp = { | ||
| 3213 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 3214 | { 1, 4, 0, 4, 12 }, /* U */ | ||
| 3215 | { 1, 4, 2, 4, 12 }, /* V */ | ||
| 3216 | }, | ||
| 3217 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 3218 | }, | ||
| 3219 | [AV_PIX_FMT_P412BE] = { | ||
| 3220 | .name = "p412be", | ||
| 3221 | .nb_components = 3, | ||
| 3222 | .log2_chroma_w = 0, | ||
| 3223 | .log2_chroma_h = 0, | ||
| 3224 | .comp = { | ||
| 3225 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 3226 | { 1, 4, 0, 4, 12 }, /* U */ | ||
| 3227 | { 1, 4, 2, 4, 12 }, /* V */ | ||
| 3228 | }, | ||
| 3229 | .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, | ||
| 3230 | }, | ||
| 3231 | [AV_PIX_FMT_P412LE] = { | ||
| 3232 | .name = "p412le", | ||
| 3233 | .nb_components = 3, | ||
| 3234 | .log2_chroma_w = 0, | ||
| 3235 | .log2_chroma_h = 0, | ||
| 3236 | .comp = { | ||
| 3237 | { 0, 2, 0, 4, 12 }, /* Y */ | ||
| 3238 | { 1, 4, 0, 4, 12 }, /* U */ | ||
| 3239 | { 1, 4, 2, 4, 12 }, /* V */ | ||
| 3240 | }, | ||
| 3241 | .flags = AV_PIX_FMT_FLAG_PLANAR, | ||
| 3242 | }, | ||
| 3243 | [AV_PIX_FMT_Y216LE] = { | ||
| 3244 | .name = "y216le", | ||
| 3245 | .nb_components = 3, | ||
| 3246 | .log2_chroma_w = 1, | ||
| 3247 | .log2_chroma_h = 0, | ||
| 3248 | .comp = { | ||
| 3249 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
| 3250 | { 0, 8, 2, 0, 16 }, /* U */ | ||
| 3251 | { 0, 8, 6, 0, 16 }, /* V */ | ||
| 3252 | }, | ||
| 3253 | }, | ||
| 3254 | [AV_PIX_FMT_Y216BE] = { | ||
| 3255 | .name = "y216be", | ||
| 3256 | .nb_components = 3, | ||
| 3257 | .log2_chroma_w = 1, | ||
| 3258 | .log2_chroma_h = 0, | ||
| 3259 | .comp = { | ||
| 3260 | { 0, 4, 0, 0, 16 }, /* Y */ | ||
| 3261 | { 0, 8, 2, 0, 16 }, /* U */ | ||
| 3262 | { 0, 8, 6, 0, 16 }, /* V */ | ||
| 3263 | }, | ||
| 3264 | .flags = AV_PIX_FMT_FLAG_BE, | ||
| 3265 | }, | ||
| 3266 | [AV_PIX_FMT_OHCODEC] = { | ||
| 3267 | .name = "ohcodec", | ||
| 3268 | .flags = AV_PIX_FMT_FLAG_HWACCEL, | ||
| 3269 | }, | ||
| 3270 | }; | ||
| 3271 | |||
| 3272 | static const char * const color_range_names[] = { | ||
| 3273 | [AVCOL_RANGE_UNSPECIFIED] = "unknown", | ||
| 3274 | [AVCOL_RANGE_MPEG] = "tv", | ||
| 3275 | [AVCOL_RANGE_JPEG] = "pc", | ||
| 3276 | }; | ||
| 3277 | |||
| 3278 | static const char * const color_primaries_names[AVCOL_PRI_NB] = { | ||
| 3279 | [AVCOL_PRI_RESERVED0] = "reserved", | ||
| 3280 | [AVCOL_PRI_BT709] = "bt709", | ||
| 3281 | [AVCOL_PRI_UNSPECIFIED] = "unknown", | ||
| 3282 | [AVCOL_PRI_RESERVED] = "reserved", | ||
| 3283 | [AVCOL_PRI_BT470M] = "bt470m", | ||
| 3284 | [AVCOL_PRI_BT470BG] = "bt470bg", | ||
| 3285 | [AVCOL_PRI_SMPTE170M] = "smpte170m", | ||
| 3286 | [AVCOL_PRI_SMPTE240M] = "smpte240m", | ||
| 3287 | [AVCOL_PRI_FILM] = "film", | ||
| 3288 | [AVCOL_PRI_BT2020] = "bt2020", | ||
| 3289 | [AVCOL_PRI_SMPTE428] = "smpte428", | ||
| 3290 | [AVCOL_PRI_SMPTE431] = "smpte431", | ||
| 3291 | [AVCOL_PRI_SMPTE432] = "smpte432", | ||
| 3292 | [AVCOL_PRI_EBU3213] = "ebu3213", | ||
| 3293 | }; | ||
| 3294 | |||
| 3295 | static const char * const color_transfer_names[] = { | ||
| 3296 | [AVCOL_TRC_RESERVED0] = "reserved", | ||
| 3297 | [AVCOL_TRC_BT709] = "bt709", | ||
| 3298 | [AVCOL_TRC_UNSPECIFIED] = "unknown", | ||
| 3299 | [AVCOL_TRC_RESERVED] = "reserved", | ||
| 3300 | [AVCOL_TRC_GAMMA22] = "bt470m", | ||
| 3301 | [AVCOL_TRC_GAMMA28] = "bt470bg", | ||
| 3302 | [AVCOL_TRC_SMPTE170M] = "smpte170m", | ||
| 3303 | [AVCOL_TRC_SMPTE240M] = "smpte240m", | ||
| 3304 | [AVCOL_TRC_LINEAR] = "linear", | ||
| 3305 | [AVCOL_TRC_LOG] = "log100", | ||
| 3306 | [AVCOL_TRC_LOG_SQRT] = "log316", | ||
| 3307 | [AVCOL_TRC_IEC61966_2_4] = "iec61966-2-4", | ||
| 3308 | [AVCOL_TRC_BT1361_ECG] = "bt1361e", | ||
| 3309 | [AVCOL_TRC_IEC61966_2_1] = "iec61966-2-1", | ||
| 3310 | [AVCOL_TRC_BT2020_10] = "bt2020-10", | ||
| 3311 | [AVCOL_TRC_BT2020_12] = "bt2020-12", | ||
| 3312 | [AVCOL_TRC_SMPTE2084] = "smpte2084", | ||
| 3313 | [AVCOL_TRC_SMPTE428] = "smpte428", | ||
| 3314 | [AVCOL_TRC_ARIB_STD_B67] = "arib-std-b67", | ||
| 3315 | }; | ||
| 3316 | |||
| 3317 | static const char * const color_space_names[] = { | ||
| 3318 | [AVCOL_SPC_RGB] = "gbr", | ||
| 3319 | [AVCOL_SPC_BT709] = "bt709", | ||
| 3320 | [AVCOL_SPC_UNSPECIFIED] = "unknown", | ||
| 3321 | [AVCOL_SPC_RESERVED] = "reserved", | ||
| 3322 | [AVCOL_SPC_FCC] = "fcc", | ||
| 3323 | [AVCOL_SPC_BT470BG] = "bt470bg", | ||
| 3324 | [AVCOL_SPC_SMPTE170M] = "smpte170m", | ||
| 3325 | [AVCOL_SPC_SMPTE240M] = "smpte240m", | ||
| 3326 | [AVCOL_SPC_YCGCO] = "ycgco", | ||
| 3327 | [AVCOL_SPC_BT2020_NCL] = "bt2020nc", | ||
| 3328 | [AVCOL_SPC_BT2020_CL] = "bt2020c", | ||
| 3329 | [AVCOL_SPC_SMPTE2085] = "smpte2085", | ||
| 3330 | [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc", | ||
| 3331 | [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c", | ||
| 3332 | [AVCOL_SPC_ICTCP] = "ictcp", | ||
| 3333 | [AVCOL_SPC_IPT_C2] = "ipt-c2", | ||
| 3334 | [AVCOL_SPC_YCGCO_RE] = "ycgco-re", | ||
| 3335 | [AVCOL_SPC_YCGCO_RO] = "ycgco-ro", | ||
| 3336 | }; | ||
| 3337 | |||
| 3338 | static const char * const chroma_location_names[] = { | ||
| 3339 | [AVCHROMA_LOC_UNSPECIFIED] = "unspecified", | ||
| 3340 | [AVCHROMA_LOC_LEFT] = "left", | ||
| 3341 | [AVCHROMA_LOC_CENTER] = "center", | ||
| 3342 | [AVCHROMA_LOC_TOPLEFT] = "topleft", | ||
| 3343 | [AVCHROMA_LOC_TOP] = "top", | ||
| 3344 | [AVCHROMA_LOC_BOTTOMLEFT] = "bottomleft", | ||
| 3345 | [AVCHROMA_LOC_BOTTOM] = "bottom", | ||
| 3346 | }; | ||
| 3347 | |||
| 3348 | static const char * const alpha_mode_names[] = { | ||
| 3349 | [AVALPHA_MODE_UNSPECIFIED] = "unspecified", | ||
| 3350 | [AVALPHA_MODE_PREMULTIPLIED] = "premultiplied", | ||
| 3351 | [AVALPHA_MODE_STRAIGHT] = "straight", | ||
| 3352 | }; | ||
| 3353 | |||
| 3354 | 25353 | static enum AVPixelFormat get_pix_fmt_internal(const char *name) | |
| 3355 | { | ||
| 3356 | enum AVPixelFormat pix_fmt; | ||
| 3357 | |||
| 3358 |
2/2✓ Branch 0 taken 2655633 times.
✓ Branch 1 taken 1588 times.
|
2657221 | for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) |
| 3359 |
1/2✓ Branch 0 taken 2655633 times.
✗ Branch 1 not taken.
|
2655633 | if (av_pix_fmt_descriptors[pix_fmt].name && |
| 3360 |
4/4✓ Branch 0 taken 2631870 times.
✓ Branch 1 taken 23763 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 2631868 times.
|
5287503 | (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) || |
| 3361 | 2631870 | av_match_name(name, av_pix_fmt_descriptors[pix_fmt].alias))) | |
| 3362 | 23765 | return pix_fmt; | |
| 3363 | |||
| 3364 | 1588 | return AV_PIX_FMT_NONE; | |
| 3365 | } | ||
| 3366 | |||
| 3367 | 69893 | const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt) | |
| 3368 | { | ||
| 3369 | 69893 | return (unsigned)pix_fmt < AV_PIX_FMT_NB ? | |
| 3370 |
2/2✓ Branch 0 taken 69891 times.
✓ Branch 1 taken 2 times.
|
69893 | av_pix_fmt_descriptors[pix_fmt].name : NULL; |
| 3371 | } | ||
| 3372 | |||
| 3373 | #if HAVE_BIGENDIAN | ||
| 3374 | # define X_NE(be, le) be | ||
| 3375 | #else | ||
| 3376 | # define X_NE(be, le) le | ||
| 3377 | #endif | ||
| 3378 | |||
| 3379 | 23730 | enum AVPixelFormat av_get_pix_fmt(const char *name) | |
| 3380 | { | ||
| 3381 | enum AVPixelFormat pix_fmt; | ||
| 3382 | |||
| 3383 |
2/2✓ Branch 0 taken 43 times.
✓ Branch 1 taken 23687 times.
|
23730 | if (!strcmp(name, "rgb32")) |
| 3384 | 43 | name = X_NE("argb", "bgra"); | |
| 3385 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 23687 times.
|
23687 | else if (!strcmp(name, "bgr32")) |
| 3386 | ✗ | name = X_NE("abgr", "rgba"); | |
| 3387 | |||
| 3388 | 23730 | pix_fmt = get_pix_fmt_internal(name); | |
| 3389 |
2/2✓ Branch 0 taken 1586 times.
✓ Branch 1 taken 22144 times.
|
23730 | if (pix_fmt == AV_PIX_FMT_NONE) { |
| 3390 | char name2[32]; | ||
| 3391 | |||
| 3392 | 1586 | snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le")); | |
| 3393 | 1586 | pix_fmt = get_pix_fmt_internal(name2); | |
| 3394 | } | ||
| 3395 | |||
| 3396 | 23730 | return pix_fmt; | |
| 3397 | } | ||
| 3398 | |||
| 3399 | 229964 | int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc) | |
| 3400 | { | ||
| 3401 | 229964 | int c, bits = 0; | |
| 3402 | 229964 | int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h; | |
| 3403 | |||
| 3404 |
2/2✓ Branch 0 taken 681766 times.
✓ Branch 1 taken 229964 times.
|
911730 | for (c = 0; c < pixdesc->nb_components; c++) { |
| 3405 |
4/4✓ Branch 0 taken 462794 times.
✓ Branch 1 taken 218972 times.
✓ Branch 2 taken 244164 times.
✓ Branch 3 taken 218630 times.
|
681766 | int s = c == 1 || c == 2 ? 0 : log2_pixels; |
| 3406 | 681766 | bits += pixdesc->comp[c].depth << s; | |
| 3407 | } | ||
| 3408 | |||
| 3409 | 229964 | return bits >> log2_pixels; | |
| 3410 | } | ||
| 3411 | |||
| 3412 | 1202 | int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc) | |
| 3413 | { | ||
| 3414 | 1202 | int c, bits = 0; | |
| 3415 | 1202 | int log2_pixels = pixdesc->log2_chroma_w + pixdesc->log2_chroma_h; | |
| 3416 | 1202 | int steps[4] = {0}; | |
| 3417 | |||
| 3418 |
2/2✓ Branch 0 taken 3647 times.
✓ Branch 1 taken 1202 times.
|
4849 | for (c = 0; c < pixdesc->nb_components; c++) { |
| 3419 | 3647 | const AVComponentDescriptor *comp = &pixdesc->comp[c]; | |
| 3420 |
4/4✓ Branch 0 taken 2571 times.
✓ Branch 1 taken 1076 times.
✓ Branch 2 taken 1495 times.
✓ Branch 3 taken 1076 times.
|
3647 | int s = c == 1 || c == 2 ? 0 : log2_pixels; |
| 3421 | 3647 | steps[comp->plane] = comp->step << s; | |
| 3422 | } | ||
| 3423 |
2/2✓ Branch 0 taken 4808 times.
✓ Branch 1 taken 1202 times.
|
6010 | for (c = 0; c < 4; c++) |
| 3424 | 4808 | bits += steps[c]; | |
| 3425 | |||
| 3426 |
2/2✓ Branch 0 taken 1108 times.
✓ Branch 1 taken 94 times.
|
1202 | if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM)) |
| 3427 | 1108 | bits *= 8; | |
| 3428 | |||
| 3429 | 1202 | return bits >> log2_pixels; | |
| 3430 | } | ||
| 3431 | |||
| 3432 | ✗ | char *av_get_pix_fmt_string(char *buf, int buf_size, | |
| 3433 | enum AVPixelFormat pix_fmt) | ||
| 3434 | { | ||
| 3435 | /* print header */ | ||
| 3436 | ✗ | if (pix_fmt < 0) { | |
| 3437 | ✗ | snprintf (buf, buf_size, "name" " nb_components" " nb_bits"); | |
| 3438 | } else { | ||
| 3439 | ✗ | const AVPixFmtDescriptor *pixdesc = &av_pix_fmt_descriptors[pix_fmt]; | |
| 3440 | ✗ | snprintf(buf, buf_size, "%-11s %7d %10d", pixdesc->name, | |
| 3441 | ✗ | pixdesc->nb_components, av_get_bits_per_pixel(pixdesc)); | |
| 3442 | } | ||
| 3443 | |||
| 3444 | ✗ | return buf; | |
| 3445 | } | ||
| 3446 | |||
| 3447 | 430088057 | const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt) | |
| 3448 | { | ||
| 3449 |
4/4✓ Branch 0 taken 429467026 times.
✓ Branch 1 taken 621031 times.
✓ Branch 2 taken 73781 times.
✓ Branch 3 taken 429393245 times.
|
430088057 | if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB) |
| 3450 | 694812 | return NULL; | |
| 3451 | 429393245 | return &av_pix_fmt_descriptors[pix_fmt]; | |
| 3452 | } | ||
| 3453 | |||
| 3454 | 3570028 | const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev) | |
| 3455 | { | ||
| 3456 |
2/2✓ Branch 0 taken 13321 times.
✓ Branch 1 taken 3556707 times.
|
3570028 | if (!prev) |
| 3457 | 13321 | return &av_pix_fmt_descriptors[0]; | |
| 3458 |
2/2✓ Branch 0 taken 3543386 times.
✓ Branch 1 taken 13321 times.
|
3556707 | while (prev - av_pix_fmt_descriptors < FF_ARRAY_ELEMS(av_pix_fmt_descriptors) - 1) { |
| 3459 | 3543386 | prev++; | |
| 3460 |
1/2✓ Branch 0 taken 3543386 times.
✗ Branch 1 not taken.
|
3543386 | if (prev->name) |
| 3461 | 3543386 | return prev; | |
| 3462 | } | ||
| 3463 | 13321 | return NULL; | |
| 3464 | } | ||
| 3465 | |||
| 3466 | 3557685 | enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc) | |
| 3467 | { | ||
| 3468 |
1/2✓ Branch 0 taken 3557685 times.
✗ Branch 1 not taken.
|
3557685 | if (desc < av_pix_fmt_descriptors || |
| 3469 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3557685 times.
|
3557685 | desc >= av_pix_fmt_descriptors + FF_ARRAY_ELEMS(av_pix_fmt_descriptors)) |
| 3470 | ✗ | return AV_PIX_FMT_NONE; | |
| 3471 | |||
| 3472 | 3557685 | return desc - av_pix_fmt_descriptors; | |
| 3473 | } | ||
| 3474 | |||
| 3475 | 70321 | int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, | |
| 3476 | int *h_shift, int *v_shift) | ||
| 3477 | { | ||
| 3478 | 70321 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
| 3479 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 70321 times.
|
70321 | if (!desc) |
| 3480 | ✗ | return AVERROR(ENOSYS); | |
| 3481 | 70321 | *h_shift = desc->log2_chroma_w; | |
| 3482 | 70321 | *v_shift = desc->log2_chroma_h; | |
| 3483 | |||
| 3484 | 70321 | return 0; | |
| 3485 | } | ||
| 3486 | |||
| 3487 | 145016 | int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt) | |
| 3488 | { | ||
| 3489 | 145016 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
| 3490 | 145016 | int i, planes[4] = { 0 }, ret = 0; | |
| 3491 | |||
| 3492 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 145016 times.
|
145016 | if (!desc) |
| 3493 | ✗ | return AVERROR(EINVAL); | |
| 3494 | |||
| 3495 |
2/2✓ Branch 0 taken 425406 times.
✓ Branch 1 taken 145016 times.
|
570422 | for (i = 0; i < desc->nb_components; i++) |
| 3496 | 425406 | planes[desc->comp[i].plane] = 1; | |
| 3497 |
2/2✓ Branch 0 taken 580064 times.
✓ Branch 1 taken 145016 times.
|
725080 | for (i = 0; i < FF_ARRAY_ELEMS(planes); i++) |
| 3498 | 580064 | ret += planes[i]; | |
| 3499 | 145016 | return ret; | |
| 3500 | } | ||
| 3501 | |||
| 3502 | 669 | enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt) | |
| 3503 | { | ||
| 3504 | 669 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
| 3505 | char name[16]; | ||
| 3506 | int i; | ||
| 3507 | |||
| 3508 |
2/4✓ Branch 0 taken 669 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 669 times.
|
669 | if (!desc || strlen(desc->name) < 2) |
| 3509 | ✗ | return AV_PIX_FMT_NONE; | |
| 3510 | 669 | av_strlcpy(name, desc->name, sizeof(name)); | |
| 3511 | 669 | i = strlen(name) - 2; | |
| 3512 |
4/4✓ Branch 0 taken 658 times.
✓ Branch 1 taken 11 times.
✓ Branch 2 taken 632 times.
✓ Branch 3 taken 26 times.
|
669 | if (strcmp(name + i, "be") && strcmp(name + i, "le")) |
| 3513 | 632 | return AV_PIX_FMT_NONE; | |
| 3514 | |||
| 3515 | 37 | name[i] ^= 'b' ^ 'l'; | |
| 3516 | |||
| 3517 | 37 | return get_pix_fmt_internal(name); | |
| 3518 | } | ||
| 3519 | |||
| 3520 | #define FF_COLOR_NA -1 | ||
| 3521 | #define FF_COLOR_RGB 0 /**< RGB color space */ | ||
| 3522 | #define FF_COLOR_GRAY 1 /**< gray color space */ | ||
| 3523 | #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */ | ||
| 3524 | #define FF_COLOR_YUV_JPEG 3 /**< YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */ | ||
| 3525 | #define FF_COLOR_XYZ 4 | ||
| 3526 | |||
| 3527 | #define pixdesc_has_alpha(pixdesc) \ | ||
| 3528 | ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA) | ||
| 3529 | |||
| 3530 | |||
| 3531 | 9868 | static int get_color_type(const AVPixFmtDescriptor *desc) { | |
| 3532 |
2/2✓ Branch 0 taken 21 times.
✓ Branch 1 taken 9847 times.
|
9868 | if (desc->flags & AV_PIX_FMT_FLAG_PAL) |
| 3533 | 21 | return FF_COLOR_RGB; | |
| 3534 | |||
| 3535 |
4/4✓ Branch 0 taken 8830 times.
✓ Branch 1 taken 1017 times.
✓ Branch 2 taken 93 times.
✓ Branch 3 taken 8737 times.
|
9847 | if(desc->nb_components == 1 || desc->nb_components == 2) |
| 3536 | 1110 | return FF_COLOR_GRAY; | |
| 3537 | |||
| 3538 |
1/2✓ Branch 0 taken 8737 times.
✗ Branch 1 not taken.
|
8737 | if (desc->name) { |
| 3539 |
2/2✓ Branch 1 taken 324 times.
✓ Branch 2 taken 8413 times.
|
8737 | if (av_strstart(desc->name, "yuvj", NULL)) |
| 3540 | 324 | return FF_COLOR_YUV_JPEG; | |
| 3541 | } | ||
| 3542 | |||
| 3543 |
2/2✓ Branch 0 taken 2545 times.
✓ Branch 1 taken 5868 times.
|
8413 | if(desc->flags & AV_PIX_FMT_FLAG_RGB) |
| 3544 | 2545 | return FF_COLOR_RGB; | |
| 3545 | |||
| 3546 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 5866 times.
|
5868 | if(desc->flags & AV_PIX_FMT_FLAG_XYZ) |
| 3547 | 2 | return FF_COLOR_XYZ; | |
| 3548 | |||
| 3549 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 5866 times.
|
5866 | if(desc->nb_components == 0) |
| 3550 | ✗ | return FF_COLOR_NA; | |
| 3551 | |||
| 3552 | 5866 | return FF_COLOR_YUV; | |
| 3553 | } | ||
| 3554 | |||
| 3555 | 9868 | static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt) | |
| 3556 | { | ||
| 3557 | 9868 | const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); | |
| 3558 | int i; | ||
| 3559 | |||
| 3560 |
2/4✓ Branch 0 taken 9868 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 9868 times.
|
9868 | if (!desc || !desc->nb_components) { |
| 3561 | ✗ | *min = *max = 0; | |
| 3562 | ✗ | return AVERROR(EINVAL); | |
| 3563 | } | ||
| 3564 | |||
| 3565 | 9868 | *min = INT_MAX, *max = -INT_MAX; | |
| 3566 |
2/2✓ Branch 0 taken 28631 times.
✓ Branch 1 taken 9868 times.
|
38499 | for (i = 0; i < desc->nb_components; i++) { |
| 3567 | 28631 | *min = FFMIN(desc->comp[i].depth, *min); | |
| 3568 | 28631 | *max = FFMAX(desc->comp[i].depth, *max); | |
| 3569 | } | ||
| 3570 | 9868 | return 0; | |
| 3571 | } | ||
| 3572 | |||
| 3573 | 5558 | static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, | |
| 3574 | enum AVPixelFormat src_pix_fmt, | ||
| 3575 | unsigned *lossp, unsigned consider) | ||
| 3576 | { | ||
| 3577 | 5558 | const AVPixFmtDescriptor *src_desc = av_pix_fmt_desc_get(src_pix_fmt); | |
| 3578 | 5558 | const AVPixFmtDescriptor *dst_desc = av_pix_fmt_desc_get(dst_pix_fmt); | |
| 3579 | int src_color, dst_color; | ||
| 3580 | int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth; | ||
| 3581 | int ret, loss, i, nb_components; | ||
| 3582 | 5558 | int score = INT_MAX - 1; | |
| 3583 | |||
| 3584 |
2/4✓ Branch 0 taken 5558 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 5558 times.
|
5558 | if (!src_desc || !dst_desc) |
| 3585 | ✗ | return -4; | |
| 3586 | |||
| 3587 |
2/2✓ Branch 0 taken 5456 times.
✓ Branch 1 taken 102 times.
|
5558 | if ((src_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) || |
| 3588 |
2/2✓ Branch 0 taken 166 times.
✓ Branch 1 taken 5290 times.
|
5456 | (dst_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) { |
| 3589 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 265 times.
|
268 | if (dst_pix_fmt == src_pix_fmt) |
| 3590 | 3 | return -1; | |
| 3591 | else | ||
| 3592 | 265 | return -2; | |
| 3593 | } | ||
| 3594 | |||
| 3595 | /* compute loss */ | ||
| 3596 | 5290 | *lossp = loss = 0; | |
| 3597 | |||
| 3598 |
2/2✓ Branch 0 taken 356 times.
✓ Branch 1 taken 4934 times.
|
5290 | if (dst_pix_fmt == src_pix_fmt) |
| 3599 | 356 | return INT_MAX; | |
| 3600 | |||
| 3601 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4934 times.
|
4934 | if ((ret = get_pix_fmt_depth(&src_min_depth, &src_max_depth, src_pix_fmt)) < 0) |
| 3602 | ✗ | return -3; | |
| 3603 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4934 times.
|
4934 | if ((ret = get_pix_fmt_depth(&dst_min_depth, &dst_max_depth, dst_pix_fmt)) < 0) |
| 3604 | ✗ | return -3; | |
| 3605 | |||
| 3606 | 4934 | src_color = get_color_type(src_desc); | |
| 3607 | 4934 | dst_color = get_color_type(dst_desc); | |
| 3608 |
2/2✓ Branch 0 taken 21 times.
✓ Branch 1 taken 4913 times.
|
4934 | if (dst_pix_fmt == AV_PIX_FMT_PAL8) |
| 3609 | 21 | nb_components = FFMIN(src_desc->nb_components, 4); | |
| 3610 | else | ||
| 3611 | 4913 | nb_components = FFMIN(src_desc->nb_components, dst_desc->nb_components); | |
| 3612 | |||
| 3613 |
2/2✓ Branch 0 taken 13097 times.
✓ Branch 1 taken 4934 times.
|
18031 | for (i = 0; i < nb_components; i++) { |
| 3614 |
2/2✓ Branch 0 taken 63 times.
✓ Branch 1 taken 13034 times.
|
13097 | int depth_minus1 = (dst_pix_fmt == AV_PIX_FMT_PAL8) ? 7/nb_components : (dst_desc->comp[i].depth - 1); |
| 3615 | 13097 | int depth_delta = src_desc->comp[i].depth - 1 - depth_minus1; | |
| 3616 |
3/4✓ Branch 0 taken 2179 times.
✓ Branch 1 taken 10918 times.
✓ Branch 2 taken 2179 times.
✗ Branch 3 not taken.
|
13097 | if (depth_delta > 0 && (consider & FF_LOSS_DEPTH)) { |
| 3617 | 2179 | loss |= FF_LOSS_DEPTH; | |
| 3618 | 2179 | score -= 65536 >> depth_minus1; | |
| 3619 |
3/4✓ Branch 0 taken 3890 times.
✓ Branch 1 taken 7028 times.
✓ Branch 2 taken 3890 times.
✗ Branch 3 not taken.
|
10918 | } else if (depth_delta < 0 && (consider & FF_LOSS_EXCESS_DEPTH)) { |
| 3620 | // Favour formats where bit depth exactly matches. If all other | ||
| 3621 | // scoring is equal, we'd rather use the bit depth that most closely | ||
| 3622 | // matches the source. | ||
| 3623 | 3890 | loss |= FF_LOSS_EXCESS_DEPTH; | |
| 3624 | 3890 | score += depth_delta; | |
| 3625 | } | ||
| 3626 | } | ||
| 3627 | |||
| 3628 |
1/2✓ Branch 0 taken 4934 times.
✗ Branch 1 not taken.
|
4934 | if (consider & FF_LOSS_RESOLUTION) { |
| 3629 |
2/2✓ Branch 0 taken 999 times.
✓ Branch 1 taken 3935 times.
|
4934 | if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w) { |
| 3630 | 999 | loss |= FF_LOSS_RESOLUTION; | |
| 3631 | 999 | score -= 256 << dst_desc->log2_chroma_w; | |
| 3632 | } | ||
| 3633 |
2/2✓ Branch 0 taken 801 times.
✓ Branch 1 taken 4133 times.
|
4934 | if (dst_desc->log2_chroma_h > src_desc->log2_chroma_h) { |
| 3634 | 801 | loss |= FF_LOSS_RESOLUTION; | |
| 3635 | 801 | score -= 256 << dst_desc->log2_chroma_h; | |
| 3636 | } | ||
| 3637 | // don't favor 422 over 420 if downsampling is needed, because 420 has much better support on the decoder side | ||
| 3638 |
4/4✓ Branch 0 taken 1966 times.
✓ Branch 1 taken 2968 times.
✓ Branch 2 taken 962 times.
✓ Branch 3 taken 1004 times.
|
4934 | if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 0 && |
| 3639 |
4/4✓ Branch 0 taken 659 times.
✓ Branch 1 taken 303 times.
✓ Branch 2 taken 630 times.
✓ Branch 3 taken 29 times.
|
962 | dst_desc->log2_chroma_h == 1 && src_desc->log2_chroma_h == 0 ) { |
| 3640 | 630 | score += 512; | |
| 3641 | } | ||
| 3642 | } | ||
| 3643 | |||
| 3644 |
1/2✓ Branch 0 taken 4934 times.
✗ Branch 1 not taken.
|
4934 | if (consider & FF_LOSS_EXCESS_RESOLUTION) { |
| 3645 | // Favour formats where chroma subsampling exactly matches. If all other | ||
| 3646 | // scoring is equal, we'd rather use the subsampling that most closely | ||
| 3647 | // matches the source. | ||
| 3648 |
2/2✓ Branch 0 taken 1343 times.
✓ Branch 1 taken 3591 times.
|
4934 | if (dst_desc->log2_chroma_w < src_desc->log2_chroma_w) { |
| 3649 | 1343 | loss |= FF_LOSS_EXCESS_RESOLUTION; | |
| 3650 | 1343 | score -= 1 << (src_desc->log2_chroma_w - dst_desc->log2_chroma_w); | |
| 3651 | } | ||
| 3652 | |||
| 3653 |
2/2✓ Branch 0 taken 1404 times.
✓ Branch 1 taken 3530 times.
|
4934 | if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) { |
| 3654 | 1404 | loss |= FF_LOSS_EXCESS_RESOLUTION; | |
| 3655 | 1404 | score -= 1 << (src_desc->log2_chroma_h - dst_desc->log2_chroma_h); | |
| 3656 | } | ||
| 3657 | |||
| 3658 | // don't favour 411 over 420, because 420 has much better support on the | ||
| 3659 | // decoder side. | ||
| 3660 |
4/4✓ Branch 0 taken 1966 times.
✓ Branch 1 taken 2968 times.
✓ Branch 2 taken 63 times.
✓ Branch 3 taken 1903 times.
|
4934 | if (dst_desc->log2_chroma_w == 1 && src_desc->log2_chroma_w == 2 && |
| 3661 |
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) { |
| 3662 | 19 | score += 4; | |
| 3663 | } | ||
| 3664 | } | ||
| 3665 | |||
| 3666 |
1/2✓ Branch 0 taken 4934 times.
✗ Branch 1 not taken.
|
4934 | if(consider & FF_LOSS_COLORSPACE) |
| 3667 |
5/5✓ Branch 0 taken 1078 times.
✓ Branch 1 taken 822 times.
✓ Branch 2 taken 2978 times.
✓ Branch 3 taken 54 times.
✓ Branch 4 taken 2 times.
|
4934 | switch(dst_color) { |
| 3668 | 1078 | case FF_COLOR_RGB: | |
| 3669 |
4/4✓ Branch 0 taken 717 times.
✓ Branch 1 taken 361 times.
✓ Branch 2 taken 681 times.
✓ Branch 3 taken 36 times.
|
1078 | if (src_color != FF_COLOR_RGB && |
| 3670 | src_color != FF_COLOR_GRAY) | ||
| 3671 | 681 | loss |= FF_LOSS_COLORSPACE; | |
| 3672 | 1078 | break; | |
| 3673 | 822 | case FF_COLOR_GRAY: | |
| 3674 |
2/2✓ Branch 0 taken 678 times.
✓ Branch 1 taken 144 times.
|
822 | if (src_color != FF_COLOR_GRAY) |
| 3675 | 678 | loss |= FF_LOSS_COLORSPACE; | |
| 3676 | 822 | break; | |
| 3677 | 2978 | case FF_COLOR_YUV: | |
| 3678 |
2/2✓ Branch 0 taken 1067 times.
✓ Branch 1 taken 1911 times.
|
2978 | if (src_color != FF_COLOR_YUV) |
| 3679 | 1067 | loss |= FF_LOSS_COLORSPACE; | |
| 3680 | 2978 | break; | |
| 3681 | 54 | case FF_COLOR_YUV_JPEG: | |
| 3682 |
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 && |
| 3683 |
1/2✓ Branch 0 taken 38 times.
✗ Branch 1 not taken.
|
38 | src_color != FF_COLOR_YUV && |
| 3684 | src_color != FF_COLOR_GRAY) | ||
| 3685 | 38 | loss |= FF_LOSS_COLORSPACE; | |
| 3686 | 54 | break; | |
| 3687 | 2 | default: | |
| 3688 | /* fail safe test */ | ||
| 3689 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (src_color != dst_color) |
| 3690 | 2 | loss |= FF_LOSS_COLORSPACE; | |
| 3691 | 2 | break; | |
| 3692 | } | ||
| 3693 |
2/2✓ Branch 0 taken 2466 times.
✓ Branch 1 taken 2468 times.
|
4934 | if(loss & FF_LOSS_COLORSPACE) |
| 3694 |
2/2✓ Branch 0 taken 729 times.
✓ Branch 1 taken 1737 times.
|
2466 | score -= (nb_components * 65536) >> FFMIN(dst_desc->comp[0].depth - 1, src_desc->comp[0].depth - 1); |
| 3695 | |||
| 3696 |
4/4✓ Branch 0 taken 822 times.
✓ Branch 1 taken 4112 times.
✓ Branch 2 taken 678 times.
✓ Branch 3 taken 144 times.
|
4934 | if (dst_color == FF_COLOR_GRAY && |
| 3697 |
1/2✓ Branch 0 taken 678 times.
✗ Branch 1 not taken.
|
678 | src_color != FF_COLOR_GRAY && (consider & FF_LOSS_CHROMA)) { |
| 3698 | 678 | loss |= FF_LOSS_CHROMA; | |
| 3699 | 678 | score -= 2 * 65536; | |
| 3700 | } | ||
| 3701 |
6/6✓ Branch 0 taken 4496 times.
✓ Branch 1 taken 438 times.
✓ Branch 2 taken 698 times.
✓ Branch 3 taken 3798 times.
✓ Branch 4 taken 154 times.
✓ Branch 5 taken 544 times.
|
4934 | if (!pixdesc_has_alpha(dst_desc) && (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))) { |
| 3702 | 154 | loss |= FF_LOSS_ALPHA; | |
| 3703 | 154 | score -= 65536; | |
| 3704 | } | ||
| 3705 |
4/6✓ Branch 0 taken 21 times.
✓ Branch 1 taken 4913 times.
✓ Branch 2 taken 21 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 21 times.
✗ Branch 5 not taken.
|
4934 | if (dst_pix_fmt == AV_PIX_FMT_PAL8 && (consider & FF_LOSS_COLORQUANT) && |
| 3706 |
1/6✗ Branch 0 not taken.
✓ Branch 1 taken 21 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
|
21 | (src_pix_fmt != AV_PIX_FMT_PAL8 && (src_color != FF_COLOR_GRAY || (pixdesc_has_alpha(src_desc) && (consider & FF_LOSS_ALPHA))))) { |
| 3707 | 21 | loss |= FF_LOSS_COLORQUANT; | |
| 3708 | 21 | score -= 65536; | |
| 3709 | } | ||
| 3710 | |||
| 3711 | 4934 | *lossp = loss; | |
| 3712 | 4934 | return score; | |
| 3713 | } | ||
| 3714 | |||
| 3715 | ✗ | int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, | |
| 3716 | enum AVPixelFormat src_pix_fmt, | ||
| 3717 | int has_alpha) | ||
| 3718 | { | ||
| 3719 | int loss; | ||
| 3720 | ✗ | int ret = get_pix_fmt_score(dst_pix_fmt, src_pix_fmt, &loss, has_alpha ? ~0 : ~FF_LOSS_ALPHA); | |
| 3721 | ✗ | if (ret < 0) | |
| 3722 | ✗ | return ret; | |
| 3723 | ✗ | return loss; | |
| 3724 | } | ||
| 3725 | |||
| 3726 | 3014 | enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, | |
| 3727 | enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr) | ||
| 3728 | { | ||
| 3729 | enum AVPixelFormat dst_pix_fmt; | ||
| 3730 | int loss1, loss2, loss_mask; | ||
| 3731 | 3014 | const AVPixFmtDescriptor *desc1 = av_pix_fmt_desc_get(dst_pix_fmt1); | |
| 3732 | 3014 | const AVPixFmtDescriptor *desc2 = av_pix_fmt_desc_get(dst_pix_fmt2); | |
| 3733 | int score1, score2; | ||
| 3734 | |||
| 3735 |
2/2✓ Branch 0 taken 235 times.
✓ Branch 1 taken 2779 times.
|
3014 | if (!desc1) { |
| 3736 | 235 | dst_pix_fmt = dst_pix_fmt2; | |
| 3737 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2779 times.
|
2779 | } else if (!desc2) { |
| 3738 | ✗ | dst_pix_fmt = dst_pix_fmt1; | |
| 3739 | } else { | ||
| 3740 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2779 times.
|
2779 | loss_mask= loss_ptr?~*loss_ptr:~0; /* use loss mask if provided */ |
| 3741 |
2/2✓ Branch 0 taken 2615 times.
✓ Branch 1 taken 164 times.
|
2779 | if(!has_alpha) |
| 3742 | 2615 | loss_mask &= ~FF_LOSS_ALPHA; | |
| 3743 | |||
| 3744 | 2779 | score1 = get_pix_fmt_score(dst_pix_fmt1, src_pix_fmt, &loss1, loss_mask); | |
| 3745 | 2779 | score2 = get_pix_fmt_score(dst_pix_fmt2, src_pix_fmt, &loss2, loss_mask); | |
| 3746 | |||
| 3747 |
2/2✓ Branch 0 taken 215 times.
✓ Branch 1 taken 2564 times.
|
2779 | if (score1 == score2) { |
| 3748 |
2/2✓ Branch 2 taken 165 times.
✓ Branch 3 taken 50 times.
|
215 | if(av_get_padded_bits_per_pixel(desc2) != av_get_padded_bits_per_pixel(desc1)) { |
| 3749 |
2/2✓ Branch 2 taken 8 times.
✓ Branch 3 taken 157 times.
|
165 | dst_pix_fmt = av_get_padded_bits_per_pixel(desc2) < av_get_padded_bits_per_pixel(desc1) ? dst_pix_fmt2 : dst_pix_fmt1; |
| 3750 | } else { | ||
| 3751 |
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; |
| 3752 | } | ||
| 3753 | } else { | ||
| 3754 |
2/2✓ Branch 0 taken 509 times.
✓ Branch 1 taken 2055 times.
|
2564 | dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1; |
| 3755 | } | ||
| 3756 | } | ||
| 3757 | |||
| 3758 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3014 times.
|
3014 | if (loss_ptr) |
| 3759 | ✗ | *loss_ptr = av_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha); | |
| 3760 | 3014 | return dst_pix_fmt; | |
| 3761 | } | ||
| 3762 | |||
| 3763 | 33595 | const char *av_color_range_name(enum AVColorRange range) | |
| 3764 | { | ||
| 3765 | return (unsigned) range < AVCOL_RANGE_NB ? | ||
| 3766 |
1/2✓ Branch 0 taken 33595 times.
✗ Branch 1 not taken.
|
33595 | color_range_names[range] : NULL; |
| 3767 | } | ||
| 3768 | |||
| 3769 | 2175 | int av_color_range_from_name(const char *name) | |
| 3770 | { | ||
| 3771 | int i; | ||
| 3772 | |||
| 3773 |
1/2✓ Branch 0 taken 4433 times.
✗ Branch 1 not taken.
|
4433 | for (i = 0; i < FF_ARRAY_ELEMS(color_range_names); i++) { |
| 3774 |
2/2✓ Branch 1 taken 2175 times.
✓ Branch 2 taken 2258 times.
|
4433 | if (av_strstart(name, color_range_names[i], NULL)) |
| 3775 | 2175 | return i; | |
| 3776 | } | ||
| 3777 | |||
| 3778 | ✗ | return AVERROR(EINVAL); | |
| 3779 | } | ||
| 3780 | |||
| 3781 | 3975 | const char *av_color_primaries_name(enum AVColorPrimaries primaries) | |
| 3782 | { | ||
| 3783 | return (unsigned) primaries < AVCOL_PRI_NB ? | ||
| 3784 |
1/2✓ Branch 0 taken 3975 times.
✗ Branch 1 not taken.
|
3975 | color_primaries_names[primaries] : NULL; |
| 3785 | } | ||
| 3786 | |||
| 3787 | ✗ | int av_color_primaries_from_name(const char *name) | |
| 3788 | { | ||
| 3789 | int i; | ||
| 3790 | |||
| 3791 | ✗ | for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) { | |
| 3792 | ✗ | if (!color_primaries_names[i]) | |
| 3793 | ✗ | continue; | |
| 3794 | |||
| 3795 | ✗ | if (av_strstart(name, color_primaries_names[i], NULL)) | |
| 3796 | ✗ | return i; | |
| 3797 | } | ||
| 3798 | |||
| 3799 | ✗ | return AVERROR(EINVAL); | |
| 3800 | } | ||
| 3801 | |||
| 3802 | 4013 | const char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer) | |
| 3803 | { | ||
| 3804 | return (unsigned) transfer < AVCOL_TRC_NB ? | ||
| 3805 |
1/2✓ Branch 0 taken 4013 times.
✗ Branch 1 not taken.
|
4013 | color_transfer_names[transfer] : NULL; |
| 3806 | } | ||
| 3807 | |||
| 3808 | ✗ | int av_color_transfer_from_name(const char *name) | |
| 3809 | { | ||
| 3810 | int i; | ||
| 3811 | |||
| 3812 | ✗ | for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) { | |
| 3813 | ✗ | if (!color_transfer_names[i]) | |
| 3814 | ✗ | continue; | |
| 3815 | |||
| 3816 | ✗ | if (av_strstart(name, color_transfer_names[i], NULL)) | |
| 3817 | ✗ | return i; | |
| 3818 | } | ||
| 3819 | |||
| 3820 | ✗ | return AVERROR(EINVAL); | |
| 3821 | } | ||
| 3822 | |||
| 3823 | 22913 | const char *av_color_space_name(enum AVColorSpace space) | |
| 3824 | { | ||
| 3825 | return (unsigned) space < AVCOL_SPC_NB ? | ||
| 3826 |
1/2✓ Branch 0 taken 22913 times.
✗ Branch 1 not taken.
|
22913 | color_space_names[space] : NULL; |
| 3827 | } | ||
| 3828 | |||
| 3829 | 20 | int av_color_space_from_name(const char *name) | |
| 3830 | { | ||
| 3831 | int i; | ||
| 3832 | |||
| 3833 |
1/2✓ Branch 0 taken 65 times.
✗ Branch 1 not taken.
|
65 | for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) { |
| 3834 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 65 times.
|
65 | if (!color_space_names[i]) |
| 3835 | ✗ | continue; | |
| 3836 | |||
| 3837 |
2/2✓ Branch 1 taken 20 times.
✓ Branch 2 taken 45 times.
|
65 | if (av_strstart(name, color_space_names[i], NULL)) |
| 3838 | 20 | return i; | |
| 3839 | } | ||
| 3840 | |||
| 3841 | ✗ | return AVERROR(EINVAL); | |
| 3842 | } | ||
| 3843 | |||
| 3844 | 712 | const char *av_chroma_location_name(enum AVChromaLocation location) | |
| 3845 | { | ||
| 3846 | return (unsigned) location < AVCHROMA_LOC_NB ? | ||
| 3847 |
1/2✓ Branch 0 taken 712 times.
✗ Branch 1 not taken.
|
712 | chroma_location_names[location] : NULL; |
| 3848 | } | ||
| 3849 | |||
| 3850 | ✗ | int av_chroma_location_from_name(const char *name) | |
| 3851 | { | ||
| 3852 | int i; | ||
| 3853 | |||
| 3854 | ✗ | for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) { | |
| 3855 | ✗ | if (!chroma_location_names[i]) | |
| 3856 | ✗ | continue; | |
| 3857 | |||
| 3858 | ✗ | if (av_strstart(name, chroma_location_names[i], NULL)) | |
| 3859 | ✗ | return i; | |
| 3860 | } | ||
| 3861 | |||
| 3862 | ✗ | return AVERROR(EINVAL); | |
| 3863 | } | ||
| 3864 | |||
| 3865 | 12647 | int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos) | |
| 3866 | { | ||
| 3867 |
2/4✓ Branch 0 taken 12647 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 12647 times.
|
12647 | if (pos <= AVCHROMA_LOC_UNSPECIFIED || pos >= AVCHROMA_LOC_NB) |
| 3868 | ✗ | return AVERROR(EINVAL); | |
| 3869 | 12647 | pos--; | |
| 3870 | |||
| 3871 | 12647 | *xpos = (pos&1) * 128; | |
| 3872 | 12647 | *ypos = ((pos>>1)^(pos<4)) * 128; | |
| 3873 | |||
| 3874 | 12647 | return 0; | |
| 3875 | } | ||
| 3876 | |||
| 3877 | 43 | enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos) | |
| 3878 | { | ||
| 3879 | int pos, xout, yout; | ||
| 3880 | |||
| 3881 |
1/2✓ Branch 0 taken 73 times.
✗ Branch 1 not taken.
|
73 | for (pos = AVCHROMA_LOC_UNSPECIFIED + 1; pos < AVCHROMA_LOC_NB; pos++) { |
| 3882 |
5/6✓ Branch 1 taken 73 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 51 times.
✓ Branch 4 taken 22 times.
✓ Branch 5 taken 43 times.
✓ Branch 6 taken 8 times.
|
73 | if (av_chroma_location_enum_to_pos(&xout, &yout, pos) == 0 && xout == xpos && yout == ypos) |
| 3883 | 43 | return pos; | |
| 3884 | } | ||
| 3885 | ✗ | return AVCHROMA_LOC_UNSPECIFIED; | |
| 3886 | } | ||
| 3887 | |||
| 3888 | 6387 | const char *av_alpha_mode_name(enum AVAlphaMode mode) | |
| 3889 | { | ||
| 3890 | return (unsigned) mode < AVALPHA_MODE_NB ? | ||
| 3891 |
1/2✓ Branch 0 taken 6387 times.
✗ Branch 1 not taken.
|
6387 | alpha_mode_names[mode] : NULL; |
| 3892 | } | ||
| 3893 | |||
| 3894 | 37 | enum AVAlphaMode av_alpha_mode_from_name(const char *name) | |
| 3895 | { | ||
| 3896 |
1/2✓ Branch 0 taken 99 times.
✗ Branch 1 not taken.
|
99 | for (int i = 0; i < FF_ARRAY_ELEMS(alpha_mode_names); i++) { |
| 3897 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 99 times.
|
99 | if (!alpha_mode_names[i]) |
| 3898 | ✗ | continue; | |
| 3899 | |||
| 3900 |
2/2✓ Branch 1 taken 37 times.
✓ Branch 2 taken 62 times.
|
99 | if (av_strstart(name, alpha_mode_names[i], NULL)) |
| 3901 | 37 | return i; | |
| 3902 | } | ||
| 3903 | |||
| 3904 | ✗ | return AVERROR(EINVAL); | |
| 3905 | } | ||
| 3906 |