Commit Graph

15 Commits

Author SHA1 Message Date
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt c00cd007e8 configure: Remove av_restrict
All versions of MSVC that support C11 (namely >= v19.27)
also support the restrict keyword, therefore av_restrict
is no longer necessary since 75697836b1.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-15 12:51:15 +01:00
Johannes Kauffmann a11e745b97 lavu/fixed_dsp: add missing av_restrict qualifiers
The butterflies_fixed function pointer declaration specifies av_restrict
for the first two pointer arguments. So the corresponding function
definitions should honor this declaration.

MSVC emits warning C4113 for this.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-10-04 10:56:12 +02:00
Rémi Denis-Courmont c1bb19e263 lavu/fixeddsp: RISC-V V butterflies_fixed 2022-09-27 13:19:52 +02:00
Andreas Rheinhardt 40e6575aa3 all: Replace if (ARCH_FOO) checks by #if ARCH_FOO
This is more spec-compliant because it does not rely
on dead-code elimination by the compiler. Especially
MSVC has problems with this, as can be seen in
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html
or
https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html

This commit does not eliminate every instance where we rely
on dead code elimination: It only tackles branching to
the initialization of arch-specific dsp code, not e.g. all
uses of CONFIG_ and HAVE_ checks. But maybe it is already
enough to compile FFmpeg with MSVC with whole-programm-optimizations
enabled (if one does not disable too many components).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-06-15 04:56:37 +02:00
Andreas Rheinhardt 636631d9db Remove unnecessary libavutil/(avutil|common|internal).h inclusions
Some of these were made possible by moving several common macros to
libavutil/macros.h.

While just at it, also improve the other headers a bit.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Michael Niedermayer 4a02ae49c2 avutil/fixed_dsp: Fix integer overflows in butterflies_fixed_c()
Fixes: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'
Fixes: 23646/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5480991098667008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-19 00:37:45 +02:00
James Almer dee579ffcd x86/fixed_dsp: add ff_butterflies_fixed_sse2
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-16 21:09:38 -03:00
James Almer 6fb96afdd6 avutil/fixed_dsp: remove ff_ prefix from static function
Signed-off-by: James Almer <jamrial@gmail.com>
2015-06-20 03:39:09 -03:00
Nedeljko Babic 1a06d0935f libavutil: Add new fixed dsp functions.
Add functions needed for implementation of fixed point aac dec.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-03 22:50:53 +02:00
Nedeljko Babic e374405d8e libavutil: Cosmetic changes to fixed_dsp file.
Names of functions vector_fmul_window_fixed_c and
vector_fmul_window_fixed_scaled_c are changed by removing "_fixed"
from the name since it is redundant.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 19:46:00 +02:00
Michael Niedermayer c3b6454d80 avutil/fixed_dsp: Check for av_malloc() failure
Fixes CID1271051

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 16:27:28 +01:00
Michael Niedermayer 64e0369808 avutil/fixed_dsp: Use av_clip_int16() instead of the non optimized av_clip_int16_c()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-15 00:43:32 +01:00
Michael Niedermayer d506deaeaa avutil/fixed_dsp: remove redundant cast
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01 17:57:30 +02:00
Nedeljko Babic 284cfc7180 libavutil: Add fixed_dsp
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-01 17:36:33 +02:00