1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*

Conflicts:
	doc/APIchanges
	libavcodec/avpicture.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/imgconvert.c
	libavcodec/tiffenc.c
	libavfilter/vf_pixdesctest.c
	libavfilter/vf_scale.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libavutil/version.h
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-05-15 10:50:20 +02:00
commit ff4680922f
19 changed files with 204 additions and 168 deletions

View File

@ -1504,11 +1504,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));

View File

@ -173,6 +173,9 @@ API changes, most recent first:
2012-03-26 - a67d9cf - lavfi 2.66.100
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
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.

View File

@ -77,7 +77,7 @@ static int get_color_type(const AVPixFmtDescriptor *desc) {
if(desc->name && !strncmp(desc->name, "yuvj", 4))
return FF_COLOR_YUV_JPEG;
if(desc->flags & PIX_FMT_RGB)
if(desc->flags & AV_PIX_FMT_FLAG_RGB)
return FF_COLOR_RGB;
if(desc->nb_components == 0)
@ -366,8 +366,8 @@ static inline int is_yuv_planar(const AVPixFmtDescriptor *desc)
int i;
int planes[4] = { 0 };
if ( desc->flags & PIX_FMT_RGB
|| !(desc->flags & PIX_FMT_PLANAR))
if ( desc->flags & AV_PIX_FMT_FLAG_RGB
|| !(desc->flags & AV_PIX_FMT_FLAG_PLANAR))
return 0;
/* set the used planes */

View File

@ -181,7 +181,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);

View File

@ -123,11 +123,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);
@ -276,7 +276,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]) {
av_buffer_unref(&frame->buf[0]);

View File

@ -762,7 +762,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);
@ -919,7 +919,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)

View File

@ -43,7 +43,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVFrame * const p = (AVFrame *)pict;
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:

View File

@ -364,7 +364,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);
}

View File

@ -285,7 +285,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];

View File

@ -51,8 +51,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);

View File

@ -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], AVPALETTE_SIZE);
for (c = 0; c < priv->pix_desc->nb_components; c++) {

View File

@ -252,11 +252,11 @@ static int config_props(AVFilterLink *outlink)
/* TODO: make algorithm configurable */
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 (outfmt == AV_PIX_FMT_PAL8) outfmt = AV_PIX_FMT_BGR8;
scale->output_is_pal = av_pix_fmt_desc_get(outfmt)->flags & PIX_FMT_PAL ||
av_pix_fmt_desc_get(outfmt)->flags & PIX_FMT_PSEUDOPAL;
scale->output_is_pal = av_pix_fmt_desc_get(outfmt)->flags & AV_PIX_FMT_FLAG_PAL ||
av_pix_fmt_desc_get(outfmt)->flags & AV_PIX_FMT_FLAG_PSEUDOPAL;
if (scale->sws)
sws_freeContext(scale->sws);

View File

@ -146,7 +146,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])

View File

@ -65,7 +65,7 @@ int image_get_linesize(int width, int plane,
return AVERROR(EINVAL);
linesize = max_step * shifted_w;
if (desc->flags & PIX_FMT_BITSTREAM)
if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM)
linesize = (linesize + 7) >> 3;
return linesize;
}
@ -92,7 +92,7 @@ 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);
av_image_fill_max_pixsteps(max_step, max_step_comp, desc);
@ -113,7 +113,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;
@ -121,8 +121,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;
@ -214,7 +214,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;
@ -260,11 +260,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);

View File

