/* 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
/* 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;