aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/options.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+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>
* avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUTJames Almer2024-03-071-22/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* all: use designated initializers for AVOption.unitAnton Khirnov2024-02-141-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | Makes it robust against adding fields before it, which will be useful in following commits. Majority of the patch generated by the following Coccinelle script: @@ typedef AVOption; identifier arr_name; initializer list il; initializer list[8] il1; expression tail; @@ AVOption arr_name[] = { il, { il1, - tail + .unit = tail }, ... }; with some manual changes, as the script: * has trouble with options defined inside macros * sometimes does not handle options under an #else branch * sometimes swallows whitespace
* swr/swresample: avoid reapplication of firstptsGyan Doshi2023-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | During a resampling operation where 1) user has specified first_pts 2) SWR_FLAG_RESAMPLE is not set initially (directly or otherwise) 3) first_pts has been fulfilled (always using hard compensation) then upon first encountering a delay where a soft compensation is required, swr_set_compensation will lead to another init of swr which will reset outpts to the specified firstpts thus leading to an output frame having its pts = firstpts. When the next input frame is received, swr will see a large delay and inject silence from firstpts to the current frame's pts. This can lead to severe desync and in worst case, loss of audio playback. Parameter firstpts initialized to AV_NOPTS_VALUE in swr_alloc and then checked in swr_init to avoid resetting outpts, thus avoiding reapplication of firstpts. Fixes #4131.
* swresample/swresample: add a used channel layout option using the new APIJames Almer2023-02-191-2/+4
| | | | | | Replaces the "used channel count" option, which is now deprecated. Signed-off-by: James Almer <jamrial@gmail.com>
* swresample: convert to new channel layout APIJames Almer2022-03-151-8/+25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-221-0/+1
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swresample/options: enable linear_interp and exact_rational by defaultMuhammad Faiz2017-03-171-2/+2
| | | | | | better quality without speedloss Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* swresample: Skip over dither steps if dithering scale is 0Michael Niedermayer2016-08-181-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swresample: add exact_rational optionMuhammad Faiz2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | give high quality resampling as good as with linear_interp=on as fast as without linear_interp=on tested visually with ffplay ffplay -f lavfi "aevalsrc='sin(10000*t*t)', aresample=osr=48000, showcqt=gamma=5" ffplay -f lavfi "aevalsrc='sin(10000*t*t)', aresample=osr=48000:linear_interp=on, showcqt=gamma=5" ffplay -f lavfi "aevalsrc='sin(10000*t*t)', aresample=osr=48000:exact_rational=on, showcqt=gamma=5" slightly speed improvement for fair comparison with -cpuflags 0 audio.wav is ~ 1 hour 44100 stereo 16bit wav file ffmpeg -i audio.wav -af aresample=osr=48000 -f null - old new real 13.498s 13.121s user 13.364s 12.987s sys 0.131s 0.129s linear_interp=on old new real 23.035s 23.050s user 22.907s 22.917s sys 0.119s 0.125s exact_rational=on real 12.418s user 12.298s sys 0.114s possibility to decrease memory usage if soft compensation is ignored Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* swresample: use AV_OPT_TYPE_BOOL for linear_interp and cheby optionsClément Bœsch2015-12-041-2/+2
|
* swresample: allow double precision beta value for the Kaiser windowGanesh Ajjanagadde2015-11-081-1/+1
| | | | | | | | | | | | | Kaiser windows inherently don't require beta to be an integer. This was an arbitrary restriction. Moreover, soxr does not require it, and in fact often estimates beta to a non-integral value. Thus, this patch allows greater flexibility for swresample clients. Micro version is updated. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* swr: do not reject channel layouts that use channel 63wm42015-10-281-4/+4
| | | | Channel layouts are essentially uint64_t, and every value is valid.
* doc/resampler, swresample/options: use proper capitalizationGanesh Ajjanagadde2015-10-101-7/+7
| | | | | | | | | | | | | | Proper names should be capitalized in all user facing API as far as possible. The option names themselves have not been changed since: 1. We consistently keep option names in lower case. 2. Changing them would break existing scripts. 3. I suspect that we want to be similar to Sox and its relevant options. The converse is also true: improper names should not be capitalized generally. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swr: Remember previously set int_sample_format from userMichael Niedermayer2015-06-221-2/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Allow reinitialization without ever setting channel layoutsMichael Niedermayer2015-04-121-4/+4
|
* swresample: Allow reinitialization without ever setting channel countsMichael Niedermayer2015-04-121-6/+6
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: split option table to a separate fileTimothy Gu2014-07-061-0/+155
Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>