summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2ffcb97)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@452
d19143bc-622f-0410-bfdd-
b5b2a6649095
{
// When no scaling is requested, revert the requested dimensions if possible
mlt_properties_set_int( properties, "rescale_width", ( iwidth / 2 ) * 2 );
{
// When no scaling is requested, revert the requested dimensions if possible
mlt_properties_set_int( properties, "rescale_width", ( iwidth / 2 ) * 2 );
- mlt_properties_set_int( properties, "rescale_height", ( iheight / 2 ) * 2 );
+ mlt_properties_set_int( properties, "rescale_height", iheight );
}
// Get the image as requested
}
// Get the image as requested
{
output->nw = in->nw;
output->nh = in->nh;
{
output->nw = in->nw;
output->nh = in->nh;
- output->x = in->x + ( out->x - in->x ) * position;
- output->y = in->y + ( out->y - in->y ) * position;
- output->w = in->w + ( out->w - in->w ) * position;
- output->h = in->h + ( out->h - in->h ) * position;
+ output->x = rint( in->x + ( out->x - in->x ) * position + 0.5 );
+ output->y = rint( in->y + ( out->y - in->y ) * position + 0.5 );
+ output->w = rint( in->w + ( out->w - in->w ) * position + 0.5 );
+ output->h = rint( in->h + ( out->h - in->h ) * position + 0.5 );
output->mix = in->mix + ( out->mix - in->mix ) * position;
output->distort = in->distort;
}
output->mix = in->mix + ( out->mix - in->mix ) * position;
output->distort = in->distort;
}
output->distort = out->distort;
}
output->distort = out->distort;
}
- // DRD> These break on negative values. I do not think they are needed
- // since yuv_composite takes care of YUYV group alignment
- //output->x = ( int )floor( output->x ) & 0xfffffffe;
- //output->w = ( int )floor( output->w ) & 0xfffffffe;
- //output->sw &= 0xfffffffe;
+ // Definitely incorrect...
+#if 0
+ if ( ( int )output->x & 1 && ( int )output->w & 1 )
+ {
+ output->x -= 1.0;
+ output->w += 1.0;
+ }
+ else if ( ( int )output->x & 1 )
+ {
+ output->x += 1.0;
+ }
+ else if ( ( int )output->w & 1 )
+ {
+ output->w += 1.0;
+ }
+#endif
-void transition_destroy_keys( void *arg )
+static void transition_destroy_keys( void *arg )
{
struct geometry_s *ptr = arg;
struct geometry_s *next = NULL;
{
struct geometry_s *ptr = arg;
struct geometry_s *next = NULL;
static void alignment_calculate( struct geometry_s *geometry )
{
geometry->x += ( geometry->w - geometry->sw ) * geometry->halign / 2;
static void alignment_calculate( struct geometry_s *geometry )
{
geometry->x += ( geometry->w - geometry->sw ) * geometry->halign / 2;
- geometry->y += ( geometry->h - geometry->sh ) * geometry->valign / 2;
+ geometry->y += ( geometry->h - geometry->sh ) * geometry->valign;
}
/** Calculate the position for this frame.
}
/** Calculate the position for this frame.
// Adjust to consumer scale
int x = geometry.x * width_dest / geometry.nw;
int y = geometry.y * height_dest / geometry.nh;
// Adjust to consumer scale
int x = geometry.x * width_dest / geometry.nw;
int y = geometry.y * height_dest / geometry.nh;
-
- // Align x to a full YUYV group
- x = ( x | 1 ) ^ 1;
- width_src = ( width_src | 1 ) ^ 1;
+ int uneven = ( x & 1 );
// optimization points - no work to do
if ( width_src <= 0 || height_src <= 0 )
// optimization points - no work to do
if ( width_src <= 0 || height_src <= 0 )
stride_dest *= step;
int alpha_stride = stride_src / bpp;
stride_dest *= step;
int alpha_stride = stride_src / bpp;
+ if ( uneven )
+ p_src -= 2;
+
// now do the compositing only to cropped extents
if ( line_fn != NULL )
{
// now do the compositing only to cropped extents
if ( line_fn != NULL )
{
*width = geometry->sw * *width / geometry->nw;
*height = geometry->sh * *height / geometry->nh;
*width = geometry->sw * *width / geometry->nw;
*height = geometry->sh * *height / geometry->nh;
// optimization points - no work to do
if ( *width < 1 || *height < 1 )
// optimization points - no work to do
if ( *width < 1 || *height < 1 )
if ( y + h > height )
h = height - y;
if ( y + h > height )
h = height - y;
- x = ( x | 1 ) ^ 1;
- w = ( w | 1 ) ^ 1;
+ //x = ( x | 1 ) ^ 1;
+ //w = ( w | 1 ) ^ 1;
// Now we need to create a new destination image
dest = mlt_pool_alloc( w * h * 2 );
// Now we need to create a new destination image
dest = mlt_pool_alloc( w * h * 2 );