These fields are mutually exclusive, so putting them in a union
is possible and makes AVFilterPad smaller.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
They are not used by the header at all and only used by very few files;
so include the headers in their users instead of in internal.h.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
It should not be needed for each filter that sets sample aspect ratio
to set it explicitly also for each and every frame, instead that is
automatically done in get_buffer call.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This is a temporary workaround until all filters have been
upgraded to filter_frame and the framework can forget completely
about start_frame/draw_slice/end_frame.
This fixes a regression with the scale filters input changing.
In the long run filters should get a flag to indicate support of this
and then this flag be used here.
But the regression should not be left standing until thats done.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix warning when compiling boxblur.
While this is technically a major API break, practically there will be no
one using that function since the filtering API is mostly private, so
that function alone is not usable.
There are several reasons for doing that:
1. It documents the code for the reader and helps find
inconsistencies and bugs.
2. For rej_perms, it guarantees the change will be done
even if the output reference can be created by several
code paths.
3. It can be used to predict cases where a copy will,
or will not happen and optimize buffer allocation
(for example not request a rare direct-rendering buffer
from a device sink if it will be copied anyway).
Note that a filter is still allowed to manage the permissions
on its own without using these fields.
The code currently use cur_buf as the target of the copy,
but cur_buf can be cleared by the filter if it has given
the reference away or stored it elsewhere as soon as start_frame.
The code still relies on the fact that the reference is not
destroyed until end_frame. All filters currently follow that condition.
An av_assert1() is added to check it; it should at least cause
very visible errors in valgrind.
Semantic for the function ff_null_start_frame() was changed in
07bad27810, and it has now the same behavior of
ff_null_start_frame_keep_ref(), thus it makes no sense to keep both of
them.
Use the same values of the video output link.
Avoid the need to override the default_start_frame() with an ad-hoc
start_frame() callback.
In particular, fix the super2xsai filter which was setting the
input w/h values in the output.
Its only used through the start_frame pointer and thus cannot be inlined easily.
It also appears to break compilation with some unidentified compiler on darwin.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>