@ -44,7 +44,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);
@ -64,11 +64,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];
@ -89,7 +89,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);
@ -106,14 +106,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 {
@ -140,7 +140,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",
@ -163,7 +163,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",
@ -175,7 +175,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 2, 2, 0, 7 }, /* G */
{ 0, 2, 1, 0, 7 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_YUV422P] = {
.name = "yuv422p",
@ -187,7 +187,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",
@ -199,7 +199,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",
@ -211,7 +211,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",
@ -223,7 +223,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",
@ -243,7 +243,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",
@ -253,7 +253,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",
@ -263,7 +263,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",
@ -275,7 +275,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",
@ -287,7 +287,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",
@ -299,15 +299,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",
@ -341,7 +341,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 3, 2 }, /* G */
{ 0, 0, 1, 6, 1 }, /* B */
},
.flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_BGR4] = {
.name = "bgr4",
@ -353,7 +353,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 2, 0, 1 }, /* G */
{ 0, 3, 1, 0, 0 }, /* B */
},
.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",
@ -365,7 +365,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 1, 1 }, /* G */
{ 0, 0, 1, 3, 0 }, /* B */
},
.flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_RGB8] = {
.name = "rgb8",
@ -377,7 +377,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",
@ -389,7 +389,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",
@ -401,7 +401,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",
@ -413,7 +413,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",
@ -425,7 +425,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 2, 0, 7 }, /* U */
{ 1, 1, 1, 0, 7 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_ARGB] = {
.name = "argb",
@ -438,7 +438,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 4, 0, 7 }, /* B */
{ 0, 3, 1, 0, 7 }, /* A */
},
.flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_RGBA] = {
.name = "rgba",
@ -451,7 +451,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",
@ -464,7 +464,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 2, 0, 7 }, /* B */
{ 0, 3, 1, 0, 7 }, /* A */
},
.flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_BGRA] = {
.name = "bgra",
@ -477,7 +477,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 1, 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_0RGB] = {
.name = "0rgb",
@ -535,7 +535,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",
@ -556,7 +556,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",
@ -568,7 +568,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",
@ -581,7 +581,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */
{ 3, 0, 1, 0, 7 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P] = {
.name = "yuva422p",
@ -594,7 +594,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */
{ 3, 0, 1, 0, 7 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P] = {
.name = "yuva444p",
@ -607,7 +607,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 0, 1, 0, 7 }, /* V */
{ 3, 0, 1, 0, 7 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA420P9BE] = {
.name = "yuva420p9be",
@ -620,7 +620,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA420P9LE] = {
.name = "yuva420p9le",
@ -633,7 +633,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P9BE] = {
.name = "yuva422p9be",
@ -646,7 +646,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P9LE] = {
.name = "yuva422p9le",
@ -659,7 +659,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P9BE] = {
.name = "yuva444p9be",
@ -672,7 +672,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P9LE] = {
.name = "yuva444p9le",
@ -685,7 +685,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 8 }, /* V */
{ 3, 1, 1, 0, 8 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA420P10BE] = {
.name = "yuva420p10be",
@ -698,7 +698,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA420P10LE] = {
.name = "yuva420p10le",
@ -711,7 +711,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P10BE] = {
.name = "yuva422p10be",
@ -724,7 +724,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P10LE] = {
.name = "yuva422p10le",
@ -737,7 +737,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P10BE] = {
.name = "yuva444p10be",
@ -750,7 +750,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P10LE] = {
.name = "yuva444p10le",
@ -763,7 +763,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 9 }, /* V */
{ 3, 1, 1, 0, 9 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA420P16BE] = {
.name = "yuva420p16be",
@ -776,7 +776,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA420P16LE] = {
.name = "yuva420p16le",
@ -789,7 +789,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P16BE] = {
.name = "yuva422p16be",
@ -802,7 +802,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA422P16LE] = {
.name = "yuva422p16le",
@ -815,7 +815,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P16BE] = {
.name = "yuva444p16be",
@ -828,7 +828,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_YUVA444P16LE] = {
.name = "yuva444p16le",
@ -841,43 +841,43 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 2, 1, 1, 0, 15 }, /* V */
{ 3, 1, 1, 0, 15 }, /* A */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_VDPAU_H264] = {
.name = "vdpau_h264",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VDPAU_MPEG1] = {
.name = "vdpau_mpeg1",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VDPAU_MPEG2] = {
.name = "vdpau_mpeg2",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VDPAU_WMV3] = {
.name = "vdpau_wmv3",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VDPAU_VC1] = {
.name = "vdpau_vc1",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VDPAU_MPEG4] = {
.name = "vdpau_mpeg4",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_RGB48BE] = {
.name = "rgb48be",
@ -889,7 +889,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 5, 3, 0, 15 }, /* G */
{ 0, 5, 5, 0, 15 }, /* B */
},
.flags = PIX_FMT_RGB | PIX_FMT_BE,
.flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE,
},
[AV_PIX_FMT_RGB48LE] = {
.name = "rgb48le",
@ -901,7 +901,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 5, 3, 0, 15 }, /* G */
{ 0, 5, 5, 0, 15 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGBA64BE] = {
.name = "rgba64be",
@ -939,7 +939,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 5 }, /* G */
{ 0, 1, 1, 0, 4 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB565LE] = {
.name = "rgb565le",
@ -951,7 +951,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 5 }, /* G */
{ 0, 1, 1, 0, 4 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB555BE] = {
.name = "rgb555be",
@ -963,7 +963,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 4 }, /* G */
{ 0, 1, 1, 0, 4 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB555LE] = {
.name = "rgb555le",
@ -975,7 +975,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 4 }, /* G */
{ 0, 1, 1, 0, 4 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB444BE] = {
.name = "rgb444be",
@ -987,7 +987,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 4, 3 }, /* G */
{ 0, 1, 1, 0, 3 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB444LE] = {
.name = "rgb444le",
@ -999,7 +999,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 4, 3 }, /* G */
{ 0, 1, 1, 0, 3 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR48BE] = {
.name = "bgr48be",
@ -1011,7 +1011,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 5, 3, 0, 15 }, /* G */
{ 0, 5, 1, 0, 15 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR48LE] = {
.name = "bgr48le",
@ -1023,7 +1023,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 5, 3, 0, 15 }, /* G */
{ 0, 5, 1, 0, 15 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGRA64BE] = {
.name = "bgra64be",
@ -1061,7 +1061,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 5 }, /* G */
{ 0, 1, 0, 3, 4 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR565LE] = {
.name = "bgr565le",
@ -1073,7 +1073,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 5 }, /* G */
{ 0, 1, 2, 3, 4 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR555BE] = {
.name = "bgr555be",
@ -1085,7 +1085,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 4 }, /* G */
{ 0, 1, 0, 2, 4 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR555LE] = {
.name = "bgr555le",
@ -1097,7 +1097,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 5, 4 }, /* G */
{ 0, 1, 2, 2, 4 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR444BE] = {
.name = "bgr444be",
@ -1109,7 +1109,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 4, 3 }, /* G */
{ 0, 1, 0, 0, 3 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR444LE] = {
.name = "bgr444le",
@ -1121,25 +1121,25 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 4, 3 }, /* G */
{ 0, 1, 2, 0, 3 }, /* B */
},
.flags = PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_VAAPI_MOCO] = {
.name = "vaapi_moco",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VAAPI_IDCT] = {
.name = "vaapi_idct",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VAAPI_VLD] = {
.name = "vaapi_vld",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_YUV420P9LE] = {
.name = "yuv420p9le",
@ -1151,7 +1151,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 8 }, /* U */
{ 2, 1, 1, 0, 8 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P9BE] = {
.name = "yuv420p9be",
@ -1163,7 +1163,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 8 }, /* U */
{ 2, 1, 1, 0, 8 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P10LE] = {
.name = "yuv420p10le",
@ -1175,7 +1175,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 9 }, /* U */
{ 2, 1, 1, 0, 9 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P10BE] = {
.name = "yuv420p10be",
@ -1187,7 +1187,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 9 }, /* U */
{ 2, 1, 1, 0, 9 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P12LE] = {
.name = "yuv420p12le",
@ -1247,7 +1247,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* U */
{ 2, 1, 1, 0, 15 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P16BE] = {
.name = "yuv420p16be",
@ -1259,7 +1259,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* U */
{ 2, 1, 1, 0, 15 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P9LE] = {
.name = "yuv422p9le",
@ -1271,7 +1271,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 8 }, /* U */
{ 2, 1, 1, 0, 8 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P9BE] = {
.name = "yuv422p9be",
@ -1283,7 +1283,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 8 }, /* U */
{ 2, 1, 1, 0, 8 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P10LE] = {
.name = "yuv422p10le",
@ -1295,7 +1295,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 9 }, /* U */
{ 2, 1, 1, 0, 9 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P10BE] = {
.name = "yuv422p10be",
@ -1307,7 +1307,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 9 }, /* U */
{ 2, 1, 1, 0, 9 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P12LE] = {
.name = "yuv422p12le",
@ -1367,7 +1367,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* U */
{ 2, 1, 1, 0, 15 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P16BE] = {
.name = "yuv422p16be",
@ -1379,7 +1379,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* U */
{ 2, 1, 1, 0, 15 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P16LE] = {
.name = "yuv444p16le",
@ -1391,7 +1391,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* U */
{ 2, 1, 1, 0, 15 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P16BE] = {
.name = "yuv444p16be",
@ -1403,7 +1403,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* U */
{ 2, 1, 1, 0, 15 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P10LE] = {
.name = "yuv444p10le",
@ -1415,7 +1415,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 9 }, /* U */
{ 2, 1, 1, 0, 9 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P10BE] = {
.name = "yuv444p10be",
@ -1427,7 +1427,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 9 }, /* U */
{ 2, 1, 1, 0, 9 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P9LE] = {
.name = "yuv444p9le",
@ -1439,7 +1439,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 8 }, /* U */
{ 2, 1, 1, 0, 8 }, /* V */
},
.flags = PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P9BE] = {
.name = "yuv444p9be",
@ -1451,7 +1451,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 8 }, /* U */
{ 2, 1, 1, 0, 8 }, /* V */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P12LE] = {
.name = "yuv444p12le",
@ -1505,7 +1505,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.name = "dxva2_vld",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_VDA_VLD] = {
.name = "vda_vld",
@ -1520,7 +1520,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 7 }, /* Y */
{ 0, 1, 2, 0, 7 }, /* A */
},
.flags = PIX_FMT_ALPHA,
.flags = AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_GBRP] = {
.name = "gbrp",
@ -1532,7 +1532,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 0, 1, 0, 7 }, /* G */
{ 1, 0, 1, 0, 7 }, /* B */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP9LE] = {
.name = "gbrp9le",
@ -1544,7 +1544,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 8 }, /* G */
{ 1, 1, 1, 0, 8 }, /* B */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP9BE] = {
.name = "gbrp9be",
@ -1556,7 +1556,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 8 }, /* G */
{ 1, 1, 1, 0, 8 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP10LE] = {
.name = "gbrp10le",
@ -1568,7 +1568,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 9 }, /* G */
{ 1, 1, 1, 0, 9 }, /* B */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP10BE] = {
.name = "gbrp10be",
@ -1628,7 +1628,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 13 }, /* G */
{ 1, 1, 1, 0, 13 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP16LE] = {
.name = "gbrp16le",
@ -1640,7 +1640,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 15 }, /* G */
{ 1, 1, 1, 0, 15 }, /* B */
},
.flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP16BE] = {
.name = "gbrp16be",
@ -1652,7 +1652,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 15 }, /* G */
{ 1, 1, 1, 0, 15 }, /* B */
},
.flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB,
.flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRAP] = {
.name = "gbrap",
@ -1697,7 +1697,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.name = "vdpau",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
.flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_XYZ12LE] = {
.name = "xyz12le",
@ -1721,7 +1721,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 5, 3, 4, 11 }, /* Y */
{ 0, 5, 5, 4, 11 }, /* Z */
},
.flags = PIX_FMT_BE,
.flags = AV_PIX_FMT_FLAG_BE,
},
};

