Paul B Mahol
57df71eaf7
avfilter/avf_showspectrum: reduce number of operations
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
2009d922db
avfilter/avf_showspectrum: add posibility to display phase
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Timothy Gu
53d6bf6627
avf_showspectrum: Silence "deprecated pixel format" warning
9 years ago
Paul B Mahol
cbad37e5bf
avfilter/avf_showspectrum: set color range to frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
a69cf50dca
avfilter/avf_showspectrum: add cool color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
08aec7c1bd
avfilter/avf_showspectrum: add option to draw legend
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
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>
9 years ago
Paul B Mahol
c13216ac08
avfilter/window_func: add tukey window function
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
c31fa1d7b4
avfilter/avf_showspectrum: use av_clip/lrintf
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
0d3b31ae89
avfilter/avf_showspectrum: add yet another color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
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>
9 years ago
Paul B Mahol
0a451082c7
avfilter/avf_showspectrum: finally fix log scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
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>
9 years ago
Paul B Mahol
af018d802d
avfilter/avf_showspectrum: add 4th and 5th root scaler
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
2b172cb625
avfilter/avf_showspectrum: make some helper functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
d35c029cbf
avfilter/avf_showspectrum: fix null pointer dereference if allocation fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
9b06e7befa
avfilter/avf_showspectrum: add fiery color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
72280d1c6c
avfilter: add showspectrumpic filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
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>
9 years ago
Paul B Mahol
15e1fd9883
avfilter/avf_showspectrum: add window overlap support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
b98c58573b
avfilter/avf_showspectrum: add fire color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
0f387f2b62
avfilter/avf_showspectrum: add nebulae color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
2893dbfe2c
avfilter/avf_showspectrum: add moreland color map
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
b0e23f2a37
avfilter/avf_showspectrum: add rainbow colormap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
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>
9 years ago
Paul B Mahol
e30e5c83ae
avfilter/avf_showspectrum: add horizontal orientation support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
a7bf5f4117
avfilter/avf_showspectrum: use FF_ARRAY_ELEMS()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
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>
9 years ago
Paul B Mahol
f88546b426
avfilter/avf_showspectrum: use ff_generate_window_func
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Paul B Mahol
67771ac4b8
avfilter/avf_showspectrum: add rscroll sliding mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Ganesh Ajjanagadde
3e2e303e4b
lavfi/avf_showspectrum: replace rint by lrint
avoids float to int cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
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>
9 years ago
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>
9 years ago
Nicolas George
35c3043ea4
lavfi/avf_showspectrum: reindent after last commit.
9 years ago
Nicolas George
9a520c4d52
lavfi/avf_showspectrum: remove looping on request_frame().
9 years ago
Paul B Mahol
40ddbc87c5
avfilter/avf_showspectrum: use av_calloc()
9 years ago
Paul B Mahol
63c442e3b1
avfilter/avf_showspectrum: reindent
9 years ago
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>
10 years ago
Michael Niedermayer
a5cbff22b2
avfilter/avf_showspectrum: fix colums typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Nicolas George
638eec2ac3
lavfi/avf_showspectrum: check RDFT context init.
Fix a segfault with large window size.
10 years ago
Nicolas George
7c10e32ae5
lavfi/avf_showspectrum: add full frame sliding mode.
10 years ago
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.
10 years ago
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.
10 years ago
Nicolas George
65b284a4ae
lavfi/avf_showspectrum: fix output pts computation.
10 years ago
Nicolas George
a3aaaec891
lavfi/avf_showspectrum: set output frame rate.
10 years ago
Michael Niedermayer
04776cedec
avfilter/avf_showspectrum: fix macro ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
ddaf543aa6
avfilter/showspectrum: use 0 dummies for range in const.
This is consistent with other options.
11 years ago
Clément Bœsch
9343fc30e2
avfilter/showspectrum: reindent const options.
11 years ago
Clément Bœsch
9c8b240806
avfilter/showspectrum: add blackman window.
11 years ago
Clément Bœsch
3e69f7c221
avfilter/showspectrum: add win_func option.
11 years ago