Commit Graph

28 Commits

Author SHA1 Message Date
Andreas Rheinhardt 04a5ffa75f avfilter/vf_xfade: Remove always-false format check
This filter uses ff_set_common_formats_from_list().

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-21 17:57:32 +02:00
Paul B Mahol c4973e2148 avfilter/vf_xfade: check default switch case 2021-09-12 15:06:08 +02:00
Paul B Mahol 1db828db8b avfilter/vf_xfade: add zoomin transition 2021-09-12 15:01:48 +02:00
Andreas Rheinhardt 8be701d9f7 avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilter
Up until now, an AVFilter's lists of input and output AVFilterPads
were terminated by a sentinel and the only way to get the length
of these lists was by using avfilter_pad_count(). This has two
drawbacks: first, sizeof(AVFilterPad) is not negligible
(i.e. 64B on 64bit systems); second, getting the size involves
a function call instead of just reading the data.

This commit therefore changes this. The sentinels are removed and new
private fields nb_inputs and nb_outputs are added to AVFilter that
contain the number of elements of the respective AVFilterPad array.

Given that AVFilter.(in|out)puts are the only arrays of zero-terminated
AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads
are not zero-terminated and they already have a size field) the argument
to avfilter_pad_count() is always one of these lists, so it just has to
find the filter the list belongs to and read said number. This is slower
than before, but a replacement function that just reads the internal numbers
that users are expected to switch to will be added soon; and furthermore,
avfilter_pad_count() is probably never called in hot loops anyway.

This saves about 49KiB from the binary; notice that these sentinels are
not in .bss despite being zeroed: they are in .data.rel.ro due to the
non-sentinels.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-20 12:53:58 +02:00
Andreas Rheinhardt 1b20853fb3 avfilter/internal: Factor out executing a filter's execute_func
The current way of doing it involves writing the ctx parameter twice.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-15 21:33:25 +02:00
Andreas Rheinhardt 18ec426a86 avfilter/formats: Factor common function combinations out
Several combinations of functions happen quite often in query_format
functions; e.g. ff_set_common_formats(ctx, ff_make_format_list(sample_fmts))
is very common. This commit therefore adds functions that are equivalent
to commonly used function combinations in order to reduce code
duplication.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-13 17:36:22 +02:00
Andreas Rheinhardt a04ad248a0 avfilter: Constify all AVFilters
This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:05 -03:00
Paul B Mahol 2aece147d5 avfilter/vf_xfade: drop unused frames from inactive inputs 2021-03-14 13:15:21 +01:00
Musee Ullah 7bb8b81955 avfilter/vf_xfade: ensure metadata is copied to transition frames
I was having an issue where, using a filter chain of xfade -> ass, the
colors on the subtitles were incorrect only on the frames where xfade
was being used. This resolves that issue for me.

Signed-off-by: Musee Ullah <lae@lae.is>
2020-11-24 14:35:41 +01:00
Paul B Mahol c417f1a76c avfilter/vf_xfade: add squeeze transitions 2020-11-19 14:57:41 +01:00
Paul B Mahol 60796d22f9 avfilter/vf_xfade: fix excessive number of queued frames
Also do not abort in some cases too early when transition is over.

Fixes #8823.
2020-08-30 11:28:28 +02:00
Paul B Mahol 1419bf0551 avfilter/vf_xfade: do not use alpha for average rgb color 2020-08-27 14:45:21 +02:00
Paul B Mahol 9ebde67f0b avfilter/vf_xfade: add corner wipe transforms 2020-08-27 14:45:21 +02:00
Paul B Mahol e13eb58941 avfilter/vf_xfade: add fadegrays transition 2020-08-26 23:25:10 +02:00
Paul B Mahol 4dbb75c437 avfilter/vf_xfade: check that fps between inputs are valid 2020-08-11 10:57:04 +02:00
Paul B Mahol 17f6bd6e58 avfilter/vf_xfade: add hblur transition 2020-07-21 23:29:55 +02:00
Paul B Mahol 3f9fd9dcfd avfilter/vf_xfade: add slice transitions 2020-04-07 13:51:25 +02:00
Paul B Mahol 283e755734 avfilter/vf_xfade: add diagonal smooth transitions 2020-02-09 12:59:56 +01:00
Paul B Mahol 3720153ffc aviflter/vf_xfade: add pixelize transition 2020-02-07 22:35:16 +01:00
Paul B Mahol e3e5598290 avfilter/vf_xfade: add dissolve transition 2020-02-07 22:00:14 +01:00
Paul B Mahol 2d58fa6d9e avfilter/vf_xfade: add horzopen/close transition 2020-02-05 16:53:06 +01:00
Paul B Mahol 10f4441acb avfilter/vf_xfade: add vertopen/close transition 2020-02-05 16:44:50 +01:00
Paul B Mahol efee86fafa avfilter/vf_xfade: add circleopen & circleclose transition 2020-02-04 10:39:02 +01:00
Paul B Mahol 6d5e9ed67c avfilter/vf_xfade: move passthrough code before eof check 2020-02-03 09:36:52 +01:00
Paul B Mahol e5e7289ea8 avfilter/vf_xfade: remove unused header 2020-02-01 22:06:11 +01:00
Paul B Mahol 53b4128ea0 avfilter/vf_xfade: add smooth transitions 2020-01-31 13:14:13 +01:00
Paul B Mahol 0a275fec62 avfilter/vf_xfade: add radial transition 2020-01-30 17:29:31 +01:00
Paul B Mahol 863accbefa avfilter: add xfade filter 2020-01-30 16:35:33 +01:00