changeset 28974:341e3ff25281

Use a simpler and more general check for the gray case in the planarCopy function
author sdrik
date Fri, 20 Mar 2009 14:01:51 +0000
parents 9ae8c54007f5
children bab0430f2e59
files libswscale/swscale.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/swscale.c	Thu Mar 19 23:33:35 2009 +0000
+++ b/libswscale/swscale.c	Fri Mar 20 14:01:51 2009 +0000
@@ -1989,11 +1989,8 @@
         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)