Commit Graph

8 Commits

Author SHA1 Message Date
Sebastian Dröge ed3da72583 s->target_i and global are in dB but s->target_tp and true_peak are
linear. Instead of mixing these in the calculations, convert the former
first to have all following calculations in the same unit.

Signed-off-by: Kyle Swanson <k@ylo.ph>
2020-05-01 21:36:07 -07:00
Niklas Haas 7c82e0f61e avfilter/af_loudnorm: correctly initialize PTS
Right now, the PTS always starts out as 0, which causes problems on a
seek or when inserting this filter mid-stream.

Initialize it instead to AV_NOPTS_VALUE and copy the PTS from the first
frame instead if this is the case.
2018-02-14 18:10:53 +01:00
Paul B Mahol 88cbd25b19 avfilter: pass outlink to ff_get_audio_buffer()
This is more correct.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-03 22:52:47 +01:00
Kyle Swanson f3d8e0d369 avfilter/af_loudnorm: do not upsample during second-pass linear normalization
Signed-off-by: Kyle Swanson <k@ylo.ph>
2017-04-05 11:43:12 -05:00
Marton Balint 005d058f42 lavfi/loudnorm: add an internal libebur128 library
Also contains the following changes to the library:
- add ff_ prefix to functions
- remove cplusplus defines.
- add FF_ prefix to contants and some structs
- remove true peak calculation feature, since it uses its own resampler, and
  af_loudnorm does not need it.
- remove version info and some fprintf(stderr) functions
- convert to use av_malloc
- always use histogram mode for LRA calculation, otherwise LRA data is slowly
  consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
  BSD style linked list implementation which is probably not available on all
  platforms. So let's just remove the classic mode which not uses histogram.
- add ff_thread_once for calculating static histogram tables
- convert some functions to void which cannot fail
- remove intrinsics and some unused headers
- add support for planar audio
- remove channel / sample rate changer function, in ffmpeg usually we simply
  alloc a new context
- convert some static variables to defines
- declare static histogram variables as aligned
- convert some initalizations to mallocz
- add window size parameter to init function and remove window size setter
  function
- convert return codes to AVERROR
- fix indentation

Signed-off-by: Marton Balint <cus@passwd.hu>
2016-11-11 19:37:54 +01:00
Kyle Swanson 765703498a avfilter/af_loudnorm: add dual_mono option
Signed-off-by: Kyle Swanson <k@ylo.ph>
2016-06-09 13:06:30 -05:00
Paul B Mahol defb960a47 avfilter/af_loudnorm: fix crash when ebur128 initialization was not successfull/complete
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-05-21 19:23:04 +02:00
Kyle Swanson c0c378009b avfilter: add loudnorm
Signed-off-by: Kyle Swanson <k@ylo.ph>
2016-05-18 22:15:01 +02:00