1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Ganesh Ajjanagadde
e5d771c84d avfilter/avf_showfreqs: avoid wasteful pow
pow is a ridiculous function for computing a simple Gaussian.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-09 20:07:49 -05:00
Ganesh Ajjanagadde
8507b98c10 avfilter,swresample,swscale: use fabs, fabsf instead of FFABS
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>
2015-10-22 16:13:26 -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
44f660e7e7 lavfi: remove FF_LINK_FLAG_REQUEST_LOOP.
It has no longer any effect.
2015-09-20 19:02:33 +02:00
Paul B Mahol
f2b1df735e avfilter/avf_showfreqs: add lanczos and gauss windowing functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-15 09:28:40 +00:00
Michael Niedermayer
8ca97b5e4f avfilter/avf_showfreqs: Fix memleak of out frame
Fixes CID1322344

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:46:18 +02:00
Michael Niedermayer
0ada8ec1a5 avfilter/avf_showfreqs: Fix "may be used uninitialized in this function" warning
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:34:35 +02:00
Michael Niedermayer
7213d3fbf3 avfilter/avf_showfreqs: Free fin
Fixes CID1322345

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 15:32:00 +02:00
Michael Niedermayer
629fcda4da avfilter/avf_showfreqs: Use floating point division in WFUNC_BHANN
Fixes: CID1322365

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-03 18:54:14 +02:00
Paul B Mahol
2fa019958b avfilter: add showfreqs filter 2015-08-19 16:15:13 +00:00