X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ftransition_composite.c;fp=src%2Fmodules%2Fcore%2Ftransition_composite.c;h=3930ecd83b871f6b87603200f906bdb413b72a7b;hb=1f47e5f4e04fb5c415bf5630c4e85a52b7b8b5da;hp=fdd184deed4150878c5c2f09ec25369db81ea200;hpb=29bc1b715ce20f8202c60740707c39fd723c1c50;p=melted diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index fdd184d..3930ecd 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -555,13 +555,13 @@ static int composite_yuv( uint8_t *p_dest, int width_dest, int height_dest, uint int alpha_b_stride = stride_src / bpp; int alpha_a_stride = stride_dest / bpp; - // Snap to even columns to prevent "chroma swap" - p_src += uneven_x_src * 2; - width_src -= 2 * uneven_x_src; - alpha_b += uneven_x_src; - p_dest += uneven_x * 2; - width_src -= 2 * uneven_x; - alpha_a += uneven_x; + // Align chroma of source and destination + if ( uneven_x != uneven_x_src ) + { + p_src += 2; + width_src -= 2; + alpha_b += 1; + } // now do the compositing only to cropped extents for ( i = 0; i < height_src; i += step ) @@ -880,8 +880,8 @@ static void crop_calculate( mlt_transition this, mlt_properties properties, stru // Compute the pan struct mlt_geometry_item_s crop_item; mlt_geometry_fetch( crop, &crop_item, position ); - result->x_src = crop_item.x; - result->y_src = crop_item.y; + result->x_src = rint( crop_item.x ); + result->y_src = rint( crop_item.y ); } }