Commit Graph

123 Commits

Author SHA1 Message Date
Andreas Rheinhardt
2b6e008577 avfilter/internal: Move ff_norm_qscale() to qp_table.h
It is the natural header for it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 19:59:00 +02:00
Andreas Rheinhardt
6e66e2c321 avfilter/internal: Don't include framepool.h, thread.h
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>
2021-08-04 03:03:25 +02:00
Andreas Rheinhardt
b76f9bcfd0 avfilter/internal: Mark ff_filter_get_nb_threads() as av_pure
It does not modify anything; it only returns a value, so it fulfills
the requirements for av_pure.
The deeper rationale behind this change is that this function is called
quite often inside arguments to FFMIN which may lead to two calls to it;
declaring this function as av_pure allows the compiler to optimize the
second call away.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-18 22:33:34 +02:00
Paul B Mahol
b4ad669a42 avfilter/avfilter: mark enable as runtime option too 2021-02-03 15:51:40 +01:00
Andreas Rheinhardt
242ba4d74c avfilter/formats: Remove unused functions
This commit removes ff_parse_sample_format(), ff_parse_time_base() and
ff_query_formats_all_layouts() from libavfilter/formats.c. All of these
functions were completely unused. ff_parse_time_base() has not been used
at all since it had been added in 3448404a707b6e236a2ffa7b0453b3300de41b7b;
the last caller of ff_parse_sample_format has been removed in commit
d1c49bcae9. And the one and only caller of
ff_query_formats_all_layouts() (the asyncts filter) has been removed in
commit a8fe8d6b4a.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-21 18:28:40 +02:00
Nicolas George
4ca1fb9d2a lavfi: remove needs_fifo. 2020-08-20 18:55:19 +02:00
Limin Wang
548ef7a12b avfilter: add D2TS, TS2D, TS2T as a common macro in internal.h
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-19 23:12:49 +08:00
Nicolas George
02daafb45c lavfi: remove AVFilterPad.poll_frame().
This design is no longer used and was replaced a long time ago.
2019-12-23 13:03:38 +01:00
Nicolas George
65e6850c56 lavfi: remove ff_poll_frame().
It is never used.
2019-12-23 13:03:38 +01:00
Paul B Mahol
a918b833a5 avfilter/avfilter: add ff_filter_process_command() 2019-10-14 11:28:54 +02:00
Mark Thompson
bcab11a1a2 Merge commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d'
* commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d':
  lavfi: Add support for increasing hardware frame pool sizes

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:28:12 +00:00
Mark Thompson
6d86cef06b lavfi: Add support for increasing hardware frame pool sizes
AVFilterContext.extra_hw_frames functions identically to the field of
the same name in AVCodecContext.
2018-02-11 22:11:06 +00:00
James Almer
3ec6d9c6b2 avfilter: remove duplicate and disabled trace log function
It's already defined and actually enabled depending on compiler options
elsewhere.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-01 14:06:14 -03:00
Paul B Mahol
e9510dc032 avfilter: remove usage of empty header
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-26 19:43:41 +02:00
Matthieu Bouron
b5e1ec5660 Merge commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9'
* commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9':
  lavfi: Always propagate hw_frames_ctx through links

Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2017-03-30 00:02:08 +02:00
Nicolas George
c619a4e525 lavfi: make two functions static.
ff_request_frame_to_filter() and ff_filter_frame_to_filter()
are only used in avfilter.c.
2017-01-12 14:06:16 +01:00
Nicolas George
ae4650f0b9 lavfi: disallow ff_request_frame for filters using activate.
Having two different functions allows to have stricter tests
and detect errors earlier.
2017-01-12 14:06:16 +01:00
Nicolas George
02aa0701ae lavfi: make filter_frame non-recursive.
A lot of changes happen at the same time:

- Add a framequeue fifo to AVFilterLink.

- split AVFilterLink.status into status_in and status_out: requires
  changes to the few filters and programs that use it directly
  (f_interleave, split, filtfmts).

- Add a field ready to AVFilterContext, marking when the filter is ready
  and its activation priority.

- Add flags to mark blocked links.

- Change ff_filter_frame() to enqueue the frame.

- Change all filtering functions to update the ready field and the
  blocked flags.

- Update ff_filter_graph_run_once() to use the ready field.

- buffersrc: always push the frame immediately.
2016-12-18 10:38:52 +01:00
Mark Thompson
e3fb74f7f9 lavfi: Always propagate hw_frames_ctx through links
Also adds a new flag to mark filters which are aware of hwframes and
will perform this task themselves, and marks all appropriate filters
with this flag.

This is required to allow software-mapped hardware frames to work,
because we need to have the frames context available for any later
mapping operation in the filter graph.

