aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/audioconvert.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-1/+1
| | | | | | | | | | | 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>
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-151-3/+7
| | | | | | | | | | | | | | | | | | 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>
* libswresample/audioconvert: Fix undefined NULL + 0Andreas Rheinhardt2021-04-011-2/+2
| | | | | | Affected 26 FATE tests like swr-resample_async-s16p-44100-8000. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swresample/audioconvert: Fix left shift of negative valueAndreas Rheinhardt2020-09-301-1/+1
| | | | | | | Fixes ticket #8219. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swresample/audioconvert: fix invalid left shift for 64bit sample formatPaul B Mahol2019-09-261-4/+4
| | | | Fixes #8002.
* build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-06-211-1/+1
| | | | | | | | None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
* swresample: add int64 sample formatPaul B Mahol2016-08-181-0/+22
|
* swresample/audioconvert: Fix undefined behavior (left shift of negative value)Michael Niedermayer2014-10-081-2/+2
| | | | | | | Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: aarch64 audio_convert and neon clobber testMichael Niedermayer2014-08-271-0/+1
| | | | | | | Ported from avresample Code by: Mans Rullgard, Janne Grunau, Martin Storsjo Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/audioconvert: fix () in FMT_PAIR_FUNC()Michael Niedermayer2014-06-181-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* audioconvert: support simd code with specific alignment requirements.Michael Niedermayer2012-12-141-1/+17
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: make sure the last data element is NULL so we can use it to detect the ↵Michael Niedermayer2012-09-241-0/+1
| | | | | | number of channels Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ARM: libswresample: NEON optimised flat float to s16 conversionMans Rullgard2012-09-241-0/+1
| | | | | Adapted to swr by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix warning: passing argument 2 of ctx->simd_f from incompatible ↵Michael Niedermayer2012-07-021-2/+2
| | | | | | pointer type Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: use &~15Michael Niedermayer2012-06-121-1/+1
| | | | | Idea-by: reimar (and ubitux on IRC) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: replace /16 by >>4Michael Niedermayer2012-06-121-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix silence buffer for planar U8Michael Niedermayer2012-05-071-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix cpy() after the len was changed to be in samples.Michael Niedermayer2012-05-071-3/+18
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: audioconvert: consider mono to be planarMichael Niedermayer2012-05-061-0/+6
| | | | | | This way it will be handled by the planar==planar SIMD Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: update calling code to support mixed packed planar SIMDMichael Niedermayer2012-05-051-6/+10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: change simd len argument to be in samples instead of dst bytes.Michael Niedermayer2012-05-051-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: use memcpy when input and output matchMichael Niedermayer2012-04-291-0/+7
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add int16_to_int32_mmx/sseMichael Niedermayer2012-04-281-2/+20
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: move AudioConvert to headerMichael Niedermayer2012-04-281-9/+0
| | | | | | the next commits will need it Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: change sample format representation so as to maintain the planer/packed ↵Michael Niedermayer2012-04-281-1/+1
| | | | | | distinction. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: unroll audioconvert core C functionMichael Niedermayer2012-04-271-2/+9
| | | | | | 36k->32k decicycles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: audioconvert, mark some constants as floats.Michael Niedermayer2012-04-271-3/+3
| | | | | | idea from avr Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* indeo4, swresample: add some missing static/const to tables.Reimar Döffinger2012-01-081-1/+1
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* swr: handle correctly muted channel with u8 sample fmt.Clément Bœsch2011-11-291-3/+5
|
* swr: make audio convert code explicitely private.Clément Bœsch2011-11-171-9/+9
| | | | Only what's declared in libswresample/swresample.h is public.
* swr: move format convert code to dedicated functions.Clément Bœsch2011-11-161-39/+77
| | | | This should easier common case optimizations.
* ffmpeg: add -map_channel option.Clément Bœsch2011-11-041-3/+8
| | | | Based on an initial work by Baptiste Coudurier.
* Add libswresample.Michael Niedermayer2011-09-191-0/+113
Similar to libswscale this does resampling and format convertion, just for audio instead of video. changing sampling rate, sample formats, channel layouts and sample packing all in one with a very simple public interface. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>