X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fgtk2%2Fpixops.c;h=c25e56b3abf0f647ec6519e713702de6ac0ee315;hb=b5bf7e90101c8ff6efd2a1e993673e4f56735caf;hp=9ac77ba39cbc9c53191d5d6fa7437ea2eb6e6032;hpb=7377df6338b43516dc92d9fecec3469f774c2222;p=melted diff --git a/src/modules/gtk2/pixops.c b/src/modules/gtk2/pixops.c index 9ac77ba..c25e56b 100644 --- a/src/modules/gtk2/pixops.c +++ b/src/modules/gtk2/pixops.c @@ -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 - * Modified for YUV422 by Dan Dennedy + * + * Modification for MLT: + * Copyright (C) 2003-2004 Ushodaya Enterprises Limited + * Author: Dan Dennedy * * 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;