From d0e0757e9a965549a63fa7f6f7c4542883f80d18 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 6 Aug 2015 16:36:05 +0200 Subject: swscale: Implement alphablendaway for planar 4:4:4 formats Fixes Ticket4746 Signed-off-by: Michael Niedermayer --- libswscale/swscale_internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libswscale/swscale_internal.h') 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) { -- cgit v1.2.3