summaryrefslogtreecommitdiff
path: root/libavfilter/drawutils.h
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-09-14 01:37:13 +0200
committerPaul B Mahol <onemda@gmail.com>2016-09-21 11:54:00 +0200
commit9d16e46d9eb4643ce119e26ed5c3975cb6cb7aa1 (patch)
tree3fb3c3ac0e88713266d9b655c25e9282f8b283aa /libavfilter/drawutils.h
parent6419b4c0cb154932b96c140bdf2a9c4eefddcbed (diff)
downloadffmpeg-9d16e46d9eb4643ce119e26ed5c3975cb6cb7aa1.tar.gz
avfilter/drawutils: allow drawing opaque text on transparent background
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/drawutils.h')
-rw-r--r--libavfilter/drawutils.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavfilter/drawutils.h b/libavfilter/drawutils.h
index 1fb3e4f256..cf53635456 100644
--- a/libavfilter/drawutils.h
+++ b/libavfilter/drawutils.h
@@ -55,6 +55,7 @@ typedef struct FFDrawContext {
uint8_t vsub[MAX_PLANES]; /*< vertical subsampling */
uint8_t hsub_max;
uint8_t vsub_max;
+ unsigned flags;
} FFDrawContext;
typedef struct FFDrawColor {
@@ -67,11 +68,16 @@ typedef struct FFDrawColor {
} FFDrawColor;
/**
+ * Process alpha pixel component.
+ */
+#define FF_DRAW_PROCESS_ALPHA 1
+
+/**
* Init a draw context.
*
* Only a limited number of pixel formats are supported, if format is not
* supported the function will return an error.
- * No flags currently defined.
+ * flags is combination of FF_DRAW_* flags.
* @return 0 for success, < 0 for error
*/
int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags);