.comp = {
{ 0, 1, 0, 0, 8, 0, 7, 1 },
},
- .flags = AV_PIX_FMT_FLAG_PAL,
+ .flags = AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVJ420P] = {
.name = "yuvj420p",
},
.alias = "y12le",
},
+ [AV_PIX_FMT_GRAY14BE] = {
+ .name = "gray14be",
+ .nb_components = 1,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
+ },
+ .flags = AV_PIX_FMT_FLAG_BE,
+ .alias = "y14be",
+ },
+ [AV_PIX_FMT_GRAY14LE] = {
+ .name = "gray14le",
+ .nb_components = 1,
+ .log2_chroma_w = 0,
+ .log2_chroma_h = 0,
+ .comp = {
+ { 0, 2, 0, 0, 14, 1, 13, 1 }, /* Y */
+ },
+ .alias = "y14le",
+ },
[AV_PIX_FMT_GRAY16BE] = {
.name = "gray16be",
.nb_components = 1,
av_assert0(d->log2_chroma_h <= 3);
av_assert0(d->nb_components <= 4);
av_assert0(d->name && d->name[0]);
- av_assert0((d->nb_components==4 || d->nb_components==2) == !!(d->flags & AV_PIX_FMT_FLAG_ALPHA));
av_assert2(av_get_pix_fmt(d->name) == i);
for (j=0; j<FF_ARRAY_ELEMS(d->comp); j++) {
#define FF_COLOR_XYZ 4
#define pixdesc_has_alpha(pixdesc) \
- ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
+ ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
static int get_color_type(const AVPixFmtDescriptor *desc) {
int i;
for (i = 0; i < FF_ARRAY_ELEMS(color_primaries_names); i++) {
- size_t len = strlen(color_primaries_names[i]);
+ size_t len;
+
+ if (!color_primaries_names[i])
+ continue;
+
+ len = strlen(color_primaries_names[i]);
if (!strncmp(color_primaries_names[i], name, len))
return i;
}
int i;
for (i = 0; i < FF_ARRAY_ELEMS(color_transfer_names); i++) {
- size_t len = strlen(color_transfer_names[i]);
+ size_t len;
+
+ if (!color_transfer_names[i])
+ continue;
+
+ len = strlen(color_transfer_names[i]);
if (!strncmp(color_transfer_names[i], name, len))
return i;
}
int i;
for (i = 0; i < FF_ARRAY_ELEMS(color_space_names); i++) {
- size_t len = strlen(color_space_names[i]);
+ size_t len;
+
+ if (!color_space_names[i])
+ continue;
+
+ len = strlen(color_space_names[i]);
if (!strncmp(color_space_names[i], name, len))
return i;
}
int i;
for (i = 0; i < FF_ARRAY_ELEMS(chroma_location_names); i++) {
- size_t len = strlen(chroma_location_names[i]);
+ size_t len;
+
+ if (!chroma_location_names[i])
+ continue;
+
+ len = strlen(chroma_location_names[i]);
if (!strncmp(chroma_location_names[i], name, len))
return i;
}