From: j-b-m Date: Thu, 26 Oct 2006 09:05:48 +0000 (+0000) Subject: Fix rescaling of rgb images when not using gtk2 X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=0613834daf55868e80bf7655ad4012e29ebcf4dd;p=melted Fix rescaling of rgb images when not using gtk2 git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@935 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/core/filter_rescale.c b/src/modules/core/filter_rescale.c index 19b087f..b26047c 100644 --- a/src/modules/core/filter_rescale.c +++ b/src/modules/core/filter_rescale.c @@ -62,21 +62,21 @@ static int filter_scale( mlt_frame this, uint8_t **image, mlt_image_format iform uint8_t *alpha = mlt_pool_alloc( iwidth * ( iheight + 1 ) ); // Convert the image and extract alpha - mlt_convert_rgb24a_to_yuv422( *image, iwidth, iheight, iwidth * 2, output, alpha ); + mlt_convert_rgb24a_to_yuv422( *image, iwidth, iheight, iwidth * 4, output, alpha ); mlt_properties_set_data( properties, "alpha", alpha, iwidth * ( iheight + 1 ), ( mlt_destructor )mlt_pool_release, NULL ); } else { // No alpha to extract - mlt_convert_rgb24_to_yuv422( *image, iwidth, iheight, iwidth * 2, output ); + mlt_convert_rgb24_to_yuv422( *image, iwidth, iheight, iwidth * 3, output ); } + mlt_properties_set_data( properties, "image", output, iwidth * ( iheight + 1 ) * 2, ( mlt_destructor )mlt_pool_release, NULL ); + // Scale the frame - mlt_frame_rescale_yuv422( this, owidth, oheight ); - - // Return the output - *image = mlt_properties_get_data( properties, "image", NULL ); + output = mlt_frame_rescale_yuv422( this, owidth, oheight ); + } else {