View File

@ -86,21 +86,54 @@ typedef struct AVPixFmtDescriptor{
AVComponentDescriptor comp[4];
}AVPixFmtDescriptor;
#define PIX_FMT_BE 1 ///< Pixel format is big-endian.
#define PIX_FMT_PAL 2 ///< Pixel format has a palette in data[1], values are indexes in this palette.
#define PIX_FMT_BITSTREAM 4 ///< All values of a component are bit-wise packed end to end.
#define PIX_FMT_HWACCEL 8 ///< Pixel format is an HW accelerated format.
#define PIX_FMT_PLANAR 16 ///< At least one pixel component is not in the first data plane
#define PIX_FMT_RGB 32 ///< The pixel format contains RGB-like data (as opposed to YUV/grayscale)
/**
* Pixel format is big-endian.
*/
#define AV_PIX_FMT_FLAG_BE (1 << 0)
/**
* Pixel format has a palette in data[1], values are indexes in this palette.
*/
#define AV_PIX_FMT_FLAG_PAL (1 << 1)
/**
* All values of a component are bit-wise packed end to end.
*/
#define AV_PIX_FMT_FLAG_BITSTREAM (1 << 2)
/**
* Pixel format is an HW accelerated format.
*/
#define AV_PIX_FMT_FLAG_HWACCEL (1 << 3)
/**
* At least one pixel component is not in the first data plane.
*/
#define AV_PIX_FMT_FLAG_PLANAR (1 << 4)
/**
* The pixel format contains RGB-like data (as opposed to YUV/grayscale).
*/
#define AV_PIX_FMT_FLAG_RGB (1 << 5)
/**
* The pixel format is "pseudo-paletted". This means that FFmpeg treats it as
* paletted internally, but the palette is generated by the decoder and is not
* stored in the file.
*/
#define PIX_FMT_PSEUDOPAL 64
#define PIX_FMT_ALPHA 128 ///< The pixel format has an alpha channel
#define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6)
/**
* The pixel format has an alpha channel.
*/
#define AV_PIX_FMT_FLAG_ALPHA (1 << 7)
#if FF_API_PIX_FMT
/**
* @deprecate use the AV_PIX_FMT_FLAG_* flags
*/
#define PIX_FMT_BE AV_PIX_FMT_FLAG_BE
#define PIX_FMT_PAL AV_PIX_FMT_FLAG_PAL
#define PIX_FMT_BITSTREAM AV_PIX_FMT_FLAG_BITSTREAM
#define PIX_FMT_HWACCEL AV_PIX_FMT_FLAG_HWACCEL
#define PIX_FMT_PLANAR AV_PIX_FMT_FLAG_PLANAR
#define PIX_FMT_RGB AV_PIX_FMT_FLAG_RGB
#define PIX_FMT_PSEUDOPAL AV_PIX_FMT_FLAG_PSEUDOPAL
#define PIX_FMT_ALPHA AV_PIX_FMT_FLAG_ALPHA
#endif
#if FF_API_PIX_FMT_DESC
/**

View File

@ -75,7 +75,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 31
#define LIBAVUTIL_VERSION_MINOR 32
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

View File

@ -633,33 +633,33 @@ static av_always_inline int isBE(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return desc->flags & PIX_FMT_BE;
return desc->flags & AV_PIX_FMT_FLAG_BE;
}
static av_always_inline int isYUV(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return !(desc->flags & PIX_FMT_RGB) && desc->nb_components >= 2;
return !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
}
static av_always_inline int isPlanarYUV(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return ((desc->flags & PIX_FMT_PLANAR) && isYUV(pix_fmt));
return ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) && isYUV(pix_fmt));
}
static av_always_inline int isRGB(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return (desc->flags & PIX_FMT_RGB);
return (desc->flags & AV_PIX_FMT_FLAG_RGB);
}
#if 0 // FIXME
#define isGray(x) \
(!(av_pix_fmt_desc_get(x)->flags & PIX_FMT_PAL) && \
(!(av_pix_fmt_desc_get(x)->flags & AV_PIX_FMT_FLAG_PAL) && \
av_pix_fmt_desc_get(x)->nb_components <= 2)
#else
#define isGray(x) \
@ -759,7 +759,7 @@ static av_always_inline int isPacked(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return ((desc->nb_components >= 2 && !(desc->flags & PIX_FMT_PLANAR)) ||
return ((desc->nb_components >= 2 && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR)) ||
pix_fmt == AV_PIX_FMT_PAL8);
}
@ -768,29 +768,29 @@ static av_always_inline int isPlanar(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return (desc->nb_components >= 2 && (desc->flags & PIX_FMT_PLANAR));
return (desc->nb_components >= 2 && (desc->flags & AV_PIX_FMT_FLAG_PLANAR));
}
static av_always_inline int isPackedRGB(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return ((desc->flags & (PIX_FMT_PLANAR | PIX_FMT_RGB)) == PIX_FMT_RGB);
return ((desc->flags & (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) == AV_PIX_FMT_FLAG_RGB);
}
static av_always_inline int isPlanarRGB(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return ((desc->flags & (PIX_FMT_PLANAR | PIX_FMT_RGB)) ==
(PIX_FMT_PLANAR | PIX_FMT_RGB));
return ((desc->flags & (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) ==
(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB));
}
static av_always_inline int usePal(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
return (desc->flags & PIX_FMT_PAL) || (desc->flags & PIX_FMT_PSEUDOPAL);
return (desc->flags & AV_PIX_FMT_FLAG_PAL) || (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL);
}
extern const uint64_t ff_dither4[2];

View File

@ -615,7 +615,7 @@ static rgbConvFn findRgbConvFn(SwsContext *c)
#define IS_NOT_NE(bpp, desc) \
(((bpp + 7) >> 3) == 2 && \
(!(desc->flags & PIX_FMT_BE) != !HAVE_BIGENDIAN))
(!(desc->flags & AV_PIX_FMT_FLAG_BE) != !HAVE_BIGENDIAN))
#define CONV_IS(src, dst) (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst)