Clément Bœsch
92a2d12a71
lavfi/overlay: remove do_blend forward declaration.
12 years ago
Clément Bœsch
4328602890
lavfi: add dual input helpers.
12 years ago
Anton Khirnov
a70519aad1
vf_overlay: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
12 years ago
Clément Bœsch
1776177b7f
lavfi: replace passthrough_filter_frame with a flag.
With the introduction of AVFilterContext->is_disabled, we can simplify
the custom passthrough mode in filters.
This commit is technically a small compat break, but the timeline was
introduced very recently.
Doxy by Stefano Sabatini.
12 years ago
Clément Bœsch
f0250cc463
lavfi/overlay: simpler up-rounded w/h computations.
12 years ago
Clément Bœsch
d3f7b98f87
lavfi/overlay: reindent fix.
12 years ago
Clément Bœsch
15d2f26998
lavfi/overlay: support timeline through the new system.
12 years ago
Clément Bœsch
b8a5c76131
lavfi: add frame counter into AVFilterLink and use it in filters.
12 years ago
Michael Niedermayer
fd6228e657
lavfi: remove now unused args parameter from AVFilter.init and init_opaque
This is mostly automated global search and replace
The deprecated aconvert filter is disabled, if it still has users
it should be updated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
9da369604e
lavfi/overlay: improve feedback in case of invalid expression
Based on vf_hue.c code.
12 years ago
Stefano Sabatini
aff6cebb41
lavfi/overlay: fix crash in case of invalid expression
12 years ago
Stefano Sabatini
ed2c827575
lavfi/overlay: add repeatlast option
12 years ago
Stefano Sabatini
a77454ec14
lavfi/overlay: reindent constants in option list
Wanted-By: ubitux
12 years ago
Clément Bœsch
fcaea2170f
lavfi/overlay: cleanup unused shorthand.
12 years ago
Paul B Mahol
16f1e832ba
lavfi/overlay: remove dupe initializer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Stefano Sabatini
d2752ef061
lavfi/overlay: add process_command callback
12 years ago
Stefano Sabatini
006e20bd36
lavfi/overlay: add enable expression
This expression is useful to enable/disable overlaying on the fly.
Note that this can't be easily done relying on the filtergraph structure,
since this implies caching issues or a null frame overlaying in the best
case, which is better avoided for performance and convenience reasons.
12 years ago
Stefano Sabatini
cc3edd99a6
lavfi/overlay: add dynamic expression evaluation support
Add support for dynamic x, y expressions evaluation.
Also add support for an evaluation mode which allows to disable per-frame
evaluation, so that there is no speedloss in case the expression does not
depend on frame variables.
12 years ago
Anton Khirnov
9087eaf193
vf_overlay: switch to an AVOptions-based system.
12 years ago
Stefano Sabatini
39aad43465
lavfi/overlay: fix debug PTS output in try_filter_frame()
The PTS of the input frames must be interpreted according to the input
timebase, which is not the same as the output timebase.
12 years ago
Clément Bœsch
e62587bc5e
lavfi/overlay: use standard options parsing.
12 years ago
Clément Bœsch
96e4b00d62
lavfi: remove remaining forgotten min/rej perms.
12 years ago
Anton Khirnov
7e350379f8
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
12 years ago
Stefano Sabatini
8d9509377e
lavfi/overlay: improve log message warning in case of clipped overlay
12 years ago
Stefano Sabatini
f164228fd7
lavfi/overlay: add support for partial overlaying
Partially rework the iteration logic, in order to limit iteration only
for the clipped overlay region.
12 years ago
Michael Niedermayer
cfcab4c507
vf_overlay: silence warning: X may be used uninitialized in this function
Also ensure that format is valid in query_formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
22b06103f0
lavfi/overlay: add format option
In particular, fix misbehavior in case main and overlay input formats
mismatch (e.g. YUV420 and YUV444).
12 years ago
Stefano Sabatini
2db0056f96
lavfi/overlay: apply minor consistency fixes
12 years ago
Stefano Sabatini
3d77a27548
lavfi/overlay: implement shortest option
Force termination when the overlay stream ends. Simplify scripting logic,
for example when an infinite source is used to generate a background for
a composite video.
12 years ago
Paul B Mahol
f2d200d460
lavfi/overlay: yuv444p & yuva444p support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Nicolas George
7e5c5fa5fc
lavfi/vf_overlay: check that filter_frame does not return EAGAIN.
EAGAIN is used internally in the code; it currently does not make
sense as a return code from the next filter.
Should fix CID966655.
12 years ago
Stefano Sabatini
bde1e8bf06
lavfi/overlay: make use of av_opt_set_from_string()
Simplify.
12 years ago
Stefano Sabatini
5e402a5319
lavfi/overlay: switch to filter_frame API
12 years ago
Paul B Mahol
185d1f3bfc
lavfi: declare arrays that never change as static const
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Stefano Sabatini
54b0c04ae3
lavfi/overlay: clarify/fix comment, add a few empty lines to ease readability
12 years ago
Stefano Sabatini
3d1e2ada25
lavfi/overlay: remove duplicated definition of ff_null_get_video_buffer()
Simplify.
12 years ago
Anton Khirnov
565e4993c6
lavfi: merge start_frame/draw_slice/end_frame
Any alleged performance benefits gained from the split are purely
mythological and do not justify added code complexity.
12 years ago
Mark Himsley
13c6252536
lavfi/overlay: enable yuva420p as overlay background
Same calculation as for RGBA etc to create unpremultiplied output.
Useful for creating an intermediate "Mix/Effects bank", in vision mixer
(switcher) terminology.
Example command:
ffmpeg -i input.mov -vf
"[in]scale=iw:ih:interl=1,format=yuv420p[bg];movie=BBC_blocks_watermark.png,scale=iw:ih:interl=1,format=yuva420p[dog];movie=Kickabout_strap.mov,scale=iw:ih:interl=1,format=yuva420p[strap];[strap][dog]overlay=0:0[me1];[bg][me1]overlay=0:0,scale=0:0:interl=1[out]"
-b:v 3M -an output.mov
Fix trac ticket #549 .
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
12 years ago
Hendrik Leppkes
79393a8363
Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
59ee9f78b0
lavfi: do not use av_pix_fmt_descriptors directly.
12 years ago
Mans Rullgard
568c70e79e
lavfi: convert input/ouput list compound literals to named objects
A number of compilers, for example those from TI and IBM, choke on
these initialisers. The current style is also quite ugly.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
4673a5a761
vf_overlay: properly sync inputs.
Right now it incorrectly assumes that the frames are sent in the proper
order, which worked with old ffmpeg and avconv versions by accident.
12 years ago
Anton Khirnov
ab35ec29a4
vf_overlay: get rid of pointless messing with timebase.
Output frames correspond 1:1 to input frames on the main input.
So use the main input timebase for output.
12 years ago
Nicolas George
52820bc578
lavfi/overlay: fix return values.
They were only roughly adapted when error return was
added to the push functions.
12 years ago
Stefano Sabatini
42d621d131
lavfi: add priv class to filter definitions and flags to filter internal options
This allows the iteration callbacks to discover the internal class and
options, and show them when required.
12 years ago
Nicolas George
616c3f3ee2
vf_overlay: fix permissions.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Clément Bœsch
ad55244c96
lavfi/overlay: remove dead initialization.
12 years ago
Anton Khirnov
f431315a86
vf_overlay: ensure the overlay frame does not get leaked.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago