Commit d4fd3f24 authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi: add tblend filter

parent 05e74ac2
......@@ -8,6 +8,7 @@ version <next>:
- RIFX format for *.wav files
- RTP/mpegts muxer
- non continuous cache protocol support
- tblend filter
version 2.5:
......
......@@ -2634,13 +2634,17 @@ The threshold below which a pixel value is considered black; it defaults to
@end table
@section blend
@section blend, tblend
Blend two video frames into each other.
It takes two input streams and outputs one stream, the first input is the
"top" layer and second input is "bottom" layer.
Output terminates when shortest input terminates.
The @code{blend} filter takes two input streams and outputs one
stream, the first input is the "top" layer and second input is
"bottom" layer. Output terminates when shortest input terminates.
The @code{tblend} (time blend) filter takes two consecutive frames
from one single stream, and outputs the result obtained by blending
the new frame on top of the old frame.
A description of the accepted options follows.
......@@ -2730,11 +2734,13 @@ Value of pixel component at current location for second video frame (bottom laye
@end table
@item shortest
Force termination when the shortest input terminates. Default is @code{0}.
Force termination when the shortest input terminates. Default is
@code{0}. This option is only defined for the @code{blend} filter.
@item repeatlast
Continue applying the last bottom frame after the end of the stream. A value of
@code{0} disable the filter after the last frame of the bottom layer is reached.
Default is @code{1}.
Default is @code{1}. This option is only defined for the @code{blend} filter.
@end table
@subsection Examples
......@@ -2769,6 +2775,12 @@ Apply uncover up-left effect:
@example
blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
@end example
@item
Display differences between the current and the previous frame:
@example
tblend=all_mode=difference128
@end example
@end itemize
@section boxblur
......
......@@ -188,6 +188,7 @@ OBJS-$(CONFIG_STEREO3D_FILTER) += vf_stereo3d.o
OBJS-$(CONFIG_SUBTITLES_FILTER) += vf_subtitles.o
OBJS-$(CONFIG_SUPER2XSAI_FILTER) += vf_super2xsai.o
OBJS-$(CONFIG_SWAPUV_FILTER) += vf_swapuv.o
OBJS-$(CONFIG_TBLEND_FILTER) += vf_blend.o
OBJS-$(CONFIG_TELECINE_FILTER) += vf_telecine.o
OBJS-$(CONFIG_THUMBNAIL_FILTER) += vf_thumbnail.o
OBJS-$(CONFIG_TILE_FILTER) += vf_tile.o
......
......@@ -203,6 +203,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(SUBTITLES, subtitles, vf);
REGISTER_FILTER(SUPER2XSAI, super2xsai, vf);
REGISTER_FILTER(SWAPUV, swapuv, vf);
REGISTER_FILTER(TBLEND, tblend, vf);
REGISTER_FILTER(TELECINE, telecine, vf);
REGISTER_FILTER(THUMBNAIL, thumbnail, vf);
REGISTER_FILTER(TILE, tile, vf);
......
......@@ -30,8 +30,8 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 5
#define LIBAVFILTER_VERSION_MICRO 102
#define LIBAVFILTER_VERSION_MINOR 6
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment