X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ftransition_composite.c;h=e7376718ae172c9cf47d65d7cbd7981bf131268d;hb=f5da31bf950521eaef7fc1f7047603e28cbbb377;hp=622ae8fe85546443763735e77f38a015be600b07;hpb=ff9da69f0b59e132d8dd28b796e7dc4e9ec8b1bd;p=melted diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index 622ae8f..e737671 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -546,8 +546,8 @@ static int composite_yuv( uint8_t *p_dest, int width_dest, int height_dest, uint int y = geometry.y * height_dest / geometry.nh; // Align x to a full YUYV group - x &= 0xfffffffe; - width_src &= 0xfffffffe; + x = ( x | 1 ) ^ 1; + width_src = ( width_src | 1 ) ^ 1; // optimization points - no work to do if ( width_src <= 0 || height_src <= 0 ) @@ -573,6 +573,7 @@ static int composite_yuv( uint8_t *p_dest, int width_dest, int height_dest, uint { y_src = -y; height_src -= y_src; + y = 0; } // crop overlay below bottom edge of frame @@ -845,7 +846,7 @@ static int get_b_frame_image( mlt_transition this, mlt_frame b_frame, uint8_t ** *width = geometry->sw * *width / geometry->nw; *height = geometry->sh * *height / geometry->nh; - x &= 0xfffffffe; + x = ( x | 1 ) ^ 1; // optimization points - no work to do if ( *width < 1 || *height < 1 ) @@ -960,8 +961,8 @@ mlt_frame composite_copy_region( mlt_transition this, mlt_frame a_frame, mlt_pos if ( y + h > height ) h = height - y; - x &= 0xfffffffe; - w &= 0xfffffffe; + x = ( x | 1 ) ^ 1; + w = ( w | 1 ) ^ 1; // Now we need to create a new destination image dest = mlt_pool_alloc( w * h * 2 );