Commit Graph

9234 Commits

Author SHA1 Message Date
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
Michael Niedermayer
4f49fa6abe avfilter/af_drmeter: Check that there is data
Fixes: floating point division by 0
Fixes: -nan is outside the range of representable values of type 'int'
Fixes: Ticket8307

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-20 17:16:13 +02:00
Michael Niedermayer
1f21349d20 avfilter/vf_fftdnoiz: Use lrintf() in export_row8()
Fixes: 1.04064e+10 is outside the range of representable values of type 'int'
Fixes: Ticket 8279

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-20 17:16:13 +02:00
Michael Niedermayer
06af6e101b avfilter/vf_mestimate: Check b_count
Fixes: left shift of negative value -1
Fixes: Ticket8270

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-07-20 17:16:13 +02:00
Jai Luthra
012804d2e9 avfilter/vf_signature: Initialize all houghspace elements
Co-authored-by: Oscar <oscar_davids@outlook.com>
2021-07-20 19:44:16 +05:30
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
305be41374 avfilter/vf_v360: avoid doubles in fov_from_dfov() 2021-07-17 23:27:51 +02:00
Paul B Mahol
075157ec86 avfilter/vf_chromanr: add also euclidean distance for calculations 2021-07-17 15:18:30 +02:00
Daniel Playfair Cal
7f6d20931b avfilter/vf_v360: fix visibility test for fisheye projection
Previously the visibility test referred to a circle in the input. This
changes it so that it refers accurately to the entire area in the input.
2021-07-17 11:28:56 +02:00
Kacper Michajłow
b7e350af3e avfilter/[vf_nnedi, vf_estdif]: check interlaced flag on correct frame
Fixes regression in vf_nnedi after
24dc6d386c and vf_estdif while at it.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2021-07-16 09:22:36 +02:00
Paul B Mahol
03a8d9c7fd avfilter/vf_nnedi: fix time base for large denominators 2021-07-16 09:10:08 +02:00
Paul B Mahol
ca94d52f2e avfilter/vf_estdif: fix time base for large denominators 2021-07-16 09:10:03 +02:00
Paul B Mahol
c4e51af5e7 avfilter/vf_w3fdif: fix time base for large denominators 2021-07-16 09:09:58 +02:00
Tobias Rapp
ca56299fb3 avfilter/af_astats: Only print header lines when values are to be printed
Avoids empty "Channel" or "Overall" header lines added to log output
when measurement is restricted to one scope using
"measure_perchannel=none" or "measure_overall=none".

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2021-07-14 10:31:33 +02:00
Anton Khirnov
a948e47960 lavfi/vf_scale: forward errors from swscale 2021-07-12 12:49:25 +02:00
Anton Khirnov
6d51d65fb9 lavfi/vf_scale: pass only the private context to scale_slice()
Not the input link. The function does nothing with the link except
extract the private context from it.
2021-07-12 12:49:07 +02:00
Shubhanshu Saxena
6f9570a633 lavfi/dnn_backend_tf: Error Handling
This commit adds handling for cases where an error may occur, clearing
the allocated memory resources.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-11 20:12:27 +08:00
Shubhanshu Saxena
84e4e60fdc lavfi/dnn_backend_tf: Separate function for Completion Callback
This commit rearranges the existing code to create a separate function
for the completion callback in execute_model_tf.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-11 20:12:27 +08:00
Shubhanshu Saxena
b849228ae0 lavfi/dnn_backend_tf: Separate function for filling RequestItem
This commit rearranges the existing code to create separate function
for filling request with execution data.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-11 20:12:27 +08:00
Shubhanshu Saxena
08d8b3b631 lavfi/dnn_backend_tf: Request-based Execution
This commit uses TFRequestItem and the existing sync execution
mechanism to use request-based execution. It will help in adding
async functionality to the TensorFlow backend later.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-11 20:12:27 +08:00
Shubhanshu Saxena
a4de605110 lavfi/dnn_backend_tf: Add TFInferRequest and TFRequestItem
This commit introduces a typedef TFInferRequest to store
execution parameters for a single call to the TensorFlow C API.
This typedef is used in the TFRequestItem.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-11 20:12:27 +08:00
Shubhanshu Saxena
68cf14d2b1 lavfi/dnn_backend_tf: TaskItem Based Inference
This commit uses the common TaskItem and InferenceItem typedefs
for execution in TensorFlow backend.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-07-11 20:12:27 +08:00