Commit Graph

9255 Commits

Author SHA1 Message Date
Andreas Rheinhardt ef54590f83 avfilter/internal: Don't include libavcodec/(avcodec|internal).h
The reasons for including them don't exist any longer: ff_tlog() has
been moved to libavutil/internal.h and FF_QSCALE_TYPE_* has been moved
to qp_table.h.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 21:15:25 +02:00
Paul B Mahol 2678b4f81b avfilter/avf_showspectrum: add option to control dynamic range for colors 2021-08-05 21:11:40 +02:00
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 304cb08693 avfilter/avfilter: Remove unused partial_buf
It is unused since 02aa0701ae.
The corresponding size field is write-only since then.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-05 17:53:43 +02:00
Linjie Fu 9f14396a51 lavfi/vf_scale: use default swscale flags for scaler
Currently the default swscale flags for simple filter graph is bicubic,
however for complex filter graph it uses bilinear as decleared in scale
filter.

$ffmpeg -v verbose -i input.mp4 -vf format=yuv420p,scale=800x600 -an -f null -
[Parsed_scale_1 @ 0x7f86d2c160c0] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:800 h:600 fmt:yuv420p sar:0/1 flags:0x4

$ffmpeg -v verbose -i input.mp4 -filter_complex format=yuv420p,scale=800x600 -an -f null -
[Parsed_scale_1 @ 0x7f8779e046c0] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:800 h:600 fmt:yuv420p sar:0/1 flags:0x2

Use default swscale flags (bicubic currently) for scale filter.
- Remove flags="bilinear" from vf_scale
- Update the FATE refs

Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-08-05 22:23:49 +08:00
Paul B Mahol 9dbf95f209 avfilter/f_graphmonitor: use sample_count_in/out 2021-08-05 15:42:48 +02:00
Paul B Mahol c317862c88 avfilter/avfilter: add sample_count_in and sample_count_out 2021-08-05 15:42:48 +02:00
Paul B Mahol 82123e133d avfilter/avf_showspectrum: add lreplace sliding mode 2021-08-04 22:42:44 +02:00
Paul B Mahol b1388cd6c5 avfilter/avf_showspectrum: proper rational multiplication 2021-08-04 22:11:41 +02:00
Paul B Mahol 20ebcbd520 avfilter/avf_showspectrum: fix last frame/eof timestamp 2021-08-04 21:52:58 +02:00
Martin Storsjö 6d2365882f libavfilter: Fix implicit declarations of av_cpu_max_align
Signed-off-by: Martin Storsjö <martin@martin.st>
2021-08-04 20:58:15 +03:00
Andreas Rheinhardt cc6f6a1eef avfilter/vf_vpp_qsv: Don't overrun stack array
8b83dad825 added another potentially used
video enhancement filter without increasing a define for the number of
such options which is used as the size of stack array. This can lead to
a buffer overrun if all filters are used simultaneously. So increase
said number.

Fixes Coverity ticket #1489775.

Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-04 12:50:37 +02:00
Paul B Mahol 3b298640e1 avfilter/af_afftfilt: make sure that tx buffers size are always aligned 2021-08-04 10:13:46 +02:00
Paul B Mahol 16b4331bd1 avfilter/avf_showspectrum: use proper function return value instead of hardcoded number 2021-08-04 10:09:39 +02:00
Paul B Mahol b3117f376d avfilter/vaf_spectrumsynth: switch to TX FFT from avutil 2021-08-04 10:04:58 +02:00
Paul B Mahol a428d2a487 avfilter/af_afftfilt: switch to TX FFT from avutil 2021-08-04 09:35:06 +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
James Almer e0b84d1069 avfilter/avfilter: use av_frame_copy() to copy frame data
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-03 18:41:31 -03:00
Fei Wang 8b83dad825 avfilter/vf_vpp_qsv: add scale mode option
The option allow user to set diffenent scaling mode from
auto/low-power/high-quality.

More details:
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxExtVPPScaling

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-08-03 22:20:00 +08:00
Paul B Mahol ae94868a57 avfilter/avf_showfreqs: switch to TX FFT from avutil 2021-07-30 09:44:51 +02:00
Paul B Mahol 0068b3d0f0 avfilter/avf_showcqt: switch to TX FFT from avutil 2021-07-27 21:16:28 +02:00
Paul B Mahol 925d41ebd4 avfilter/af_afftdn: switch to TX FFT from avutil 2021-07-27 20:48:40 +02:00
Paul B Mahol 51c22f6621 avfilter/avf_concat: fix EOF timestamp 2021-07-27 20:19:52 +02:00
Paul B Mahol bc5faacc3f avfilter/vf_pseudocolor: add three more presets 2021-07-26 22:49:02 +02:00
Paul B Mahol da6975f022 avfilter/af_silenceremove: make window also depends on input sample format 2021-07-25 22:48:25 +02:00
Paul B Mahol d08deb11d2 avfilter/af_silenceremove: add support for more sample formats 2021-07-25 16:42:58 +02:00
Paul B Mahol 6f0f7bc7fe avfilter/f_ebur128: fix video output regression 2021-07-25 13:16:58 +02:00
Paul B Mahol 274112c88d avfilter/f_ebur128: add all sample rates support
The magic constants come from the unofficial "ITU-R BS.1770-1 filter
specifications"¹ by Raiden (libebur128) which relies on "Parameter
Quantization in Direct-Form Recursive Audio Filters"² by Brian
Neunaber.

