summaryrefslogtreecommitdiff
path: root/libswscale/swscale_internal.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-06 16:36:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-08 13:24:52 +0200
commitd0e0757e9a965549a63fa7f6f7c4542883f80d18 (patch)
treeba1a633ea8651ddac9078622c24a5b84dc5fd78c /libswscale/swscale_internal.h
parentc382d9e8cbee7635755a559fcd03834aa3daa3a7 (diff)
swscale: Implement alphablendaway for planar 4:4:4 formats
Fixes Ticket4746 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r--libswscale/swscale_internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index eeeef2d848..01c5ad96ba 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -75,6 +75,12 @@ typedef enum SwsDither {
NB_SWS_DITHER,
} SwsDither;
+typedef enum SwsAlphaBlend {
+ SWS_ALPHA_BLEND_NONE = 0,
+ SWS_ALPHA_BLEND_UNIFORM,
+ SWS_ALPHA_BLEND_NB,
+} SwsAlphaBlend;
+
typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[],
int srcStride[], int srcSliceY, int srcSliceH,
uint8_t *dst[], int dstStride[]);
@@ -611,6 +617,8 @@ typedef struct SwsContext {
int needs_hcscale; ///< Set if there are chroma planes to be converted.
SwsDither dither;
+
+ SwsAlphaBlend alphablend;
} SwsContext;
//FIXME check init (where 0)
@@ -901,6 +909,10 @@ struct SwsContext *sws_alloc_set_opts(int srcW, int srcH, enum AVPixelFormat src
int dstW, int dstH, enum AVPixelFormat dstFormat,
int flags, const double *param);
+int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[],
+ int srcStride[], int srcSliceY, int srcSliceH,
+ uint8_t *dst[], int dstStride[]);
+
static inline void fillPlane16(uint8_t *plane, int stride, int width, int height, int y,
int alpha, int bits, const int big_endian)
{