The output from the filter graph should only propagate further to an
encoder if the hardware format actually matches the visible format
(mapped frames are valid here and have an hw_frames_ctx, but this
should not be given to the encoder as its hardware context).
2016-11-02 20:29:05 +00:00
Paul B Mahol
5b1907142d avfilter: add ff_filter_get_nb_threads() 2016-08-29 16:27:09 +02:00
Paul B Mahol
547d412078 avfilter: update some comments
start_frame is no more, samplesref argument is now frame argument.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-24 14:32:14 +01:00
Nicolas George
1655788712 lavfi: make request_frame() non-recursive.
Instead of calling the input filter request_frame() method,
ff_request_frame() now marks the link and returns immediately.
buffersink is changed to activate the marked filters until
a frame is obtained.
2015-12-22 16:04:30 +01:00
Nicolas George
108b4de552 lavfi: replace link.closed by link.status.
The status field can carry any error code instead of just EOF.
Also only update it through a wrapper function and provide a timestamp.
Update the few filters that used it directly.
2015-12-22 16:04:30 +01:00
Matthieu Bouron
0c59d40ae0 lavfi: use a video frame pool for each link of the filtergraph 2015-12-15 10:35:41 +01:00
Ganesh Ajjanagadde
62144b225d avfilter/internal: Doxygen for ff_fmt_is_in
This clarifies and adds Doxygen for ff_fmt_is_in.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-17 18:58:38 -04:00
Ganesh Ajjanagadde
01790484c1 avfilter/internal: add av_warn_unused_result
av_warn_unused_result is added to functions whose return status should
be checked. Currently does not trigger any warnings, but should be
useful for future robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-17 12:27:45 -04:00
Nicolas George
44f660e7e7 lavfi: remove FF_LINK_FLAG_REQUEST_LOOP.
It has no longer any effect.
2015-09-20 19:02:33 +02:00
Nicolas George
2a351f6c55 lavfi: drop the requirement that request_frame returns a frame.
It requires a loop in filters or the framework,
that makes the scheduling less efficient and more complex.
This is purely an internal change since the loop is now
present in buffersink.
Note that no filter except buffersink did rely on the requirement.
2015-09-20 19:02:33 +02:00
Hendrik Leppkes
144fb06806 Remove left-over FF_API_AVFILTERBUFFER cruft 2015-09-05 16:27:19 +02:00
Hendrik Leppkes
033764e015 Merge commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0'
* commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0':
  lavfi: Drop deprecated AVFilterBuffer* code

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-05 16:22:03 +02:00
Hendrik Leppkes
43e2e172df Merge commit 'e65e4cbbda03ca3c9087f069c9867d518415fca1'
* commit 'e65e4cbbda03ca3c9087f069c9867d518415fca1':
  lavfi: Drop deprecated *_count suffixed variables

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-05 16:11:22 +02:00
Hendrik Leppkes
2751d5f0ba Merge commit '86e5056575f55f070609dd3926605302f7d2280e'
* commit '86e5056575f55f070609dd3926605302f7d2280e':
  lavfi: Drop deprecated public AVFilterPad struct

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-05 16:01:24 +02:00
Andreas Cadhalpun
e6c20e214e avfilter: add missing FF_API_AVFILTERBUFFER guards
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-08-30 23:24:22 +02:00
Vittorio Giovara
f6974fe651 lavfi: Drop deprecated AVFilterBuffer* code
Deprecated in 11/2012.
2015-08-28 16:01:16 +02:00
Vittorio Giovara
e65e4cbbda lavfi: Drop deprecated *_count suffixed variables
Deprecated in 06/2012.
2015-08-28 16:01:13 +02:00
Vittorio Giovara
86e5056575 lavfi: Drop deprecated public AVFilterPad struct
Deprecated in 06/2012.
2015-08-28 11:06:37 +02:00
Andreas Cadhalpun
8bd74aafe8 avfilter: remove obsolete function declarations
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-08-08 21:58:48 +02:00
Michael Niedermayer
9d8070afe1 avfilter/internal: add more words to sentance
Hopefully fixes english syntax

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 13:09:41 +02:00
Michael Niedermayer
522256b374 avfilter/internal: Improve docs about ff_request_frame()
Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 00:09:14 +02:00
Vittorio Giovara
1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Michael Niedermayer
bdb136d302 avfilter/internal: add fixme to ff_norm_qscale() to document obvious scaling issue
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 02:27:49 +01:00
Arwa Arif
4df01d5d44 avfilter: Factorize the use of norm_qscale in pp7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 02:22:02 +01:00
Michael Niedermayer
8788d31606 Merge commit '5655732c77f2df9c1dfbddc30cd4844390a6921f'
* commit '5655732c77f2df9c1dfbddc30cd4844390a6921f':
  avfilter: add needs_writable field to the internal AVFilterPad structure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 03:37:03 +01:00
Vittorio Giovara
5655732c77 avfilter: add needs_writable field to the internal AVFilterPad structure 2014-01-09 23:13:05 +01:00
Nicolas George
6e2473edfd lavfi: parsing helper for unknown channel layouts.
Make ff_parse_channel_layout() accept unknown layouts too.
2013-11-03 10:30:25 +01:00
Michael Niedermayer
d5ec8ba7f2 Do not leave positive values undefined when negative are defined as error
Define positive return values as non errors and leave further meaning undefined
This allows future extensions to use these values

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-19 16:42:57 +02:00
Michael Niedermayer
7381d31f22 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavfi: allow user-provided execute() callbacks

Conflicts:
	libavfilter/avfilter.h
	libavfilter/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 11:02:01 +02:00
Anton Khirnov
0767bfd199 lavfi: allow user-provided execute() callbacks 2013-09-28 08:06:19 +02:00
Paul B Mahol
211a185cba avfilter/avfilter: check allocation failure in ff_insert_pad()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-15 11:09:23 +00:00
Michael Niedermayer
247fa6c27c avfilter: remove ff_copy_int*_list
The functions are unused

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 16:07:29 +02:00