The constants seem to include a quantization bias, for example:
- Vb is supposed to be exactly √Vh in a high shelf filter
- the Pre-filter Gain should likely be 4dB
- Pre Q and RLB Q are respectively very close to √½ and ½

Those are not adjusted to prevent the values from drifting away from
the official specifications.

An alternative to this approach would be to requantize on the fly as
proposed by pbelkner³, where the 48kHz code path would use the exact
specifications constants while derivating constants for other
frequencies.

[1]: https://www.scribd.com/document/49991813/ITU-R-BS-1770-1-filters
[2]: https://www.scribd.com/document/6531763/Direct-Form-Filter-Parameter-Quantization
[3]: https://hydrogenaud.io/index.php?topic=86116.msg740092#msg740092
2021-07-25 12:15:29 +02:00
Paul B Mahol a2a7547b2f avfilter/af_afwtdn: add forgotten break statement 2021-07-25 11:47:47 +02:00
Paul B Mahol 207e9b1760 avfilter/vf_threshold: add support for commands 2021-07-25 11:24:18 +02:00
Paul B Mahol 6210cc8c7e avfilter/af_anlmdn: add longer names of filter options 2021-07-25 10:23:30 +02:00
Valerii Zapodovnikov fdd45ebf55 lavfi/signature: fix always true expression
Otherwise since "==" has higher precedence, mode is never checked.

Reviewed-by: Jai Luthra <me@jailuthra.in>
2021-07-25 05:10:33 +05:30
Paul B Mahol 6fcb082b7a avfilter/vf_pseudocolor: add solar preset
Useful to emphasize bandings in video.
2021-07-24 23:12:13 +02:00
Paul B Mahol d5c76450f8 avfilter/vf_fillborders: add another mode 2021-07-24 20:23:58 +02:00
Paul B Mahol 94c90b3261 avfilter/avf_showspectrum: fix not rendering all channels with fscale=log:mode=separate 2021-07-24 17:30:58 +02:00
Paul B Mahol e5c860cd29 avfilter/avf_showspectrum: fix hz scale with legend enabled 2021-07-24 16:56:51 +02:00
Paul B Mahol 014ace8f98 avfilter/avf_showspectrum: switch to TX FFT from avutil 2021-07-24 16:49:53 +02:00
Paul B Mahol 88b6342c2b avfilter/af_headphone: switch to TX FFT from avutil 2021-07-24 12:24:40 +02:00
Paul B Mahol f6aeb94d72 avfilter/af_sofalizer: switch to TX FFT from avutil 2021-07-24 12:24:40 +02:00
Paul B Mahol 6846d48fa6 avfilter: add afwtdn filter 2021-07-24 12:24:40 +02:00
Andreas Rheinhardt c4042fc1e3 avfilter/vf_shufflepixels: Check ff_get_video_buffer()
There would be a segfault in case of (likely memory allocation) failure.
Fixes Coverity issue #1322338.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-23 15:06:21 +02:00
Andreas Rheinhardt 25c8507818 Remove/replace some unnecessary avcodec.h inclusions
Also remove other unnecessary headers and include headers directly while
at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:29:46 +02:00
Andreas Rheinhardt 2934a4b9a5 Remove unnecessary avassert.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:30 +02:00
Andreas Rheinhardt 4608f7cc6a Remove unnecessary mem.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:47:57 +02:00
Andreas Rheinhardt e7bd47e657 Remove obsolete version.h inclusions
These have mostly been added because of FF_API_*; yet when these were
removed, removing the header has been forgotten.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:34:31 +02:00
Andreas Rheinhardt 2c05ee092b avutil/internal, swresample/audioconvert: Remove cpu.h inclusions
These inclusions are not necessary, as cpu.h is already included
wherever it is needed (via direct inclusion or via the arch-specific
headers).
Also remove other unnecessary cpu.h inclusions from ordinary
non-headers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:33:45 +02:00
Andreas Rheinhardt 69f120ead7 avcodec/avcodec: Don't include cpu.h
It is not used here at all; instead, add it where it is used without
including it or any of the arch-specific CPU headers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 12:59:07 +02:00
Andreas Rheinhardt 1be3d8a0cb avcodec/avcodec: Stop including channel_layout.h in avcodec.h
Also include channel_layout.h directly wherever used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:31 +02:00
Shubhanshu Saxena 0bc7ddc460 lavfi/dnn_backend_ov: Rename RequestItem to OVRequestItem
Rename RequestItem to OVRequestItem in the OpenVINO backend
to avoid confusion.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-22 08:13:14 +08:00
Shubhanshu Saxena 429954822c lavfi/dnn_backend_openvino.c: Fix Memory Leak in execute_model_ov
In cases where the execution inside the function execute_model_ov fails,
the OVRequestItem must be pushed back to the request_queue before returning
the error. In case pushing back fails, release the allocated memory.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-22 08:13:14 +08:00