summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-15 11:23:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-15 11:23:14 +0200
commitc7c71f95f8d3e98babf8b6b7f1edc49f14e2c4c4 (patch)
treeb734a52c2c51db2b0ccf4b4159abe9865746ceb2 /libavfilter
parentff4680922fc4f1295081da45173e9a71d141a045 (diff)
replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-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
11 files changed, 24 insertions, 24 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 69946f9301..272d9df6bb 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 ebb5588866..016aecd38e 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 9844ed578c..3c629d7a83 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 4f7039e691..96f04080f4 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 0250b438e6..0ee65899a9 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 783b91a97e..c2ed6abc8a 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 431a0a9d43..5f99d88c2b 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 1651071dd5..15f5fcf3cd 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 2ca97f9492..daa73f261e 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 ba47da1377..6e14548ca5 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 c949e07e5c..3ee9c6d0e4 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);
}