diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-02-10 12:18:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-10 16:03:04 +0100 |
commit | c247fc63e4dcf49995f5ba14021d0dfea6737b74 (patch) | |
tree | 230381cc11edcb1cb3b21a2c1a05af671f7699b7 /libavutil/pixdesc.h | |
parent | 92e3a6fdac73f7e1d69d69717219a7538877d7a0 (diff) | |
download | ffmpeg-c247fc63e4dcf49995f5ba14021d0dfea6737b74.tar.gz |
pixdesc: clarify AV_PIX_FMT_FLAG_ALPHA doxygen
Also make clear that PAL8 can have alpha.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/pixdesc.h')
-rw-r--r-- | libavutil/pixdesc.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h index c8e32518a8..c4d0548ad6 100644 --- a/libavutil/pixdesc.h +++ b/libavutil/pixdesc.h @@ -139,8 +139,19 @@ typedef struct AVPixFmtDescriptor { * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8 */ #define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6) + /** - * The pixel format has an alpha channel. + * The pixel format has an alpha channel. This is set on all formats that + * support alpha in some way. The exception is AV_PIX_FMT_PAL8, which can + * carry alpha as part of the palette. Details are explained in the + * AVPixelFormat enum, and are also encoded in the corresponding + * AVPixFmtDescriptor. + * + * The alpha is always straight, never pre-multiplied. + * + * If a codec or a filter does not support alpha, it should set all alpha to + * opaque, or use the equivalent pixel formats without alpha component, e.g. + * AV_PIX_FMT_RGB0 (or AV_PIX_FMT_RGB24 etc.) instead of AV_PIX_FMT_RGBA. */ #define AV_PIX_FMT_FLAG_ALPHA (1 << 7) |