cleaning corners of green dirt ;)
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 29 Dec 2002 23:31:52 +0000 (23:31 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 29 Dec 2002 23:31:52 +0000 (23:31 +0000)
Originally committed as revision 8652 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

postproc/postprocess_template.c

index a75c9b4dc895f35eeb30ad1742b147c6f2f7b2ad..f35fbd08215da71596a745907452f74eee535eb9 100644 (file)
@@ -2824,7 +2824,15 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
                        dstBlock+=8;
                        srcBlock+=8;
                }
-               memcpy(dst, tempDst + 9*dstStride, copyAhead*dstStride );
+               if(width==dstStride)
+                       memcpy(dst, tempDst + 9*dstStride, copyAhead*dstStride);
+               else
+               {
+                       for(i=0; i<copyAhead; i++)
+                       {
+                               memcpy(dst + i*dstStride, tempDst + (9+i)*dstStride, width);
+                       }
+               }
        }
 
 //printf("\n");
@@ -3050,7 +3058,15 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
                if(y+15 >= height)
                {
                        uint8_t *dstBlock= &(dst[y*dstStride]);
-                       memcpy(dstBlock, tempDst + dstStride, dstStride*(height-y) );
+                       if(width==dstStride)
+                               memcpy(dstBlock, tempDst + dstStride, dstStride*(height-y));
+                       else
+                       {
+                               for(i=0; i<height-y; i++)
+                               {
+                                       memcpy(dstBlock + i*dstStride, tempDst + (i+1)*dstStride, width);
+                               }
+                       }
                }
 /*
                for(x=0; x<width; x+=32)