aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_fade.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-01-18 15:08:50 +0000
committerPaul B Mahol <onemda@gmail.com>2013-01-18 22:51:05 +0000
commitc79be51dfc807e8d17d2b0a28ee6143e18c63749 (patch)
treeafaaaf28a7000c404097a02fe479cc3337cb3b35 /libavfilter/vf_fade.c
parent646ade76793c49317d05d54dc254d28f6738adbd (diff)
downloadffmpeg-c79be51dfc807e8d17d2b0a28ee6143e18c63749.tar.gz
vf_fade: use AVPixFmtDescriptor to find out if pixel format have alpha
Remove alpha_pix_fmts[]. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_fade.c')
-rw-r--r--libavfilter/vf_fade.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index ee3c0c2d34..df222747be 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -138,13 +138,6 @@ const static enum AVPixelFormat studio_level_pix_fmts[] = {
AV_PIX_FMT_NONE
};
-static enum AVPixelFormat alpha_pix_fmts[] = {
- AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
- AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
- AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA,
- AV_PIX_FMT_NONE
-};
-
static int config_props(AVFilterLink *inlink)
{
FadeContext *fade = inlink->dst->priv;
@@ -154,7 +147,7 @@ static int config_props(AVFilterLink *inlink)
fade->vsub = pixdesc->log2_chroma_h;
fade->bpp = av_get_bits_per_pixel(pixdesc) >> 3;
- fade->alpha = fade->alpha ? ff_fmt_is_in(inlink->format, alpha_pix_fmts) : 0;
+ fade->alpha &= pixdesc->flags & PIX_FMT_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 */