X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fgtk2%2Fpixops.c;h=a835f704eabfaf1ac80571b1670482a317cd2127;hb=42e3082637998150a8dc0251c5b846f78e1d4772;hp=9ac77ba39cbc9c53191d5d6fa7437ea2eb6e6032;hpb=7377df6338b43516dc92d9fecec3469f774c2222;p=melted diff --git a/src/modules/gtk2/pixops.c b/src/modules/gtk2/pixops.c index 9ac77ba..a835f70 100644 --- a/src/modules/gtk2/pixops.c +++ b/src/modules/gtk2/pixops.c @@ -218,23 +218,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;