1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

75 Commits

Author SHA1 Message Date
Paul B Mahol
13ea7c9780 avfilter/avf_showspectrum: improve pts handling
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-12 17:14:30 +01:00
Paul B Mahol
4e17efd852 avfilter/avf_showfreqs/showspectrum: rename skip_samples to hop_size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-18 19:38:14 +01:00
Paul B Mahol
57df71eaf7 avfilter/avf_showspectrum: reduce number of operations
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-12 21:21:50 +01:00
Paul B Mahol
2009d922db avfilter/avf_showspectrum: add posibility to display phase
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-12 21:21:50 +01:00
Timothy Gu
53d6bf6627 avf_showspectrum: Silence "deprecated pixel format" warning 2016-01-09 15:32:31 -08:00
Paul B Mahol
cbad37e5bf avfilter/avf_showspectrum: set color range to frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-09 20:09:52 +01:00
Paul B Mahol
a69cf50dca avfilter/avf_showspectrum: add cool color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-08 18:01:11 +01:00
Paul B Mahol
08aec7c1bd avfilter/avf_showspectrum: add option to draw legend
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-08 11:51:46 +01:00
Ganesh Ajjanagadde
2fbdc4faf1 lavfi/avf_showspectrum: replace pow(x, 0.25) by sqrt(sqrt(x))
This is faster; precision assured as result is a float.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2016-01-07 16:57:20 -08:00
Paul B Mahol
c13216ac08 avfilter/window_func: add tukey window function
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 11:37:11 +01:00
Paul B Mahol
c31fa1d7b4 avfilter/avf_showspectrum: use av_clip/lrintf
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 10:07:59 +01:00
Paul B Mahol
0d3b31ae89 avfilter/avf_showspectrum: add yet another color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-05 10:07:58 +01:00
Paul B Mahol
6defda1cdb avfilter/avf_showspectrum: add option to set gain for calculating color intensity
Inspired by Sonic Visualizer.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-04 14:06:51 +01:00
Paul B Mahol
0a451082c7 avfilter/avf_showspectrum: finally fix log scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-03 23:09:43 +01:00
Paul B Mahol
14caf9667e avfilter/avf_showspectrum: switch to FFT
Rationale: supports >16 bit audio, more than 96dB SNR.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-03 23:09:43 +01:00
Paul B Mahol
af018d802d avfilter/avf_showspectrum: add 4th and 5th root scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
2b172cb625 avfilter/avf_showspectrum: make some helper functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
d35c029cbf avfilter/avf_showspectrum: fix null pointer dereference if allocation fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
9b06e7befa avfilter/avf_showspectrum: add fiery color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
72280d1c6c avfilter: add showspectrumpic filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
7f7a9dd782 avfilter/avf_showspectrum: store win_size in private context and calculate it only once
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-02 18:53:09 +01:00
Paul B Mahol
15e1fd9883 avfilter/avf_showspectrum: add window overlap support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-31 12:29:58 +01:00
Paul B Mahol
b98c58573b avfilter/avf_showspectrum: add fire color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-31 11:44:18 +01:00
Paul B Mahol
0f387f2b62 avfilter/avf_showspectrum: add nebulae color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-30 21:28:52 +01:00
Paul B Mahol
2893dbfe2c avfilter/avf_showspectrum: add moreland color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-30 18:53:24 +01:00
Paul B Mahol
b0e23f2a37 avfilter/avf_showspectrum: add rainbow colormap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-29 19:53:38 +01:00
Paul B Mahol
efa666e0da avfilter/avf_showspectrum: properly calculate w factor
It is used in calculating loudness of each frequency bin.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-29 12:11:33 +01:00
Paul B Mahol
e30e5c83ae avfilter/avf_showspectrum: add horizontal orientation support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-29 12:11:33 +01:00
Paul B Mahol
a7bf5f4117 avfilter/avf_showspectrum: use FF_ARRAY_ELEMS()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 23:04:40 +01:00
Paul B Mahol
4020787b5b avfilter/avf_showspectrum: make colors for log scale more user friendly
Previosly output was almost useless because background noise, due to
windowing function picked and which is not actually present in audio,
had too much brightness.
Now output of sine wave matches more with SoX.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 20:38:06 +01:00
Paul B Mahol
f88546b426 avfilter/avf_showspectrum: use ff_generate_window_func
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 18:58:46 +01:00
Paul B Mahol
67771ac4b8 avfilter/avf_showspectrum: add rscroll sliding mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-28 18:16:10 +01:00
Ganesh Ajjanagadde
3e2e303e4b lavfi/avf_showspectrum: replace rint by lrint
avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-26 20:29:22 -08:00
Ganesh Ajjanagadde
ec66bcc0e7 avfilter/avf_showspectrum: use log10 instead of log()/...
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:55:10 -04:00
Ganesh Ajjanagadde
6aaac24d72 avfilter/all: propagate errors of functions from avfilter/formats
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.

All of these were found by using av_warn_unused_result, demonstrating its utility.

Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.

Fixes: CID 1325680, 1325679, 1325678.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-14 10:04:01 -04:00
Nicolas George
35c3043ea4 lavfi/avf_showspectrum: reindent after last commit. 2015-10-07 19:05:13 +02:00
Nicolas George
9a520c4d52 lavfi/avf_showspectrum: remove looping on request_frame(). 2015-10-07 19:00:22 +02:00
Paul B Mahol
40ddbc87c5 avfilter/avf_showspectrum: use av_calloc() 2015-08-06 15:06:14 +02:00
Paul B Mahol
63c442e3b1 avfilter/avf_showspectrum: reindent 2015-08-04 15:18:51 +02:00
Michael Niedermayer
7ff296be9f avfilter/avf_showspectrum: Change enums to int, which are accessed via AVOption as int
This fixes depending on implementation defined behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-02 04:08:14 +01:00
Michael Niedermayer
a5cbff22b2 avfilter/avf_showspectrum: fix colums typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-20 18:49:01 +02:00
Nicolas George
638eec2ac3 lavfi/avf_showspectrum: check RDFT context init.
Fix a segfault with large window size.
2014-08-14 15:11:39 +02:00
Nicolas George
7c10e32ae5 lavfi/avf_showspectrum: add full frame sliding mode. 2014-08-14 14:59:23 +02:00
Nicolas George
ec33df6045 lavfi/avf_showspectrum: use automatic framing.
The framework can ensure that each input frame has exactly
the correct number of samples, except the last one.
2014-08-14 14:59:19 +02:00
Nicolas George
d4de6d4fad lavfi/avf_showspectrum: do not push the frame at EOF.
It is always identical to the last pushed frame.
The samples in the last incomplete window were ignored,
this is unchanged.
Possible enhancement: pad the last incomplete window with
silence.
2014-08-14 14:23:59 +02:00
Nicolas George
65b284a4ae lavfi/avf_showspectrum: fix output pts computation. 2014-08-14 14:23:59 +02:00
Nicolas George
a3aaaec891 lavfi/avf_showspectrum: set output frame rate. 2014-08-14 14:23:59 +02:00
Michael Niedermayer
04776cedec avfilter/avf_showspectrum: fix macro ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-21 23:11:16 +02:00
Clément Bœsch
ddaf543aa6 avfilter/showspectrum: use 0 dummies for range in const.
This is consistent with other options.
2013-11-20 16:38:09 +01:00
Clément Bœsch
9343fc30e2 avfilter/showspectrum: reindent const options. 2013-11-20 16:37:34 +01:00