diff options
author | Cédric Schieli <cschieli@gmail.com> | 2009-03-20 14:01:51 +0000 |
---|---|---|
committer | Cédric Schieli <cschieli@gmail.com> | 2009-03-20 14:01:51 +0000 |
commit | f6cf4ed08a6717504ab172f940068a4ba64f2f0f (patch) | |
tree | dde52978605289f7654e76f05dfc081d1059b399 /libswscale | |
parent | 9731e7f13e1fa043b5918a7be6273df0f20b1568 (diff) | |
download | ffmpeg-f6cf4ed08a6717504ab172f940068a4ba64f2f0f.tar.gz |
Use a simpler and more general check for the gray case in the planarCopy function
Originally committed as revision 29009 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 9a74f95f86..17fe3c6fa7 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1989,11 +1989,8 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli int y= plane==0 ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample); int height= plane==0 ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample); - if ((isGray(c->srcFormat) || isGray(c->dstFormat)) && plane>0) - { - if (!isGray(c->dstFormat)) + if (dst[plane] && !src[plane]) fillPlane(dst[plane], dstStride[plane], length, height, y, 128); - } else { if (dstStride[plane]==srcStride[plane] && srcStride[plane] > 0) |