Sepia fix and affine/alpha clean up
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 20 Jun 2004 11:36:42 +0000 (11:36 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 20 Jun 2004 11:36:42 +0000 (11:36 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@332 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/plus/filter_sepia.c
src/modules/plus/transition_affine.c

index 56fe4ec..0e3b6e9 100644 (file)
@@ -81,8 +81,8 @@ mlt_filter filter_sepia_init( char *arg )
        if ( this != NULL )
        {
                this->process = filter_process;
-               mlt_properties_set( mlt_filter_properties( this ), "u", "50" );
-               mlt_properties_set( mlt_filter_properties( this ), "v", "50" );
+               mlt_properties_set( mlt_filter_properties( this ), "u", "75" );
+               mlt_properties_set( mlt_filter_properties( this ), "v", "150" );
        }
        return this;
 }
index e04f9ff..bd399e7 100644 (file)
@@ -620,14 +620,14 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                                {
                                        if ( alpha == NULL )
                                        {
-                                               dx -= dx & 1;
+                                               dx += dx & 1;
                                                *p ++ = *( b_image + dy * b_stride + ( dx << 1 ) );
                                                *p ++ = *( b_image + dy * b_stride + ( dx << 1 ) + ( ( x & 1 ) << 1 ) + 1 );
                                        }
                                        else
                                        {
-                                               dx -= dx & 1;
                                                mix = ( float )*( alpha + dy * b_width + dx ) / 255.0;
+                                               dx += dx & 1;
                                                *p ++ = *p * ( 1 - mix ) + mix * *( b_image + dy * b_stride + ( dx << 1 ) );
                                                *p ++ = *p * ( 1 - mix ) + mix * *( b_image + dy * b_stride + ( dx << 1 ) + ( ( x & 1 ) << 1 ) + 1 );
                                        }