Commit Graph

26 Commits

Author SHA1 Message Date
Nicolas George
2f76476549 lavfi: regroup formats lists in a single structure.
It will allow to refernce it as a whole without clunky macros.

Most of the changes have been automatically made with sed:

sed -i '
  s/-> *in_formats/->incfg.formats/g;
  s/-> *out_formats/->outcfg.formats/g;
  s/-> *in_channel_layouts/->incfg.channel_layouts/g;
  s/-> *out_channel_layouts/->outcfg.channel_layouts/g;
  s/-> *in_samplerates/->incfg.samplerates/g;
  s/-> *out_samplerates/->outcfg.samplerates/g;
  ' src/libavfilter/*(.)
2020-09-08 14:02:40 +02:00
Andreas Rheinhardt
ca8e5dedc7 avfilter/af_headphone: Fix leak of channel layouts list on error
In case the multichannel HRIR mode was enabled, an error could happen
between allocating a channel layouts list and attaching it to its target
destination. If an error happened, the list would leak. This is fixed by
attaching the list to its target directly after its allocation.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-26 23:52:57 +02:00
Andreas Rheinhardt
0960da42f5 avfilter/af_headphone: Fix segfault upon allocation failure
The headphone filter uses a variable number of inpads and allocates them
in its init function; if all goes well, the number of inpads coincides
with a number stored in the filter's private context. Yet if allocating a
subsequent inpad fails, the uninit function nevertheless uses the number
stored in the private context to determine the number of inpads to free
and not the AVFilterContext's nb_inputs. This will lead to an access
beyond the end of the allocated AVFilterContext.input_pads array and
an invalid free.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-26 23:52:56 +02:00
Paul B Mahol
dc33250765 avfilter/af_headphone: return on error immediately 2019-09-16 10:27:42 +02:00
Paul B Mahol
aece1eb1e9 avfilter/af_headphone: use av_log2() 2018-12-27 12:30:04 +01:00
Paul B Mahol
9ce96a744d avfilter/af_headphone: fix regression after 7c201e420 2018-12-26 10:41:41 +01:00
Paul B Mahol
6c7eb0708e avfilter/af_headphone: speed up fast convolution
Do IFFT only once per output channel.
2018-12-25 19:17:25 +01:00
Paul B Mahol
3bc711a267 avfilter/af_headphone: do not reduce LFE gain too much 2018-12-24 15:24:20 +01:00
Paul B Mahol
7c201e420a avfilter/af_headphone: fix filtering of non-power of 2 length IRs in time domain 2018-12-22 20:47:02 +01:00
Paul B Mahol
47ba085472 avfilter/af_headphone: use fabsf() instead of fabs() 2018-12-21 12:06:03 +01:00
Paul B Mahol
0f2cfa3d80 avfilter/af_headphone: do not leak input frames on error 2018-11-12 09:38:30 +01:00
Martin Vignali
75625c555c avfilter/af_headphone : fix mem leak
report by coverity
CID 1439934
CID 1439935
2018-11-09 21:55:32 +01:00
Paul B Mahol
6725fd8b0f avfilter/af_headphone: use lavfi internal queue instead
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-10-04 12:10:20 +02:00
Paul B Mahol
9cf0079638 avfilter/af_headphone: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 18:29:34 +02:00
Paul B Mahol
e1c8bd2389 avfilter/af_headphone: fix type=time with hrir=multich
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 09:31:11 +02:00
Paul B Mahol
3e003a985f avfilter/af_headphone: add single hrir multichannel stream mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-15 16:08:28 +02:00
Paul B Mahol
a56580b117 avfilter/af_headphone: fix memory leak and overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 19:42:16 +02:00
Paul B Mahol
8daca7697b avfilter/af_headphone: do not output invalid samples when flushing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 18:38:54 +02:00
Paul B Mahol
01170e9db0 avfilter/af_headphone: fix flushing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 17:51:26 +02:00
Paul B Mahol
2b0f821f51 avfilter/af_headphone: improve performance and reduce latency
Remove not needed code.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-14 17:28:26 +02:00
Paul B Mahol
4073046089 avfilter/af_headphone: add missing error check
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-20 13:54:04 +01:00
Paul B Mahol
5d07275529 avfilter/af_headphone: increase max ir length
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-09-25 12:12:13 +02:00
Paul B Mahol
13f9639e3e avfilter/af_headphone: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-25 09:45:20 +02:00
Paul B Mahol
f483949188 avfilter/af_headphone: do not free frame that's gonna be reused later
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 19:15:57 +02:00
Paul B Mahol
9b667f609c avfilter/af_headphone: fix possible memory leaks on failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-15 11:19:12 +02:00
Paul B Mahol
d4d1fc823f avfilter: add native headphone spatialization filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-12 18:08:52 +02:00