[FFmpeg-devel] [PATCH 2/2] pixdesc: clarify AV_PIX_FMT_FLAG_ALPHA doxygen
wm4
nfxjfg at googlemail.com
Mon Feb 9 22:33:54 CET 2015
Some of these things are not documented anywhere, even though all FFmpeg
components seem to handle alpha sufficiently consistently.
---
libavutil/pixdesc.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
index 705377d..9f0f441 100644
--- a/libavutil/pixdesc.h
+++ b/libavutil/pixdesc.h
@@ -139,8 +139,16 @@ 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. 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 support the
+ * alpha-free format variants only, e.g. AV_PIX_FMT_RGB0 instead of
+ * AV_PIX_FMT_RGBA.
*/
#define AV_PIX_FMT_FLAG_ALPHA (1 << 7)
--
2.1.4
More information about the ffmpeg-devel
mailing list