Thread: [Mlt-devel] SF.net SVN: mlt: [1004] trunk/mlt/src/modules/gtk2/producer_pixbuf.c
Brought to you by:
ddennedy,
lilo_booter
From: <j-...@us...> - 2007-07-01 11:55:57
|
Revision: 1004 http://mlt.svn.sourceforge.net/mlt/?rev=1004&view=rev Author: j-b-m Date: 2007-07-01 04:55:54 -0700 (Sun, 01 Jul 2007) Log Message: ----------- Fix for rgba images (based on the code from qimage_producer) Modified Paths: -------------- trunk/mlt/src/modules/gtk2/producer_pixbuf.c Modified: trunk/mlt/src/modules/gtk2/producer_pixbuf.c =================================================================== --- trunk/mlt/src/modules/gtk2/producer_pixbuf.c 2007-07-01 11:09:16 UTC (rev 1003) +++ trunk/mlt/src/modules/gtk2/producer_pixbuf.c 2007-07-01 11:55:54 UTC (rev 1004) @@ -298,24 +298,45 @@ // The fault is not in the design of mlt, but in the implementation of the pixbuf producer... if ( *buffer != NULL ) { - // Clone the image and the alpha - uint8_t *image_copy = mlt_pool_alloc( image_size ); - uint8_t *alpha_copy = mlt_pool_alloc( alpha_size ); + if ( *format == mlt_image_yuv422 || *format == mlt_image_yuv420p ) + { + // Clone the image and the alpha + uint8_t *image_copy = mlt_pool_alloc( image_size ); + uint8_t *alpha_copy = mlt_pool_alloc( alpha_size ); - memcpy( image_copy, *buffer, image_size ); + memcpy( image_copy, *buffer, image_size ); - // Copy or default the alpha - if ( alpha != NULL ) - memcpy( alpha_copy, alpha, alpha_size ); - else - memset( alpha_copy, 255, alpha_size ); + // Copy or default the alpha + if ( alpha != NULL ) + memcpy( alpha_copy, alpha, alpha_size ); + else + memset( alpha_copy, 255, alpha_size ); - // Now update properties so we free the copy after - mlt_properties_set_data( properties, "image", image_copy, image_size, mlt_pool_release, NULL ); - mlt_properties_set_data( properties, "alpha", alpha_copy, alpha_size, mlt_pool_release, NULL ); + // Now update properties so we free the copy after + mlt_properties_set_data( properties, "image", image_copy, image_size, mlt_pool_release, NULL ); + mlt_properties_set_data( properties, "alpha", alpha_copy, alpha_size, mlt_pool_release, NULL ); - // We're going to pass the copy on - *buffer = image_copy; + // We're going to pass the copy on + *buffer = image_copy; + } + else if ( *format == mlt_image_rgb24a ) + { + // Clone the image and the alpha + image_size = *width * ( *height + 1 ) * 4; + alpha_size = *width * ( *height + 1 ); + uint8_t *image_copy = mlt_pool_alloc( image_size ); + uint8_t *alpha_copy = mlt_pool_alloc( alpha_size ); + + mlt_convert_yuv422_to_rgb24a(*buffer, image_copy, (*width)*(*height)); + + // Now update properties so we free the copy after + mlt_properties_set_data( properties, "image", image_copy, image_size, mlt_pool_release, NULL ); + mlt_properties_set_data( properties, "alpha", alpha_copy, alpha_size, mlt_pool_release, NULL ); + + // We're going to pass the copy on + *buffer = image_copy; + } + } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dde...@us...> - 2008-04-11 04:00:35
|
Revision: 1108 http://mlt.svn.sourceforge.net/mlt/?rev=1108&view=rev Author: ddennedy Date: 2008-04-10 21:00:32 -0700 (Thu, 10 Apr 2008) Log Message: ----------- producer_pixbuf.c: bugfix image sequences Modified Paths: -------------- trunk/mlt/src/modules/gtk2/producer_pixbuf.c Modified: trunk/mlt/src/modules/gtk2/producer_pixbuf.c =================================================================== --- trunk/mlt/src/modules/gtk2/producer_pixbuf.c 2008-03-22 15:11:46 UTC (rev 1107) +++ trunk/mlt/src/modules/gtk2/producer_pixbuf.c 2008-04-11 04:00:32 UTC (rev 1108) @@ -417,7 +417,7 @@ if ( stat( full, &buf ) == 0 ) { sprintf( key, "%d", keyvalue ++ ); - mlt_properties_set( this->filenames, "0", full ); + mlt_properties_set( this->filenames, key, full ); gap = 0; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Jean-Michel P. <jm...@po...> - 2008-04-11 07:49:28
|
Le jeudi 10 avril 2008 à 21:00 -0700, dde...@us... a écrit : > producer_pixbuf.c: bugfix image sequences > What is the impact of this change? Kind regards, Jean-Michel |
From: <dde...@us...> - 2008-05-25 01:36:17
|
Revision: 1128 http://mlt.svn.sourceforge.net/mlt/?rev=1128&view=rev Author: ddennedy Date: 2008-05-24 18:36:08 -0700 (Sat, 24 May 2008) Log Message: ----------- producer_pixbuf.c: apply the in point to the position in the image sequence Modified Paths: -------------- trunk/mlt/src/modules/gtk2/producer_pixbuf.c Modified: trunk/mlt/src/modules/gtk2/producer_pixbuf.c =================================================================== --- trunk/mlt/src/modules/gtk2/producer_pixbuf.c 2008-05-15 16:43:23 UTC (rev 1127) +++ trunk/mlt/src/modules/gtk2/producer_pixbuf.c 2008-05-25 01:36:08 UTC (rev 1128) @@ -108,6 +108,7 @@ // Get the original position of this frame mlt_position position = mlt_properties_get_position( properties, "pixbuf_position" ); + position += mlt_producer_get_in( producer ); // Image index int image_idx = ( int )floor( ( double )position / ttl ) % this->count; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |