[Mlt-devel] mlt/src/framework mlt_frame.c,1.89,1.90 mlt_tractor.c,1.48,1.49
Brought to you by:
ddennedy,
lilo_booter
From: Charles Y. <lil...@us...> - 2005-10-10 09:28:16
|
Update of /cvsroot/mlt/mlt/src/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28028/src/framework Modified Files: mlt_frame.c mlt_tractor.c Log Message: + Added an option to override alignment and transparent borders for compositing Index: mlt_tractor.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/framework/mlt_tractor.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- mlt_tractor.c 28 Sep 2005 13:56:47 -0000 1.48 +++ mlt_tractor.c 10 Oct 2005 09:28:11 -0000 1.49 @@ -205,6 +205,7 @@ mlt_frame frame = mlt_frame_pop_service( this ); mlt_properties frame_properties = MLT_FRAME_PROPERTIES( frame ); mlt_properties_set( frame_properties, "rescale.interp", mlt_properties_get( properties, "rescale.interp" ) ); + mlt_properties_set_int( frame_properties, "rescale_alpha", mlt_properties_get_int( properties, "resize_alpha" ) ); mlt_properties_set_int( frame_properties, "distort", mlt_properties_get_int( properties, "distort" ) ); mlt_properties_set_double( frame_properties, "consumer_aspect_ratio", mlt_properties_get_double( properties, "consumer_aspect_ratio" ) ); mlt_properties_set_int( frame_properties, "consumer_deinterlace", mlt_properties_get_int( properties, "consumer_deinterlace" ) ); Index: mlt_frame.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/framework/mlt_frame.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- mlt_frame.c 28 Sep 2005 13:56:47 -0000 1.89 +++ mlt_frame.c 10 Oct 2005 09:28:11 -0000 1.90 @@ -638,7 +638,7 @@ return ret; } -uint8_t *mlt_resize_alpha( uint8_t *input, int owidth, int oheight, int iwidth, int iheight ) +uint8_t *mlt_resize_alpha( uint8_t *input, int owidth, int oheight, int iwidth, int iheight, uint8_t alpha_value ) { uint8_t *output = NULL; @@ -650,7 +650,7 @@ int iused = iwidth; output = mlt_pool_alloc( owidth * oheight ); - memset( output, 0, owidth * oheight ); + memset( output, alpha_value, owidth * oheight ); offset_x -= offset_x % 2; @@ -741,6 +741,8 @@ // If width and height are correct, don't do anything if ( iwidth != owidth || iheight != oheight ) { + uint8_t alpha_value = mlt_properties_get_int( properties, "resize_alpha" ); + // Create the output image uint8_t *output = mlt_pool_alloc( owidth * ( oheight + 1 ) * 2 ); @@ -753,7 +755,7 @@ mlt_properties_set_int( properties, "height", oheight ); // We should resize the alpha too - alpha = mlt_resize_alpha( alpha, owidth, oheight, iwidth, iheight ); + alpha = mlt_resize_alpha( alpha, owidth, oheight, iwidth, iheight, alpha_value ); if ( alpha != NULL ) { mlt_properties_set_data( properties, "alpha", alpha, owidth * oheight, ( mlt_destructor )mlt_pool_release, NULL ); |