From 0ddee949daa642b8d3dfdfb147f57a949bcaccb6 Mon Sep 17 00:00:00 2001 From: sdrik Date: Tue, 17 Mar 2009 19:53:36 +0000 Subject: Add a fillPlane function to fill a plane with one constant value git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28986 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'libswscale/swscale.c') diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 8728e2bb6c..391a39f667 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -953,6 +953,15 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t * } } +static void fillPlane(uint8_t* plane, int stride, int width, int height, int y, uint8_t val){ + int i; + uint8_t *ptr = plane + stride*y; + for (i=0; isrcFormat) || isGray(c->dstFormat)) && plane>0) { - if (!isGray(c->dstFormat)){ - int i; - uint8_t *ptr = dst[plane] + dstStride[plane]*y; - for (i=0; idstFormat)) + fillPlane(dst[plane], dstStride[plane], length, height, y, 128); } else { -- cgit v1.2.3