summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-05-15 09:23:14 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-05-15 09:23:14 (GMT)
commitc7c71f95f8d3e98babf8b6b7f1edc49f14e2c4c4 (patch)
treeb734a52c2c51db2b0ccf4b4159abe9865746ceb2
parentff4680922fc4f1295081da45173e9a71d141a045 (diff)
downloadffmpeg-c7c71f95f8d3e98babf8b6b7f1edc49f14e2c4c4.zip
ffmpeg-c7c71f95f8d3e98babf8b6b7f1edc49f14e2c4c4.tar.gz
ffmpeg-c7c71f95f8d3e98babf8b6b7f1edc49f14e2c4c4.tar.bz2
replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavcodec/dpxenc.c6
-rw-r--r--libavcodec/imgconvert.c4
-rw-r--r--libavcodec/utils.c2
-rw-r--r--libavdevice/lavfi.c4
-rw-r--r--libavfilter/drawutils.c6
-rw-r--r--libavfilter/formats.c4
-rw-r--r--libavfilter/vf_extractplanes.c12
-rw-r--r--libavfilter/vf_fade.c2
-rw-r--r--libavfilter/vf_hflip.c6
-rw-r--r--libavfilter/vf_il.c4
-rw-r--r--libavfilter/vf_kerndeint.c2
-rw-r--r--libavfilter/vf_noise.c2
-rw-r--r--libavfilter/vf_swapuv.c2
-rw-r--r--libavfilter/vf_telecine.c2
-rw-r--r--libavfilter/vf_transpose.c6
-rw-r--r--libavformat/img2enc.c2
-rw-r--r--libavutil/imgutils.c6
-rw-r--r--libavutil/pixdesc.c64
-rw-r--r--libswscale/output.c2
-rw-r--r--libswscale/swscale.c4
-rw-r--r--libswscale/swscale_internal.h2
-rw-r--r--tools/fourcc2pixfmt.c2
22 files changed, 73 insertions, 73 deletions
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 305393f..aaaa15b 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -37,10 +37,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
DPXContext *s = avctx->priv_data;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
- s->big_endian = !!(desc->flags & PIX_FMT_BE);
+ s->big_endian = !!(desc->flags & AV_PIX_FMT_FLAG_BE);
s->bits_per_component = desc->comp[0].depth_minus1 + 1;
- s->descriptor = (desc->flags & PIX_FMT_ALPHA) ? 51 : 50;
- s->planar = !!(desc->flags & PIX_FMT_PLANAR);
+ s->descriptor = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) ? 51 : 50;
+ s->planar = !!(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
switch (avctx->pix_fmt) {
case AV_PIX_FMT_GBRP10BE:
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 6312ec9..e872035 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -59,7 +59,7 @@
#endif
#define pixdesc_has_alpha(pixdesc) \
- ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & PIX_FMT_PAL)
+ ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
@@ -654,7 +654,7 @@ int main(void){
skip = 0;
}
av_log(NULL, AV_LOG_INFO, "pix fmt %s yuv_plan:%d avg_bpp:%d colortype:%d\n", desc->name, is_yuv_planar(desc), av_get_padded_bits_per_pixel(desc), get_color_type(desc));
- if ((!(desc->flags & PIX_FMT_ALPHA)) != (desc->nb_components != 2 && desc->nb_components != 4)) {
+ if ((!(desc->flags & AV_PIX_FMT_FLAG_ALPHA)) != (desc->nb_components != 2 && desc->nb_components != 4)) {
av_log(NULL, AV_LOG_ERROR, "Alpha flag mismatch\n");
err = 1;
}
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 0f6496d..573bba6 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -568,7 +568,7 @@ void avpriv_color_frame(AVFrame *frame, const int c[4])
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
int p, y, x;
- av_assert0(desc->flags & PIX_FMT_PLANAR);
+ av_assert0(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
for (p = 0; p<desc->nb_components; p++) {
uint8_t *dst = frame->data[p];
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index c1c9cf5..bcfba8b 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -60,7 +60,7 @@ static int *create_all_formats(int n)
for (i = 0; i < n; i++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
- if (!(desc->flags & PIX_FMT_HWACCEL))
+ if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
count++;
}
@@ -68,7 +68,7 @@ static int *create_all_formats(int n)
return NULL;
for (j = 0, i = 0; i < n; i++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
- if (!(desc->flags & PIX_FMT_HWACCEL))
+ if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
fmts[j++] = i;
}
fmts[j] = -1;
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 69946f9..272d9df 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -151,7 +151,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
if (!desc->name)
return AVERROR(EINVAL);
- if (desc->flags & ~(PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_PSEUDOPAL | PIX_FMT_ALPHA))
+ if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA))
return AVERROR(ENOSYS);
for (i = 0; i < desc->nb_components; i++) {
c = &desc->comp[i];
@@ -176,7 +176,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
draw->format = format;
draw->nb_planes = nb_planes;
memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep));
- if (nb_planes >= 3 && !(desc->flags & PIX_FMT_RGB)) {
+ if (nb_planes >= 3 && !(desc->flags & AV_PIX_FMT_FLAG_RGB)) {
draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;
draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
}
@@ -193,7 +193,7 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4
if (rgba != color->rgba)
memcpy(color->rgba, rgba, sizeof(color->rgba));
- if ((draw->desc->flags & PIX_FMT_RGB) && draw->nb_planes == 1 &&
+ if ((draw->desc->flags & AV_PIX_FMT_FLAG_RGB) && draw->nb_planes == 1 &&
ff_fill_rgba_map(rgba_map, draw->format) >= 0) {
for (i = 0; i < 4; i++)
color->comp[0].u8[rgba_map[i]] = rgba[i];
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index ebb5588..016aecd 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -112,10 +112,10 @@ AVFilterFormats *ff_merge_formats(AVFilterFormats *a, AVFilterFormats *b,
for (j = 0; j < b->format_count; j++) {
const AVPixFmtDescriptor *adesc = av_pix_fmt_desc_get(a->formats[i]);
const AVPixFmtDescriptor *bdesc = av_pix_fmt_desc_get(b->formats[j]);
- alpha2 |= adesc->flags & bdesc->flags & PIX_FMT_ALPHA;
+ alpha2 |= adesc->flags & bdesc->flags & AV_PIX_FMT_FLAG_ALPHA;
chroma2|= adesc->nb_components > 1 && bdesc->nb_components > 1;
if (a->formats[i] == b->formats[j]) {
- alpha1 |= adesc->flags & PIX_FMT_ALPHA;
+ alpha1 |= adesc->flags & AV_PIX_FMT_FLAG_ALPHA;
chroma1|= adesc->nb_components > 1;
}
}
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index 9844ed5..3c629d7 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -110,11 +110,11 @@ static int query_formats(AVFilterContext *ctx)
avff = ctx->inputs[0]->in_formats;
desc = av_pix_fmt_desc_get(avff->formats[0]);
depth = desc->comp[0].depth_minus1;
- be = desc->flags & PIX_FMT_BE;
+ be = desc->flags & AV_PIX_FMT_FLAG_BE;
for (i = 1; i < avff->format_count; i++) {
desc = av_pix_fmt_desc_get(avff->formats[i]);
if (depth != desc->comp[0].depth_minus1 ||
- be != (desc->flags & PIX_FMT_BE)) {
+ be != (desc->flags & AV_PIX_FMT_FLAG_BE)) {
return AVERROR(EAGAIN);
}
}
@@ -139,10 +139,10 @@ static int config_input(AVFilterLink *inlink)
int plane_avail, ret, i;
uint8_t rgba_map[4];
- plane_avail = ((desc->flags & PIX_FMT_RGB) ? PLANE_R|PLANE_G|PLANE_B :
+ plane_avail = ((desc->flags & AV_PIX_FMT_FLAG_RGB) ? PLANE_R|PLANE_G|PLANE_B :
PLANE_Y |
((desc->nb_components > 2) ? PLANE_U|PLANE_V : 0)) |
- ((desc->flags & PIX_FMT_ALPHA) ? PLANE_A : 0);
+ ((desc->flags & AV_PIX_FMT_FLAG_ALPHA) ? PLANE_A : 0);
if (e->requested_planes & ~plane_avail) {
av_log(ctx, AV_LOG_ERROR, "Requested planes not available.\n");
return AVERROR(EINVAL);
@@ -152,8 +152,8 @@ static int config_input(AVFilterLink *inlink)
e->depth = (desc->comp[0].depth_minus1 + 1) >> 3;
e->step = av_get_padded_bits_per_pixel(desc) >> 3;
- e->is_packed_rgb = !(desc->flags & PIX_FMT_PLANAR);
- if (desc->flags & PIX_FMT_RGB) {
+ e->is_packed_rgb = !(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
+ if (desc->flags & AV_PIX_FMT_FLAG_RGB) {
ff_fill_rgba_map(rgba_map, inlink->format);
for (i = 0; i < 4; i++)
e->map[i] = rgba_map[e->map[i]];
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 4f7039e..96f0408 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -127,7 +127,7 @@ static int config_props(AVFilterLink *inlink)
fade->vsub = pixdesc->log2_chroma_h;
fade->bpp = av_get_bits_per_pixel(pixdesc) >> 3;
- fade->alpha &= pixdesc->flags & PIX_FMT_ALPHA;
+ fade->alpha &= pixdesc->flags & AV_PIX_FMT_FLAG_ALPHA;
fade->is_packed_rgb = ff_fill_rgba_map(fade->rgba_map, inlink->format) >= 0;
/* use CCIR601/709 black level for studio-level pixel non-alpha components */
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 0250b43..0ee6589 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -47,8 +47,8 @@ static int query_formats(AVFilterContext *ctx)
for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(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->log2_chroma_w != desc->log2_chroma_h &&
desc->comp[0].plane == desc->comp[1].plane)))
ff_add_format(&pix_fmts, fmt);
@@ -87,7 +87,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
/* copy palette if required */
- if (av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_PAL)
+ if (av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_PAL)
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
for (plane = 0; plane < 4 && in->data[plane]; plane++) {
diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c
index 783b91a..c2ed6ab 100644
--- a/libavfilter/vf_il.c
+++ b/libavfilter/vf_il.c
@@ -88,7 +88,7 @@ static int query_formats(AVFilterContext *ctx)
for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
- if (!(desc->flags & PIX_FMT_PAL) && !(desc->flags & PIX_FMT_HWACCEL))
+ if (!(desc->flags & AV_PIX_FMT_FLAG_PAL) && !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
ff_add_format(&formats, fmt);
}
@@ -106,7 +106,7 @@ static int config_input(AVFilterLink *inlink)
il->nb_planes = FFMAX(il->nb_planes, desc->comp[i].plane);
il->nb_planes++;
- il->has_alpha = !!(desc->flags & PIX_FMT_ALPHA);
+ il->has_alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA);
if ((ret = av_image_fill_linesizes(il->linesize, inlink->format, inlink->w)) < 0)
return ret;
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
index 431a0a9..5f99d88 100644
--- a/libavfilter/vf_kerndeint.c
+++ b/libavfilter/vf_kerndeint.c
@@ -89,7 +89,7 @@ static int config_props(AVFilterLink *inlink)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
int ret;
- kerndeint->is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_RGB;
+ kerndeint->is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_RGB;
kerndeint->vsub = desc->log2_chroma_h;
ret = av_image_alloc(kerndeint->tmp_data, kerndeint->tmp_linesize,
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 1651071..15f5fcf 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -172,7 +172,7 @@ static int query_formats(AVFilterContext *ctx)
for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
- if (desc->flags & PIX_FMT_PLANAR && !((desc->comp[0].depth_minus1 + 1) & 7))
+ if (desc->flags & AV_PIX_FMT_FLAG_PLANAR && !((desc->comp[0].depth_minus1 + 1) & 7))
ff_add_format(&formats, fmt);
}
diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index 2ca97f9..daa73f2 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -54,7 +54,7 @@ static int is_planar_yuv(const AVPixFmtDescriptor *desc)
{
int i;
- if (desc->flags & ~(PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_ALPHA) ||
+ if (desc->flags & ~(AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA) ||
desc->nb_components < 3 ||
(desc->comp[1].depth_minus1 != desc->comp[2].depth_minus1))
return 0;
diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c
index ba47da1..6e14548 100644
--- a/libavfilter/vf_telecine.c
+++ b/libavfilter/vf_telecine.c
@@ -103,7 +103,7 @@ static int query_formats(AVFilterContext *ctx)
for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
- if (!(desc->flags & PIX_FMT_HWACCEL))
+ if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
ff_add_format(&pix_fmts, fmt);
}
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index c949e07..3ee9c6d 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -67,9 +67,9 @@ static int query_formats(AVFilterContext *ctx)
for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
- if (!(desc->flags & PIX_FMT_PAL ||
- desc->flags & PIX_FMT_HWACCEL ||
- desc->flags & PIX_FMT_BITSTREAM ||
+ if (!(desc->flags & AV_PIX_FMT_FLAG_PAL ||
+ desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
+ desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ||
desc->log2_chroma_w != desc->log2_chroma_h))
ff_add_format(&pix_fmts, fmt);
}
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index a2b61d7..551d880 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -60,7 +60,7 @@ static int write_header(AVFormatContext *s)
&& s->nb_streams == 1
&& st->codec->codec_id == AV_CODEC_ID_RAWVIDEO
&& desc
- &&(desc->flags & PIX_FMT_PLANAR)
+ &&(desc->flags & AV_PIX_FMT_FLAG_PLANAR)
&& desc->nb_components >= 3;
return 0;
}
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index d370a60..d8a579f 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -76,7 +76,7 @@ int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane)
int max_step [4]; /* max pixel step for each plane */
int max_step_comp[4]; /* the component for each plane which has the max pixel step */
- if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL)
+ if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
return AVERROR(EINVAL);
av_image_fill_max_pixsteps(max_step, max_step_comp, desc);
@@ -324,7 +324,7 @@ int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height,
return AVERROR(EINVAL);
if (av_image_check_size(width, height, 0, NULL) < 0)
return AVERROR(EINVAL);
- 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 av_image_fill_arrays(data, linesize, NULL, pix_fmt, width, height, align);
@@ -358,7 +358,7 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
}
}
- if (desc->flags & PIX_FMT_PAL) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
uint32_t *d32 = (uint32_t *)(((size_t)dst + 3) & ~3);
for (i = 0; i<256; i++)
AV_WL32(d32 + i, AV_RN32(src_data[1] + 4*i));
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 59cbddf..8ec6c53 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -233,7 +233,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.comp = {
{ 0, 0, 1, 0, 7 }, /* Y */
},
- .flags = PIX_FMT_PSEUDOPAL,
+ .flags = AV_PIX_FMT_FLAG_PSEUDOPAL,
},
[AV_PIX_FMT_MONOWHITE] = {
.name = "monow",
@@ -489,7 +489,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,
+ .flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_RGB0] = {
.name = "rgb0",
@@ -501,7 +501,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 2, 0, 7 }, /* G */
{ 0, 3, 3, 0, 7 }, /* B */
},
- .flags = PIX_FMT_RGB,
+ .flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_0BGR] = {
.name = "0bgr",
@@ -513,7 +513,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 3, 0, 7 }, /* G */
{ 0, 3, 2, 0, 7 }, /* B */
},
- .flags = PIX_FMT_RGB,
+ .flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_BGR0] = {
.name = "bgr0",
@@ -525,7 +525,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 3, 2, 0, 7 }, /* G */
{ 0, 3, 1, 0, 7 }, /* B */
},
- .flags = PIX_FMT_RGB,
+ .flags = AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GRAY16BE] = {
.name = "gray16be",
@@ -914,7 +914,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 7, 5, 0, 15 }, /* B */
{ 0, 7, 7, 0, 15 }, /* A */
},
- .flags = PIX_FMT_RGB | PIX_FMT_BE | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_RGBA64LE] = {
.name = "rgba64le",
@@ -927,7 +927,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 7, 5, 0, 15 }, /* B */
{ 0, 7, 7, 0, 15 }, /* A */
},
- .flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_RGB565BE] = {
.name = "rgb565be",
@@ -1036,7 +1036,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 7, 1, 0, 15 }, /* B */
{ 0, 7, 7, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_RGB | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_BGRA64LE] = {
.name = "bgra64le",
@@ -1049,7 +1049,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 7, 1, 0, 15 }, /* B */
{ 0, 7, 7, 0, 15 }, /* A */
},
- .flags = PIX_FMT_RGB | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_BGR565BE] = {
.name = "bgr565be",
@@ -1199,7 +1199,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 11 }, /* U */
{ 2, 1, 1, 0, 11 }, /* V */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P12BE] = {
.name = "yuv420p12be",
@@ -1211,7 +1211,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 11 }, /* U */
{ 2, 1, 1, 0, 11 }, /* V */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P14LE] = {
.name = "yuv420p14le",
@@ -1223,7 +1223,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 13 }, /* U */
{ 2, 1, 1, 0, 13 }, /* V */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P14BE] = {
.name = "yuv420p14be",
@@ -1235,7 +1235,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 13 }, /* U */
{ 2, 1, 1, 0, 13 }, /* V */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV420P16LE] = {
.name = "yuv420p16le",
@@ -1319,7 +1319,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 11 }, /* U */
{ 2, 1, 1, 0, 11 }, /* V */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P12BE] = {
.name = "yuv422p12be",
@@ -1331,7 +1331,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 11 }, /* U */
{ 2, 1, 1, 0, 11 }, /* V */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P14LE] = {
.name = "yuv422p14le",
@@ -1343,7 +1343,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 13 }, /* U */
{ 2, 1, 1, 0, 13 }, /* V */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P14BE] = {
.name = "yuv422p14be",
@@ -1355,7 +1355,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 13 }, /* U */
{ 2, 1, 1, 0, 13 }, /* V */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV422P16LE] = {
.name = "yuv422p16le",
@@ -1463,7 +1463,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 11 }, /* U */
{ 2, 1, 1, 0, 11 }, /* V */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P12BE] = {
.name = "yuv444p12be",
@@ -1475,7 +1475,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 11 }, /* U */
{ 2, 1, 1, 0, 11 }, /* V */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P14LE] = {
.name = "yuv444p14le",
@@ -1487,7 +1487,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 13 }, /* U */
{ 2, 1, 1, 0, 13 }, /* V */
},
- .flags = PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_YUV444P14BE] = {
.name = "yuv444p14be",
@@ -1499,7 +1499,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 13 }, /* U */
{ 2, 1, 1, 0, 13 }, /* V */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR,
},
[AV_PIX_FMT_DXVA2_VLD] = {
.name = "dxva2_vld",
@@ -1511,7 +1511,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.name = "vda_vld",
.log2_chroma_w = 1,
.log2_chroma_h = 1,
- .flags = PIX_FMT_HWACCEL,
+ .flags = AV_PIX_FMT_FLAG_HWACCEL,
},
[AV_PIX_FMT_GRAY8A] = {
.name = "gray8a",
@@ -1580,7 +1580,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_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_GBRP12LE] = {
.name = "gbrp12le",
@@ -1592,7 +1592,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 11 }, /* G */
{ 1, 1, 1, 0, 11 }, /* B */
},
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB,
+ .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP12BE] = {
.name = "gbrp12be",
@@ -1604,7 +1604,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 0, 1, 1, 0, 11 }, /* G */
{ 1, 1, 1, 0, 11 }, /* 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_GBRP14LE] = {
.name = "gbrp14le",
@@ -1616,7 +1616,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_PLANAR | PIX_FMT_RGB,
+ .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB,
},
[AV_PIX_FMT_GBRP14BE] = {
.name = "gbrp14be",
@@ -1665,7 +1665,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 0, 1, 0, 7 }, /* B */
{ 3, 0, 1, 0, 7 }, /* A */
},
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_GBRAP16LE] = {
.name = "gbrap16le",
@@ -1678,7 +1678,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* B */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_GBRAP16BE] = {
.name = "gbrap16be",
@@ -1691,7 +1691,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
{ 1, 1, 1, 0, 15 }, /* B */
{ 3, 1, 1, 0, 15 }, /* A */
},
- .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB | PIX_FMT_ALPHA,
+ .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
},
[AV_PIX_FMT_VDPAU] = {
.name = "vdpau",
@@ -1795,7 +1795,7 @@ int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
for (c = 0; c < 4; c++)
bits += steps[c];
- if(!(pixdesc->flags & PIX_FMT_BITSTREAM))
+ if(!(pixdesc->flags & AV_PIX_FMT_FLAG_BITSTREAM))
bits *= 8;
return bits >> log2_pixels;
@@ -1887,7 +1887,7 @@ void ff_check_pixfmt_descriptors(void){
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 & PIX_FMT_ALPHA));
+ 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++) {
@@ -1896,7 +1896,7 @@ void ff_check_pixfmt_descriptors(void){
av_assert0(!c->plane && !c->step_minus1 && !c->offset_plus1 && !c->shift && !c->depth_minus1);
continue;
}
- if (d->flags & PIX_FMT_BITSTREAM) {
+ if (d->flags & AV_PIX_FMT_FLAG_BITSTREAM) {
av_assert0(c->step_minus1 >= c->depth_minus1);
} else {
av_assert0(8*(c->step_minus1+1) >= c->depth_minus1+1);
diff --git a/libswscale/output.c b/libswscale/output.c
index 88c445f..9c7284b 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1717,7 +1717,7 @@ yuv2gbrp_full_X_c(SwsContext *c, const int16_t *lumFilter,
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
int i;
- int hasAlpha = (desc->flags & PIX_FMT_ALPHA) && alpSrc;
+ int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrc;
uint16_t **dest16 = (uint16_t**)dest;
int SH = 22 + 7 - desc->comp[0].depth_minus1;
int A = 0; // init to silence warning
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 7bef0c8..c5bba82 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -804,7 +804,7 @@ static void xyz12Torgb48(struct SwsContext *c, uint16_t *dst,
for (xp=0; xp+2<stride; xp+=3) {
int x, y, z, r, g, b;
- if (desc->flags & PIX_FMT_BE) {
+ if (desc->flags & AV_PIX_FMT_FLAG_BE) {
x = AV_RB16(src + xp + 0);
y = AV_RB16(src + xp + 1);
z = AV_RB16(src + xp + 2);
@@ -835,7 +835,7 @@ static void xyz12Torgb48(struct SwsContext *c, uint16_t *dst,
b = av_clip_c(b,0,4095);
// convert from sRGBlinear to RGB and scale from 12bit to 16bit
- if (desc->flags & PIX_FMT_BE) {
+ if (desc->flags & AV_PIX_FMT_FLAG_BE) {
AV_WB16(dst + xp + 0, c->rgbgamma[r] << 4);
AV_WB16(dst + xp + 1, c->rgbgamma[g] << 4);
AV_WB16(dst + xp + 2, c->rgbgamma[b] << 4);
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 65f9c9b..3d5d2af 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -742,7 +742,7 @@ static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert0(desc);
- return desc->flags & PIX_FMT_ALPHA;
+ return desc->flags & AV_PIX_FMT_FLAG_ALPHA;
}
#if 1
diff --git a/tools/fourcc2pixfmt.c b/tools/fourcc2pixfmt.c
index 77cb0b6..1a653ed 100644
--- a/tools/fourcc2pixfmt.c
+++ b/tools/fourcc2pixfmt.c
@@ -102,7 +102,7 @@ int main(int argc, char **argv)
if (list_pix_fmt_fourccs) {
for (i = 0; i < AV_PIX_FMT_NB; i++) {
const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(i);
- if (!pix_desc->name || pix_desc->flags & PIX_FMT_HWACCEL)
+ if (!pix_desc->name || pix_desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
continue;
printf("%s: ", pix_desc->name);
print_pix_fmt_fourccs(i, ' ');