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

15 Commits

Author SHA1 Message Date
Ganesh Ajjanagadde
c7131762c0 all: add const-correctness to qsort comparators
This adds const-correctness when needed for the comparators.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-25 10:07:20 -04: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
Michael Niedermayer
fb42e77516 swresample/swresample-test: Make layouts static const
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-30 13:10:11 +02:00
Michael Niedermayer
ff50b1b13b swresample/swresample-test: Randomly wipe out channel counts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-12 22:21:53 +02:00
Michael Niedermayer
37013fd018 swresample/swresample-test: Add () to protect uint_rand() argument
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-16 23:09:09 +01:00
Michael Niedermayer
74be0f82a7 swresample-test: make it independant of the internal SWR_CH_MAX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 01:15:43 +02:00
Lou Logan
88f2586adb fix various typos
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-03 10:58:19 -08:00
Michael Niedermayer
24244cec2f swr-test: Fix clip to 32bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-04 04:05:59 +01:00
Paul B Mahol
1acd2f6ba7 Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
Also remove it in once case when it is not needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-11-13 13:21:21 +00:00
Michael Niedermayer
9de5b11d58 swr-test: fix division by 0
Fixes CID733739
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 19:40:57 +02:00
Michael Niedermayer
dd3e5baa59 swr-test: check pointers before use
Fixes: CID733807, CID733806
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 19:39:25 +02:00
Michael Niedermayer
13a215236b swr-test: avoid VLA
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-06 13:48:47 +02:00
Michael Niedermayer
323d912010 swr: update copyright years
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-07 00:29:06 +02:00
Michael Niedermayer
787c395a30 swr-test: support "--help"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-05 17:27:38 +02:00
Michael Niedermayer
63b1c08073 buildsys: fix rules for swresample-test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-05 17:27:38 +02:00