From 3544a004b42ec88fa0d1ef95733b875d7071ffcf Mon Sep 17 00:00:00 2001 From: ddennedy Date: Wed, 24 Mar 2004 04:49:16 +0000 Subject: [PATCH] remove some progressive flag handling in field renderers bugfix compositing images wider than the frame added more demos git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@235 d19143bc-622f-0410-bfdd-b5b2a6649095 --- demo/README | 38 +++++++++++++++++++++++++ demo/consumers.ini | 2 ++ demo/demo.ini | 7 +++-- demo/mlt_fade_black | 13 +++++++++ demo/mlt_jcut | 20 ++++--------- demo/mlt_jcut2 | 22 -------------- demo/mlt_lcut | 12 ++++++++ demo/mlt_push | 22 ++++++++++++++ demo/mlt_ticker | 16 +++++++++++ docs/services.txt | 2 +- src/modules/core/producer_colour.c | 1 - src/modules/core/transition_composite.c | 7 +++-- src/modules/core/transition_luma.c | 2 +- 13 files changed, 120 insertions(+), 44 deletions(-) create mode 100644 demo/mlt_fade_black delete mode 100644 demo/mlt_jcut2 create mode 100644 demo/mlt_lcut create mode 100644 demo/mlt_push create mode 100644 demo/mlt_ticker diff --git a/demo/README b/demo/README index 6cec29c9..62a4be07 100644 --- a/demo/README +++ b/demo/README @@ -166,3 +166,41 @@ Bouncy, Bouncy Ball A variation on the above Bouncy, Bouncy demo that applies a shape, or alpha producer, to the the compositing region. + +J Cut + + A J cut is an edit where the audio cuts before the video. + It gets its name from the way it looks on a NLE timeline user interface. + When the audio cuts over, it does an audio crossfade over the duration of + one frame. This makes the audio cut slightly less abrupt and avoids any + "click" due to mismatched sample levels at the edit point. The video edit + is a hard cut. + +L Cut + + An L cut is an edit where the video cuts before the audio. + It gets its name from the way it looks on a NLE timeline user interface. + This demo shows a very quick dissolve over 5 frames for a soft video cut. + Like the J Cut demo, an audio crossfade for the duration of one frame makes + an audio edit nearly instantaneous while being slightly softened and + avoiding aberrations. + +Fade from/to black/silence + + Of course, it is possible using MLT to fade from black on video and silence + on audio as well fade to black and silence. + +Push wipe + + A push wipe is a somewhat fancier transition than most standard wipes + because it involves motion. The new video clip "pushes" the old video + clip off one edge. If you can preview on an analog monitor you will notice + how smooth the motion is due to field-based rendering. + +Ticker tape + + A very minimal reverse crawling title neard the bottom of the screen. + The goal of the demo is show fluid motion of the field-based rendering of + the compositor when viewed on an analog monitor using a DV or BlueFish444 + consumer. The demo also shows the potientional for using and extending the + existing set of services for a full blown news ticker implementation. diff --git a/demo/consumers.ini b/demo/consumers.ini index a53006a3..16720ffc 100644 --- a/demo/consumers.ini +++ b/demo/consumers.ini @@ -8,3 +8,5 @@ MainConcept DV to /dev/dv1394 mcdv:/dev/dv1394 rescale=nearest buffer=25 libdv to /dev/dv1394 libdv:/dev/dv1394 rescale=nearest buffer=25 BlueFish444 PAL bluefish:1 BlueFish444 NTSC bluefish:1 standard=NTSC +BlueFish444 PAL Prog LL bluefish:1 progressive=1 buffer=1 n_frames=4 +BlueFish444 NTSC Prog LL bluefish:1 standard=NTSC progressive=1 buffer=1 frames=4 diff --git a/demo/demo.ini b/demo/demo.ini index 5f0ab2f2..db49077c 100644 --- a/demo/demo.ini +++ b/demo/demo.ini @@ -16,5 +16,8 @@ mlt_title_over_gfx Title over graphic watermark1.png,clip1.dv mlt_slideshow Slideshow Scotland mlt_bouncy Bouncy, Bouncy clip1.dv,clip3.dv mlt_bouncy_ball Bouncy, Bouncy Ball clip1.mpeg,clip3.mpeg,circle.png -mlt_jcut J Cut (using composite) clip1.dv, clip2.dv -mlt_jcut2 J Cut (using mix) clip1.dv, clip2.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 +mlt_push Push wipe clip1.mpeg, clip2.mpeg +mlt_ticker Ticker tape clip1.dv diff --git a/demo/mlt_fade_black b/demo/mlt_fade_black new file mode 100644 index 00000000..87646c3b --- /dev/null +++ b/demo/mlt_fade_black @@ -0,0 +1,13 @@ +inigo \ +clip3.mpeg in=100 out=299 \ +-track \ +colour:black \ +-transition \ +luma in=0 out=49 a_track=0 b_track=1 reverse=1 \ +-transition \ +luma in=150 out=199 a_track=0 b_track=1 \ +-filter \ +volume in=0 out=49 track=0 gain=0 end=1.0 \ +-filter \ +volume in=150 out=199 track=0 gain=1.0 end=0 \ +$* diff --git a/demo/mlt_jcut b/demo/mlt_jcut index cde10ab6..fd0b4a33 100644 --- a/demo/mlt_jcut +++ b/demo/mlt_jcut @@ -1,18 +1,10 @@ inigo \ -clip1.dv \ -out=199 \ +clip1.dv out=99 \ -track \ --blank 59 \ -clip2.dv \ -in=100 \ -out=239 \ +-blank 49 \ +clip2.dv in=100 \ -transition \ -composite \ -start=0,0:100%x100%:0 \ -key[5]=0,0:100%x100%:100 \ -end=0,0:100%x100%:100 \ -in=60 \ -out=199 \ -a_track=0 \ -b_track=1 \ +mix start=0 end=1 in=49 out=50 a_track=0 b_track=1 \ +-transition \ +mix:1 in=51 out=99 a_track=0 b_track=1 \ $* diff --git a/demo/mlt_jcut2 b/demo/mlt_jcut2 deleted file mode 100644 index b5b6b8bb..00000000 --- a/demo/mlt_jcut2 +++ /dev/null @@ -1,22 +0,0 @@ -inigo \ --blank 59 \ -clip2.dv \ -in=100 \ -out=239 \ --track \ -clip1.dv \ -in=0 \ -out=199 \ --transition mix:1 \ -in=60 \ -out=199 \ -a_track=0 \ -b_track=1 \ --transition \ -luma \ -in=60 \ -out=65 \ -a_track=0 \ -b_track=1 \ -reverse=1 \ -$* diff --git a/demo/mlt_lcut b/demo/mlt_lcut new file mode 100644 index 00000000..1b8485bb --- /dev/null +++ b/demo/mlt_lcut @@ -0,0 +1,12 @@ +inigo \ +-blank 49 \ +clip2.dv in=100 \ +-track \ +clip1.dv in=0 out=100 \ +-transition \ +luma in=50 out=55 a_track=0 b_track=1 reverse=1 \ +-transition \ +mix:1 in=50 out=98 a_track=0 b_track=1 \ +-transition \ +mix start=1 end=0 in=99 out=100 a_track=0 b_track=1 \ +$* diff --git a/demo/mlt_push b/demo/mlt_push new file mode 100644 index 00000000..ab58b154 --- /dev/null +++ b/demo/mlt_push @@ -0,0 +1,22 @@ +inigo \ +-blank 49 \ +colour:red out=25 \ +-blank 999 \ +-track \ +clip3.dv in=200 out=275 \ +-track \ +-blank 49 \ +clip2.dv in=200 \ +-transition \ +composite in=50 out=75 a_track=0 b_track=1 \ +start=0,0:100%x100%:100 \ +end=100%,0:100%x100%:100 \ +-transition \ +composite in=50 out=75 a_track=0 b_track=2 \ +start=-100%,0:100%x100%:100 \ +end=0,0:100%x100%:100 \ +-transition \ +mix:1 in=50 out=75 a_track=0 b_track=1 \ +-transition \ +mix start=0 end=1 in=50 out=75 a_track=1 b_track=2 \ +$* diff --git a/demo/mlt_ticker b/demo/mlt_ticker new file mode 100644 index 00000000..6e644628 --- /dev/null +++ b/demo/mlt_ticker @@ -0,0 +1,16 @@ +inigo \ +clip1.dv out=299 \ +-track \ +colour:black out=299 \ +-track \ +"+The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog..txt" \ +out=299 \ +-transition \ +composite a_track=0 b_track=1 out=299 \ +start=0,70%:100%x64:100 \ +distort=true \ +-transition \ +composite a_track=0 b_track=2 out=299 \ +start=100%,70%:999%x20% \ +end=-299%,70%:999%x20% \ +$* diff --git a/docs/services.txt b/docs/services.txt index 5b45ccb5..07b6d01e 100644 --- a/docs/services.txt +++ b/docs/services.txt @@ -1224,7 +1224,7 @@ Consumers string standard - "PAL" (default) or "NTSC" - default is based upon MLT_NORMALISATION environment variable, which defaults to PAL. - int frames - the number of DMA video frames. default is 4. + int frames - the number of DMA video frames. default is 8. minimum is 2. maximum on my system is 11. int buffer - the number of frames to buffer within MLT, minimum 1, default 25. diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c index 415b595e..bee525ad 100644 --- a/src/modules/core/producer_colour.c +++ b/src/modules/core/producer_colour.c @@ -216,4 +216,3 @@ static void producer_close( mlt_producer producer ) mlt_producer_close( producer ); free( producer ); } - diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index 3c4557ed..1af94dff 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -552,7 +552,7 @@ static int composite_yuv( uint8_t *p_dest, int width_dest, int height_dest, uint } // crop overlay beyond right edge of frame - else if ( x + width_src > width_dest ) + if ( x + width_src > width_dest ) width_src = width_dest - x; // crop overlay off the top edge of the frame @@ -561,8 +561,9 @@ static int composite_yuv( uint8_t *p_dest, int width_dest, int height_dest, uint y_src = -y; height_src -= y_src; } + // crop overlay below bottom edge of frame - else if ( y + height_src > height_dest ) + if ( y + height_src > height_dest ) height_src = height_dest - y; // offset pointer into overlay buffer based on cropping @@ -995,7 +996,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f uint8_t *dest = *image; uint8_t *src = image_b; uint8_t *alpha = mlt_frame_get_alpha_mask( b_frame ); - int progressive = mlt_properties_get_int( a_props, "progressive" ) || + int progressive = mlt_properties_get_int( a_props, "consumer_progressive" ) || mlt_properties_get_int( properties, "progressive" ); int field; diff --git a/src/modules/core/transition_luma.c b/src/modules/core/transition_luma.c index f0032c13..609b6105 100644 --- a/src/modules/core/transition_luma.c +++ b/src/modules/core/transition_luma.c @@ -437,7 +437,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f float frame_delta = delta_calculate( transition, a_frame ); float luma_softness = mlt_properties_get_double( properties, "softness" ); - int progressive = mlt_properties_get_int( a_props, "progressive" ) || + int progressive = mlt_properties_get_int( a_props, "consumer_progressive" ) || mlt_properties_get_int( properties, "progressive" ) || mlt_properties_get_int( b_props, "luma.progressive" ); -- 2.39.2