# HG changeset patch # User sdrik # Date 1237319616 0 # Node ID 788a99558cf27fd10c68c1b30c11b58b82a8adfe # Parent 15d4b1684953079ed30209df044dd32eec527ade Add a fillPlane function to fill a plane with one constant value diff -r 15d4b1684953 -r 788a99558cf2 libswscale/swscale.c --- a/libswscale/swscale.c Tue Mar 17 19:51:52 2009 +0000 +++ b/libswscale/swscale.c Tue Mar 17 19:53:36 2009 +0000 @@ -953,6 +953,15 @@ } } +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 {