From e253fb0e1e231bcdc77bc37b05c7a9724dbe2bb1 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Fri, 2 Apr 2004 14:41:39 +0000 Subject: [PATCH] minor mods git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@265 d19143bc-622f-0410-bfdd-b5b2a6649095 --- demo/demo.ini | 1 + demo/mlt_squeeze | 7 +++-- demo/mlt_squeeze_box | 9 ++++++ docs/framework.txt | 13 ++++---- docs/services.txt | 34 ++------------------- src/modules/core/transition_composite.c | 40 +++++++++++++++++-------- 6 files changed, 51 insertions(+), 53 deletions(-) create mode 100644 demo/mlt_squeeze_box diff --git a/demo/demo.ini b/demo/demo.ini index 9bfd05b7..128821ee 100644 --- a/demo/demo.ini +++ b/demo/demo.ini @@ -18,6 +18,7 @@ mlt_bouncy Bouncy, Bouncy clip1.dv,clip3.dv mlt_bouncy_ball Bouncy, Bouncy Ball clip1.mpeg,clip3.mpeg,circle.png mlt_news Breaking News clip1.mpeg,clip2.mpeg mlt_squeeze Squeeze Transitions clip1.dv,clip2.dv,clip3.dv +mlt_squeeze_box Squeeze Box clip1.dv,clip2.dv,clip3.dv mlt_jcut J Cut clip1.dv,clip2.dv mlt_lcut L Cut clip1.dv,clip2.dv mlt_fade_black Fade from/to black/silence clip3.mpeg diff --git a/demo/mlt_squeeze b/demo/mlt_squeeze index 6b90afff..839efe92 100644 --- a/demo/mlt_squeeze +++ b/demo/mlt_squeeze @@ -2,7 +2,8 @@ inigo \ clip1.dv out=124 clip2.dv out=149 clip3.dv in=75 out=224 clip1.dv \ -track \ -blank 99 colour:black out=49 -blank 99 colour:black out=49 -blank 99 colour:black out=49 \ --transition composite:0%,0%:100%x100% key[25]=50%,0%:5%x100% end=0%,0%:100%x100% distort=true a_track=1 b_track=0 in=100 out=149 \ --transition composite:0%,0%:100%x100% key[25]=0%,50%:100%x5% end=0%,0%:100%x100% distort=true a_track=1 b_track=0 in=250 out=299 \ --transition composite:0%,0%:100%x100% key[25]=100%,0%:5%x100% end=0%,0%:100%x100% distort=true a_track=1 b_track=0 in=400 out=449 \ +-group progressive=1 distort=true \ +-transition composite:0%,0%:100%x100% key[25]=50%,0%:5%x100% end=0%,0%:100%x100% a_track=1 b_track=0 in=100 out=149 \ +-transition composite:0%,0%:100%x100% key[25]=0%,50%:100%x5% end=0%,0%:100%x100% a_track=1 b_track=0 in=250 out=299 \ +-transition composite:0%,0%:100%x100% key[25]=100%,0%:5%x100% end=0%,0%:100%x100% a_track=1 b_track=0 in=400 out=449 \ $* diff --git a/demo/mlt_squeeze_box b/demo/mlt_squeeze_box new file mode 100644 index 00000000..dfa0ced9 --- /dev/null +++ b/demo/mlt_squeeze_box @@ -0,0 +1,9 @@ +inigo \ +clip1.dv out=124 clip2.dv out=149 clip3.dv in=75 out=224 clip1.dv \ +-track \ +-blank 99 colour:black out=49 -blank 99 colour:black out=49 -blank 99 colour:black out=49 \ +-group progressive=1 \ +-transition composite:0%,0%:100%x100% key[25]=50%,0%:5%x100% end=0%,0%:100%x100% a_track=1 b_track=0 in=100 out=149 \ +-transition composite:0%,0%:100%x100% key[25]=0%,50%:100%x5% end=0%,0%:100%x100% a_track=1 b_track=0 in=250 out=299 \ +-transition composite:0%,0%:100%x100% key[25]=100%,0%:5%x100% end=0%,0%:100%x100% a_track=1 b_track=0 in=400 out=449 \ +$* diff --git a/docs/framework.txt b/docs/framework.txt index a1276db8..a118e938 100644 --- a/docs/framework.txt +++ b/docs/framework.txt @@ -403,8 +403,9 @@ Multiple Tracks and Transitions: +------------------------------+ The overlapping areas of track 0 and 1 would (presumably) have some kind of - transition - without a transition, the frames from a1 and a2 would be shown - during the areas of overlap. + transition - without a transition, the frames from b1 and b2 would be shown + during the areas of overlap (ie: by default, the higher numbered track takes + precedence over the lower numbered track). MLT has a multitrack object, but it is not a producer in the sense that it can be connected directly to a consumer and everything will work correctly. @@ -441,7 +442,7 @@ Multiple Tracks and Transitions: +----------+ With a combination of the two, we can now connect multitracks to consumers. - The first non-test card will be retrieved and passed on. + The last non-test card will be retrieved and passed on. The tracks can be producers, playlists, or even other tractors. @@ -450,7 +451,7 @@ Multiple Tracks and Transitions: tractor and the multitrack, but this involves a lot of connecting and reconnecting left and right producers and consumers, and it seemed only fair that we should be able to automate that process. - + So in keeping with our agricultural theme, the concept of the 'field' was born. We 'plant' filters and transitions in the field and the tractor pulls the multitrack (think of a combine harvester :-)) over the field and @@ -536,7 +537,9 @@ Multiple Tracks and Transitions: mlt_properties_set_position( properties, "in", 0 ); mlt_properties_set_position( properties, "out", length - 1 ); mlt_properties_set_position( properties, "length", length ); - + mlt_properties_set_int( properties, "a_track", 0 ); + mlt_properties_set_int( properties, "b_track", 1 ); + // Now set the properties on the transition properties = mlt_transition_properties( transition ); mlt_properties_set_position( properties, "in", 0 ); diff --git a/docs/services.txt b/docs/services.txt index 430060db..c0742065 100644 --- a/docs/services.txt +++ b/docs/services.txt @@ -2,7 +2,7 @@ Service Documentation Copyright (C) 2004 Ushodaya Enterprises Limited Authors: Charles Yates - Dan Dennedy + Dan Dennedy Last Revision: 2004-03-20 @@ -95,7 +95,7 @@ Producers Details - This producer is has two roles: + This producer has two roles: 1. it handles the mappings of all file names to the other producers; @@ -636,36 +636,6 @@ Filters Not a bug, but it only provides fair quality. - ffmpeg_dub - - Description - - Use ffmpeg executable to substitute audio stream. - - Constructor Argument - - file - filename of a WAV, Ogg Vorbis (--enable-vorbis), - MP3 (--enable-mp3lame), or AC-3 (--enable-a52) audio file. - - Initialisation Properties - - int in - in point - int out - out point - - Read Only Properties - - string resource - file - - Dependencies - - ffmpeg plus for ffmpeg: - libogg and libvorbis for Ogg Vorbis, libmp3lame for MP3, liba52 for AC-3. - - Known Bugs - - Uses pipes and is therefore not compatible with bluefish. - - gamma Description diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index f8f78c96..88c12225 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -622,20 +622,34 @@ static int composite_yuv( uint8_t *p_dest, int width_dest, int height_dest, uint stride_dest *= step; int alpha_stride = stride_src / bpp; - if ( line_fn == NULL ) - line_fn = composite_line_yuv; - // now do the compositing only to cropped extents - for ( i = 0; i < height_src; i += step ) + if ( line_fn != NULL ) { - line_fn( p_dest, p_src, width_src, p_alpha, weight, p_luma, softness ); - - p_src += stride_src; - p_dest += stride_dest; - if ( p_alpha ) - p_alpha += alpha_stride; - if ( p_luma ) - p_luma += alpha_stride; + for ( i = 0; i < height_src; i += step ) + { + line_fn( p_dest, p_src, width_src, p_alpha, weight, p_luma, softness ); + + p_src += stride_src; + p_dest += stride_dest; + if ( p_alpha ) + p_alpha += alpha_stride; + if ( p_luma ) + p_luma += alpha_stride; + } + } + else + { + for ( i = 0; i < height_src; i += step ) + { + composite_line_yuv( p_dest, p_src, width_src, p_alpha, weight, p_luma, softness ); + + p_src += stride_src; + p_dest += stride_dest; + if ( p_alpha ) + p_alpha += alpha_stride; + if ( p_luma ) + p_luma += alpha_stride; + } } return ret; @@ -1019,7 +1033,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f int32_t luma_softness = mlt_properties_get_double( properties, "softness" ) * ( 1 << 16 ); uint16_t *luma_bitmap = get_luma( properties, width_b, height_b ); - composite_line_fn line_fn = mlt_properties_get_int( properties, "_MMX" ) ? composite_line_yuv_mmx : composite_line_yuv; + composite_line_fn line_fn = mlt_properties_get_int( properties, "_MMX" ) ? composite_line_yuv_mmx : NULL; for ( field = 0; field < ( progressive ? 1 : 2 ); field++ ) { -- 2.39.2