Commit e6c4ac7b authored by Anton Khirnov's avatar Anton Khirnov
Browse files

pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*

parent 7c57a582
......@@ -1161,11 +1161,11 @@ int show_pix_fmts(void *optctx, const char *opt, const char *arg)
while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) {
enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
printf("%c%c%c%c%c %-16s %d %2d\n",
sws_isSupportedInput (pix_fmt) ? 'I' : '.',
sws_isSupportedOutput(pix_fmt) ? 'O' : '.',
pix_desc->flags & PIX_FMT_HWACCEL ? 'H' : '.',
pix_desc->flags & PIX_FMT_PAL ? 'P' : '.',
pix_desc->flags & PIX_FMT_BITSTREAM ? 'B' : '.',
sws_isSupportedInput (pix_fmt) ? 'I' : '.',
sws_isSupportedOutput(pix_fmt) ? 'O' : '.',
pix_desc->flags & AV_PIX_FMT_FLAG_HWACCEL ? 'H' : '.',
pix_desc->flags & AV_PIX_FMT_FLAG_PAL ? 'P' : '.',
pix_desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ? 'B' : '.',
pix_desc->name,
pix_desc->nb_components,
av_get_bits_per_pixel(pix_desc));
......
......@@ -13,6 +13,9 @@ libavutil: 2012-10-22
API changes, most recent first:
2013-05-xx - xxxxxxx - lavu 52.11.0 - pixdesc.h
Replace PIX_FMT_* flags with AV_PIX_FMT_FLAG_*.
2013-04-xx - xxxxxxx - lavc 55.4.0 - avcodec.h
Add field_order to AVCodecParserContext.
......
......@@ -75,7 +75,7 @@ int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt,
}
}
if (desc->flags & PIX_FMT_PAL)
if (desc->flags & AV_PIX_FMT_FLAG_PAL)
memcpy((unsigned char *)(((size_t)dest + 3) & ~3),
src->data[1], 256 * 4);
......@@ -92,7 +92,7 @@ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
return AVERROR(EINVAL);
if ((ret = av_image_check_size(width, height, 0, NULL)) < 0)
return ret;
if (desc->flags & PIX_FMT_PSEUDOPAL)
if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
// do not include palette for these pseudo-paletted formats
return width * height;
return avpicture_fill(&dummy_pict, NULL, pix_fmt, width, height);
......
......@@ -335,7 +335,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
FFV1Context *fs = *(void **)arg;
FFV1Context *f = fs->avctx->priv_data;
int width, height, x, y, ret;
const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR)
const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR)
? (c->bits_per_raw_sample > 8) + 1
: 4;
AVFrame *const p = f->cur;
......
......@@ -875,7 +875,7 @@ static int encode_slice(AVCodecContext *c, void *arg)
int x = fs->slice_x;
int y = fs->slice_y;
AVFrame *const p = &f->picture;
const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR)
const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR)
? (f->bits_per_raw_sample > 8) + 1
: 4;
......
......@@ -60,7 +60,7 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
static int is_gray(const AVPixFmtDescriptor *desc)
{
return desc->nb_components - (desc->flags & PIX_FMT_ALPHA) == 1;
return desc->nb_components - (desc->flags & AV_PIX_FMT_FLAG_ALPHA) == 1;
}
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
......@@ -86,11 +86,11 @@ int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
dst_desc->log2_chroma_h > src_desc->log2_chroma_h)
loss |= FF_LOSS_RESOLUTION;
if ((src_desc->flags & PIX_FMT_RGB) != (dst_desc->flags & PIX_FMT_RGB))
if ((src_desc->flags & AV_PIX_FMT_FLAG_RGB) != (dst_desc->flags & AV_PIX_FMT_FLAG_RGB))
loss |= FF_LOSS_COLORSPACE;
if (has_alpha && !(dst_desc->flags & PIX_FMT_ALPHA) &&
(dst_desc->flags & PIX_FMT_ALPHA))
if (has_alpha && !(dst_desc->flags & AV_PIX_FMT_FLAG_ALPHA) &&
(dst_desc->flags & AV_PIX_FMT_FLAG_ALPHA))
loss |= FF_LOSS_ALPHA;
if (dst_pix_fmt == AV_PIX_FMT_PAL8 && !is_gray(src_desc))
......@@ -260,8 +260,8 @@ void ff_shrink88(uint8_t *dst, int dst_wrap,
/* return true if yuv planar */
static inline int is_yuv_planar(const AVPixFmtDescriptor *desc)
{
return (!(desc->flags & PIX_FMT_RGB) &&
(desc->flags & PIX_FMT_PLANAR));
return (!(desc->flags & AV_PIX_FMT_FLAG_RGB) &&
(desc->flags & AV_PIX_FMT_FLAG_PLANAR));
}
int av_picture_crop(AVPicture *dst, const AVPicture *src,
......
......@@ -173,7 +173,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
}else
s->maxval=1;
/* more check if YUV420 */
if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & PIX_FMT_PLANAR) {
if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) {
if ((avctx->width & 1) != 0)
return AVERROR_INVALIDDATA;
h = (avctx->height * 2);
......
......@@ -98,11 +98,11 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
if (desc->flags & (PIX_FMT_PAL | PIX_FMT_PSEUDOPAL)) {
if (desc->flags & (AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_PSEUDOPAL)) {
context->palette = av_buffer_alloc(AVPALETTE_SIZE);
if (!context->palette)
return AVERROR(ENOMEM);
if (desc->flags & PIX_FMT_PSEUDOPAL)
if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
else
memset(context->palette->data, 0, AVPALETTE_SIZE);
......@@ -210,7 +210,7 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
}
if ((avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) ||
(desc->flags & PIX_FMT_PSEUDOPAL)) {
(desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)) {
frame->buf[1] = av_buffer_ref(context->palette);
if (!frame->buf[1])
return AVERROR(ENOMEM);
......
......@@ -242,9 +242,9 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
case AV_PIX_FMT_PAL8:
pfd = av_pix_fmt_desc_get(avctx->pix_fmt);
s->bpp = av_get_bits_per_pixel(pfd);
if (pfd->flags & PIX_FMT_PAL) {
if (pfd->flags & AV_PIX_FMT_FLAG_PAL) {
s->photometric_interpretation = 3;
} else if (pfd->flags & PIX_FMT_RGB) {
} else if (pfd->flags & AV_PIX_FMT_FLAG_RGB) {
s->photometric_interpretation = 2;
} else {
s->photometric_interpretation = 1;
......
......@@ -663,7 +663,7 @@ do { \
planes = av_pix_fmt_count_planes(frame->format);
/* workaround for AVHWAccel plane count of 0, buf[0] is used as
check for allocated buffers: make libavcodec happy */
if (desc && desc->flags & PIX_FMT_HWACCEL)
if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
planes = 1;
if (!desc || planes <= 0) {
ret = AVERROR(EINVAL);
......@@ -793,7 +793,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
return desc->flags & PIX_FMT_HWACCEL;
return desc->flags & AV_PIX_FMT_FLAG_HWACCEL;
}
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
......
......@@ -51,7 +51,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
uint8_t *ptr, *buf;
pixdepth = av_get_bits_per_pixel(desc);
if (desc->flags & PIX_FMT_BE)
if (desc->flags & AV_PIX_FMT_FLAG_BE)
be = 1;
switch (pix_fmt) {
case AV_PIX_FMT_ARGB:
......
......@@ -216,7 +216,7 @@ AVFilterFormats *ff_all_formats(enum AVMediaType type)
for (fmt = 0; fmt < num_formats; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
if ((type != AVMEDIA_TYPE_VIDEO) ||
(type == AVMEDIA_TYPE_VIDEO && !(desc->flags & PIX_FMT_HWACCEL)))
(type == AVMEDIA_TYPE_VIDEO && !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)))
ff_add_format(&ret, fmt);
}
......
......@@ -261,7 +261,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
frame->data[0] += crop->y * frame->linesize[0];
frame->data[0] += crop->x * crop->max_step[0];
if (!(desc->flags & PIX_FMT_PAL || desc->flags & PIX_FMT_PSEUDOPAL)) {
if (!(desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)) {
for (i = 1; i < 3; i ++) {
if (frame->data[i]) {
frame->data[i] += (crop->y >> crop->vsub) * frame->linesize[i];
......
......@@ -56,8 +56,8 @@ static int query_formats(AVFilterContext *ctx)
formats = NULL;
for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
if (!(desc->flags & PIX_FMT_HWACCEL ||
desc->flags & PIX_FMT_BITSTREAM) &&
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
desc->nb_components && !desc->log2_chroma_h &&
(ret = ff_add_format(&formats, pix_fmt)) < 0) {
ff_formats_unref(&formats);
......
......@@ -78,8 +78,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
/* copy palette */
if (priv->pix_desc->flags & PIX_FMT_PAL ||
priv->pix_desc->flags & PIX_FMT_PSEUDOPAL)
if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL ||
priv->pix_desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
memcpy(out->data[1], in->data[1], 256*4);
for (c = 0; c < priv->pix_desc->nb_components; c++) {
......
......@@ -220,8 +220,8 @@ static int config_props(AVFilterLink *outlink)
outlink->w, outlink->h, av_get_pix_fmt_name(outlink->format),
scale->flags);
scale->input_is_pal = desc->flags & PIX_FMT_PAL ||
desc->flags & PIX_FMT_PSEUDOPAL;
scale->input_is_pal = desc->flags & AV_PIX_FMT_FLAG_PAL ||
desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL;
if (scale->sws)
sws_freeContext(scale->sws);
......
......@@ -93,7 +93,7 @@ static int get_video_buffer(AVFrame *frame, int align)
frame->data[i] = frame->buf[i]->data;
}
if (desc->flags & PIX_FMT_PAL || desc->flags & PIX_FMT_PSEUDOPAL) {
if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
av_buffer_unref(&frame->buf[1]);
frame->buf[1] = av_buffer_alloc(1024);
if (!frame->buf[1])
......
......@@ -55,7 +55,7 @@ int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane)
if (!desc)
return AVERROR(EINVAL);
if (desc->flags & PIX_FMT_BITSTREAM)
if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM)
return (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
av_image_fill_max_pixsteps(max_step, max_step_comp, desc);
......@@ -72,10 +72,10 @@ int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int wi
memset(linesizes, 0, 4*sizeof(linesizes[0]));
if (!desc || desc->flags & PIX_FMT_HWACCEL)
if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
return AVERROR(EINVAL);
if (desc->flags & PIX_FMT_BITSTREAM) {
if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) {
if (width > (INT_MAX -7) / (desc->comp[0].step_minus1+1))
return AVERROR(EINVAL);
linesizes[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
......@@ -102,7 +102,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
memset(data , 0, sizeof(data[0])*4);
if (!desc || desc->flags & PIX_FMT_HWACCEL)
if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
return AVERROR(EINVAL);
data[0] = ptr;
......@@ -110,8 +110,8 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
return AVERROR(EINVAL);
size[0] = linesizes[0] * height;
if (desc->flags & PIX_FMT_PAL ||
desc->flags & PIX_FMT_PSEUDOPAL) {
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
size[0] = (size[0] + 3) & ~3;
data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits words */
return size[0] + 256 * 4;
......@@ -203,7 +203,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
av_free(buf);
return ret;
}
if (desc->flags & PIX_FMT_PAL || desc->flags & PIX_FMT_PSEUDOPAL)
if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
return ret;
......@@ -247,11 +247,11 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
if (!desc || desc->flags & PIX_FMT_HWACCEL)
if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
return;
if (desc->flags & PIX_FMT_PAL ||
desc->flags & PIX_FMT_PSEUDOPAL) {
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
av_image_copy_plane(dst_data[0], dst_linesizes[0],
src_data[0], src_linesizes[0],
width, height);
......
......@@ -42,7 +42,7 @@ void av_read_image_line(uint16_t *dst,
int step = comp.step_minus1 + 1;
int flags = desc->flags;
if (flags & PIX_FMT_BITSTREAM) {
if (flags & AV_PIX_FMT_FLAG_BITSTREAM) {
int skip = x * step + comp.offset_plus1 - 1;
const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
int shift = 8 - depth - (skip & 7);
......@@ -62,11 +62,11 @@ void av_read_image_line(uint16_t *dst,
int is_8bit = shift + depth <= 8;
if (is_8bit)
p += !!(flags & PIX_FMT_BE);
p += !!(flags & AV_PIX_FMT_FLAG_BE);
while (w--) {
int val = is_8bit ? *p :
flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);
flags & AV_PIX_FMT_FLAG_BE ? AV_RB16(p) : AV_RL16(p);
val = (val >> shift) & mask;
if (read_pal_component)
val = data[1][4 * val + c];
......@@ -87,7 +87,7 @@ void av_write_image_line(const uint16_t *src,
int step = comp.step_minus1 + 1;
int flags = desc->flags;
if (flags & PIX_FMT_BITSTREAM) {
if (flags & AV_PIX_FMT_FLAG_BITSTREAM) {
int skip = x * step + comp.offset_plus1 - 1;
uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
int shift = 8 - depth - (skip & 7);
......@@ -104,14 +104,14 @@ void av_write_image_line(const uint16_t *src,
x * step + comp.offset_plus1 - 1;
if (shift + depth <= 8) {
p += !!(flags & PIX_FMT_BE);
p += !!(flags & AV_PIX_FMT_FLAG_BE);
while (w--) {
*p |= (*src++ << shift);
p += step;
}
} else {
while (w--) {
if (flags & PIX_FMT_BE) {
if (flags & AV_PIX_FMT_FLAG_BE) {
uint16_t val = AV_RB16(p) | (*src++ << shift);
AV_WB16(p, val);
} else {
......@@ -138,7 +138,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUYV422] = {
.name = "yuyv422",
......@@ -161,7 +161,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 2, 2, 0, 7 }, /* G */
{ 0, 2, 3, 0, 7 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR24] = {
.name = "bgr24",
......@@ -173,7 +173,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 2, 2, 0, 7 }, /* G */
{ 0, 2, 3, 0, 7 }, /* R */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_YUV422P] = {
.name = "yuv422p",
......@@ -185,7 +185,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P] = {
.name = "yuv444p",
......@@ -197,7 +197,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV410P] = {
.name = "yuv410p",
......@@ -209,7 +209,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV411P] = {
.name = "yuv411p",
......@@ -221,7 +221,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_GRAY8] = {
.name = "gray",
......@@ -240,7 +240,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.comp = {
{ 0, 0, 1, 0, 0 }, /* Y */
},
.flags = PIX_FMT_BITSTREAM,
.flags = AV_PIX_FMT_FLAG_BITSTREAM,
},
[AV_PIX_FMT_MONOBLACK] = {
.name = "monob",
......@@ -250,7 +250,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.comp = {
{ 0, 0, 1, 7, 0 }, /* Y */
},
.flags = PIX_FMT_BITSTREAM,
.flags = AV_PIX_FMT_FLAG_BITSTREAM,
},
[AV_PIX_FMT_PAL8] = {
.name = "pal8",
......@@ -260,7 +260,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.comp = {
{ 0, 0, 1, 0, 7 },
},
.flags = PIX_FMT_PAL,
.flags = AV_PIX_FMT_FLAG_PAL,
},
[AV_PIX_FMT_YUVJ420P] = {
.name = "yuvj420p",
......@@ -272,7 +272,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUVJ422P] = {
.name = "yuvj422p",
......@@ -284,7 +284,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUVJ444P] = {
.name = "yuvj444p",
......@@ -296,15 +296,15 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{1, 0, 1, 0, 7}, /* U */
{2, 0, 1, 0, 7}, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_XVMC_MPEG2_MC] = {
.name = "xvmcmc",
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_XVMC_MPEG2_IDCT] = {
.name = "xvmcidct",
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_UYVY422] = {
.name = "uyvy422",
......@@ -338,7 +338,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 3, 2 }, /* G */
{ 0, 0, 1, 0, 2 }, /* R */
},
.flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_BGR4] = {
.name = "bgr4",
......@@ -350,7 +350,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 2, 0, 1 }, /* G */
{ 0, 3, 4, 0, 0 }, /* R */
},
.flags = PIX_FMT_BITSTREAM | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR4_BYTE] = {
.name = "bgr4_byte",
......@@ -362,7 +362,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 1, 1 }, /* G */
{ 0, 0, 1, 0, 0 }, /* R */
},
.flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_RGB8] = {
.name = "rgb8",
......@@ -374,7 +374,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 3, 2 }, /* G */
{ 0, 0, 1, 0, 2 }, /* B */
},
.flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_RGB4] = {
.name = "rgb4",
......@@ -386,7 +386,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 2, 0, 1 }, /* G */
{ 0, 3, 4, 0, 0 }, /* B */
},
.flags = PIX_FMT_BITSTREAM | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BITSTREAM | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB4_BYTE] = {
.name = "rgb4_byte",
......@@ -398,7 +398,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 1, 1 }, /* G */
{ 0, 0, 1, 0, 0 }, /* B */
},
.flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_NV12] = {
.name = "nv12",
......@@ -410,7 +410,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 7 }, /* U */
{ 1, 1, 2, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_NV21] = {
.name = "nv21",
......@@ -422,7 +422,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 7 }, /* V */
{ 1, 1, 2, 0, 7 }, /* U */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_ARGB] = {
.name = "argb",
......@@ -435,7 +435,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* G */
{ 0, 3, 4, 0, 7 }, /* B */
},
.flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_RGBA] = {
.name = "rgba",
......@@ -448,7 +448,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* B */
{ 0, 3, 4, 0, 7 }, /* A */
},
.flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_ABGR] = {
.name = "abgr",
......@@ -461,7 +461,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* G */
{ 0, 3, 4, 0, 7 }, /* R */
},
.flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_BGRA] = {
.name = "bgra",
......@@ -474,7 +474,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* R */
{ 0, 3, 4, 0, 7 }, /* A */
},
.flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_GRAY16BE] = {
.name = "gray16be",
......@@ -484,7 +484,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.comp = {
{ 0, 1, 1, 0, 15 }, /* Y */
},
.flags = PIX_FMT_BE,
.flags = AV_PIX_FMT_FLAG_BE,
},
[AV_PIX_FMT_GRAY16LE] = {
.name = "gray16le",
......@@ -505,7 +505,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUVJ440P] = {
.name = "yuvj440p",
......@@ -517,7 +517,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* U */
{ 2, 0, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUVA420P] = {
.name = "yuva420p",
......@@ -530,7 +530,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */