Cleanup copyrights and attributions, and move Jean-Baptiste's services to a new kdenl...
[melted] / src / modules / gtk2 / pixops.c
index 9ac77ba..c25e56b 100644 (file)
@@ -1,9 +1,12 @@
 /* GdkPixbuf library - Scaling and compositing functions
  *
- * Copyright (C) 1999 The Free Software Foundation
- *
+ * Original:
+ * Copyright (C) 2000 Red Hat, Inc
  * Author: Owen Taylor <otaylor@redhat.com>
- * Modified for YUV422 by Dan Dennedy <dan@dennedy.org>
+ *
+ * Modification for MLT:
+ * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
+ * Author: Dan Dennedy <dan@dennedy.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -218,23 +221,19 @@ scale_line_22_yuv ( int *weights, int n_x, int n_y,
 
                /* process U/V */
                x_aligned = ( ( x_scaled >> 1 ) << 2 );
-               q0 = src0 + x_aligned;
-               uv_index = ( ( dest_x & 1 ) << 1 );
-               //printf( "scale_line_22_yuv: %d %d\n", x_aligned + uv_index, dest_x );
-               p  = w1 * q0[ uv_index + 1 ];
-               p += w2 * q0[ uv_index + 1 ];
-
-               x += x_step;
-               x_scaled = x >> SCALE_SHIFT;
-               dest_x++;
+               uv_index = ( ( dest_x & 1 ) << 1 ) + 1;
                
-               x_aligned = ( ( x_scaled >> 1 ) << 2 );
+               q0 = src0 + x_aligned;
                q1 = src1 + x_aligned;
-               uv_index = ( ( dest_x & 1 ) << 1 ) + 1;
+               p  = w1 * q0[ uv_index ];
                p += w3 * q1[ uv_index ];
+               p += w2 * q0[ uv_index ];
                p += w4 * q1[ uv_index ];
-               *dest++ = ( p + 0x8000 ) >> SCALE_SHIFT;
+               
+               x += x_step;
+               dest_x ++;
 
+               *dest++ = ( p + 0x8000 ) >> SCALE_SHIFT;
        }
 
        return dest;