RGB2YUV_601( r, g, b, y0, u0 , v0 );
*d++ = y0;
*d++ = u0;
- *d++ = y0;
- *d++ = v0;
}
}
else
RGB2YUV_601( r, g, b, y0, u0 , v0 );
*d++ = y0;
*d++ = u0;
- *d++ = y0;
- *d++ = v0;
}
}
RGB2YUV_601( r, g, b, y0, u0 , v0 );
*d++ = y0;
*d++ = u0;
- *d++ = y0;
- *d++ = v0;
}
}
return ret;
? mlt_pool_alloc( width * height ) : NULL;
if ( requested_format == mlt_image_rgb24a || requested_format == mlt_image_opengl )
{
+ if ( alpha )
+ mlt_pool_release( alpha );
alpha = mlt_frame_get_alpha_mask( frame );
mlt_properties_get_data( properties, "alpha", &alpha_size );
}
if ( !( error = converter( *buffer, image, alpha, width, height ) ) )
{
- mlt_properties_set_data( properties, "image", image, size, mlt_pool_release, NULL );
+ mlt_frame_set_image( frame, image, size, mlt_pool_release );
if ( alpha && ( *format == mlt_image_rgb24a || *format == mlt_image_opengl ) )
- mlt_properties_set_data( properties, "alpha", alpha, alpha_size, mlt_pool_release, NULL );
+ mlt_frame_set_alpha( frame, alpha, alpha_size, mlt_pool_release );
*buffer = image;
*format = requested_format;
}
error = 1;
}
}
- if ( !error )
- mlt_properties_set_int( properties, "format", *format );
return error;
}
mlt_filter filter_imageconvert_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
- mlt_filter this = calloc( sizeof( struct mlt_filter_s ), 1 );
+ mlt_filter this = calloc( 1, sizeof( struct mlt_filter_s ) );
if ( mlt_filter_init( this, this ) == 0 )
{
this->process = filter_process;