Cleanup license declarations and remove dv1394d references.
[melted] / src / modules / core / transition_region.c
index bfe4a4e..59c856d 100644 (file)
@@ -3,19 +3,19 @@
  * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
  * Author: Charles Yates <charles.yates@pandora.be>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "transition_region.h"
@@ -119,7 +119,7 @@ static uint8_t *filter_get_alpha_mask( mlt_frame this )
                alpha = p;
                while ( size -- )
                {
-                       *p ++ = *image ++;
+                       *p ++ = ( int )( ( ( *image ++ - 16 ) * 299 ) / 255 );
                        image ++;
                }
                mlt_properties_set_data( MLT_FRAME_PROPERTIES( this ), "alpha", alpha, region_width * region_height, mlt_pool_release, NULL );
@@ -176,7 +176,7 @@ static int transition_get_image( mlt_frame frame, uint8_t **image, mlt_image_for
                        mlt_properties composite_properties = MLT_TRANSITION_PROPERTIES( composite );
 
                        // We want to ensure that we don't get a wobble...
-                       mlt_properties_set_int( composite_properties, "distort", 1 );
+                       //mlt_properties_set_int( composite_properties, "distort", 1 );
                        mlt_properties_set_int( composite_properties, "progressive", 1 );
 
                        // Pass all the composite. properties on the transition down
@@ -441,6 +441,9 @@ mlt_transition transition_region_init( void *arg )
                
                // Resource defines the shape of the region
                mlt_properties_set( properties, "resource", arg == NULL ? "rectangle" : arg );
+
+               // Inform apps and framework that this is a video only transition
+               mlt_properties_set_int( properties, "_transition_type", 1 );
        }
 
        // Return the transition