This is possible now that the next-API is gone.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
av_gettime_relative() is using the monotonic clock therefore more suitable for
relative time calculations.
Signed-off-by: Marton Balint <cus@passwd.hu>
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/*(.)
Despite its name, this function is not part of the public API, as
formats.h, the header containing its declaration, is a private header.
The formats API was once public API, but that changed long ago
(b74a1da49d, the commit scheduling it to
become private, is from 2012). That avfilter_make_format64_list() was
forgotten is probably a result of the confusion resulting from the
libav-ffmpeg split.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
correct output pts based on input pts
make seeking possible
output frame one by one on eof
tested with showinfo filter
Suggested-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
fix default basefreq/endfreq comparison
on platform that does not do comparison
in double type
found on zeranoe 32-bit build, where
default freq range is detected as non-default
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
this makes draw_bar faster
slightly different result with old version
check result (with ~3 minutes audio file):
old:
real 0m49.611s
user 0m49.260s
sys 0m0.073s
new:
real 0m47.606s
user 0m47.378s
sys 0m0.068s
PSNR between old and new:
yuv444p PSNR
y:109.519298 u:107.506485 v:104.746878
average:106.816074 min:99.167305 max:inf
yuv422p PSNR
y:109.519298 u:108.025801 v:104.489734
average:107.279817 min:98.007467 max:inf
yuv420p PSNR
y:109.519298 u:108.363875 v:105.290200
average:108.261511 min:97.461812 max:inf
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Should fix build on x86_32-msvc2012
The alternative of emulating fmin/fmax* turns out to be non trivial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
add yuv444p, yuv422p, and yuv420p output format (lower cpu usage
on ffplay playback because it does not do format conversion)
custom size with size/s option (fullhd option is deprecated)
custom layout with bar_h, axis_h, and sono_h option
support rational frame rate (within fps/r/rate option)
relaxed frame rate restriction (support fractional sample step)
support all input sample rates
separate sonogram and bargraph volume (with volume/sono_v and
volume2/bar_v)
timeclamp option alias (timeclamp/tc)
fcount option
gamma option alias (gamma/sono_g and gamma2/bar_g)
support custom frequency range (basefreq and endfreq)
support drawing axis using external image file (axisfile option)
alias for disabling drawing to axis (text/axis)
possibility to optimize it using arch specific asm code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
It is well known that fabs and fabsf are at least as fast and sometimes
faster than the FFABS macro, at least on the gcc+glibc combination.
For instance, see the reference:
http://patchwork.sourceware.org/patch/6735/.
This was a patch to glibc in order to remove their usages of a macro.
The reason essentially boils down to fabs using the __builtin_fabs of
the compiler, while FFABS needs to infer to not use a branch and to
simply change the sign bit. Usually the inference works, but sometimes
it does not. This may be easily checked by looking at the asm.
This also has the added benefit of reducing macro usage, which has
problems with side-effects.
Note that avcodec is not handled here, as it is huge and
most things there are integer arithmetic anyway.
Tested with FATE.
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
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>
faster initialization and less code
slightly different result computationally from previous
coeffclamp option is ignored
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
benchmark (on intel core2 duo, gcc 4.9.1)
input samples duration 00:03:39.59
command: time -p ffmpeg -f f32le -ac 2 -ar 44100 -i input.pcm \
-filter_complex showcqt=fullhd=0:gamma=$gamma \
-f rawvideo -y /dev/null
gamma previous modified
1 48.49 s 45.38 s
2 49.33 s 48.11 s
3 80.86 s 59.80 s
4 80.84 s 51.25 s
5 80.75 s 61.06 s
6 80.93 s 61.80 s
7 80.03 s 61.56 s
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add a tlength option with frequency and timeclamp variable
Add to the volume option support for frequency and timeclamp variable,
a_weighting, b_weighting and c_weighting functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The loop with fminf() changes from 18093856 to 17403218 dezicycles (gcc 4.6.3, sandybridge i7)
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>