Thread: [Mlt-devel] mlt/src/modules/plus filter_sepia.c,1.3,1.4 transition_affine.c,1.20,1.21
Brought to you by:
ddennedy,
lilo_booter
From: Charles Y. <lil...@us...> - 2005-09-15 20:34:55
|
Update of /cvsroot/mlt/mlt/src/modules/plus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8356/src/modules/plus Modified Files: filter_sepia.c transition_affine.c Log Message: src/framework/mlt_frame.c + Removed unecessary even pixel position and width dependency + Rewrote resize methods to accomodate uneven widths src/framework/mlt_frame.h + Correct RGB2YUV - now 2^10 based and range checks removed (not needed) src/framework/mlt_producer.c + Check for unspecified eof property src/modules/avformat/producer_avformat.c + Provide forced aspect ratio property src/modules/core/filter_mirror.c + Correction for uneven width src/modules/core/producer_colour.c + Corrections for aspect ratio (default to 0) and allow override + Corrections for uneven width src/modules/core/transition_composite.c + Corrections for uneven pixel position and width + Removed deprecated operator code src/modules/plus/filter_sepia.c + Corrections for uneven width src/modules/plus/transition_affine.c + Corrections for uneven width src/modules/sdl/consumer_sdl.c + Corrections for uneven width Index: filter_sepia.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/modules/plus/filter_sepia.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- filter_sepia.c 1 Dec 2004 13:37:10 -0000 1.3 +++ filter_sepia.c 15 Sep 2005 20:34:47 -0000 1.4 @@ -38,23 +38,35 @@ int error = mlt_frame_get_image( this, image, format, width, height, 1 ); // Only process if we have no error and a valid colour space - if ( error == 0 && *format == mlt_image_yuv422 ) + if ( error == 0 && *image && *format == mlt_image_yuv422 ) { // We modify the whole image uint8_t *p = *image; - uint8_t *q = *image + *height * *width * 2; + int h = *height; + int uneven = *width % 2; + int w = ( *width - uneven ) / 2; + int t; // Get u and v values int u = mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "u" ); int v = mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "v" ); // Loop through image - while ( p != q ) + while( h -- ) { - p ++; - *p ++ = u; - p ++; - *p ++ = v; + t = w; + while( t -- ) + { + p ++; + *p ++ = u; + p ++; + *p ++ = v; + } + if ( uneven ) + { + p ++; + *p ++ = u; + } } } Index: transition_affine.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/modules/plus/transition_affine.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- transition_affine.c 22 Jun 2005 07:29:27 -0000 1.20 +++ transition_affine.c 15 Sep 2005 20:34:47 -0000 1.21 @@ -473,9 +473,6 @@ get_affine( &affine, this, ( float )position ); - lower_x -= ( lower_x & 1 ); - upper_x -= ( upper_x & 1 ); - q = *image; dz = MapZ( affine.matrix, 0, 0 ); |