]> git.sesse.net Git - mlt/commitdiff
Colour space conversion with gdkpixbuf scaling
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 19 Aug 2004 20:38:29 +0000 (20:38 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 19 Aug 2004 20:38:29 +0000 (20:38 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@379 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/core/filter_rescale.c
src/modules/gtk2/factory.c

index a028f6cc6ba7560b3dd744981ed1adf5846632d1..dfbec8fb7b8917eb59d5ccfb912a6eceaad77e29 100644 (file)
@@ -140,6 +140,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                int owidth = *width;
                int oheight = *height;
                char *interps = mlt_properties_get( properties, "rescale.interp" );
+               int wanted_format = *format;
 
                // Default from the scaler if not specifed on the frame
                if ( interps == NULL )
@@ -189,6 +190,15 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                                *width = owidth;
                                *height = oheight;
                        }
+                       else if ( *format == mlt_image_rgb24 && wanted_format == mlt_image_rgb24 )
+                       {
+                               // Call the local scaler
+                               scaler_method( this, image, *format, mlt_image_rgb24, iwidth, iheight, owidth, oheight );
+
+                               // Return the output
+                               *width = owidth;
+                               *height = oheight;
+                       }
                        else if ( *format == mlt_image_rgb24 || *format == mlt_image_rgb24a )
                        {
                                // Call the local scaler
index d846e64160e02c39884ab9ec50a1dfa3715f448d..554a6004302199ae303f1351f00461a6da6806e7 100644 (file)
@@ -26,6 +26,7 @@
 
 void *mlt_create_producer( char *id, void *arg )
 {
+       g_type_init( );
        if ( !strcmp( id, "pixbuf" ) )
                return producer_pixbuf_init( arg );
        else if ( !strcmp( id, "pango" ) )
@@ -35,6 +36,7 @@ void *mlt_create_producer( char *id, void *arg )
 
 void *mlt_create_filter( char *id, void *arg )
 {
+       g_type_init( );
        if ( !strcmp( id, "gtkrescale" ) )
                return filter_rescale_init( arg );
        return NULL;