740f5105d5 
								
							
								 
							
						 
						
							
							
								
								swresample: Use double and float for matrixes for best quality and speed  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								30b2611ed3 
								
							
								 
							
						 
						
							
							
								
								swresample: Skip over dither steps if dithering scale is 0  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b8c6e5a661 
								
							
								 
							
						 
						
							
							
								
								swresample: add exact_rational option  
							
							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> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								180f9a0958 
								
							
								 
							
						 
						
							
							
								
								all: Make header guard names consistent  
							
							
								
							
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1bed09a30e 
								
							
								 
							
						 
						
							
							
								
								swresample: allow double precision beta value for the Kaiser window  
							
							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> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ef62f573ca 
								
							
								 
							
						 
						
							
							
								
								swresample/swresample_internal: add av_warn_unused_result  
							
							This will trigger a few warnings that need to be fixed.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a77401e1f7 
								
							
								 
							
						 
						
							
							
								
								lswr: Allow 64 channels internally.  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d4325b2fea 
								
							
								 
							
						 
						
							
							
								
								swr: Remember previously set int_sample_format from user  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c70c6be225 
								
							
								 
							
						 
						
							
							
								
								swresample: soxr implementation for swr_get_out_samples()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								cc17b43d8d 
								
							
								 
							
						 
						
							
							
								
								swresample: Add swr_get_out_samples()  
							
							Previous version reviewed-by: Pavel Koshevoy <pkoshevoy@gmail.com>
Previous version reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								196b885a5f 
								
							
								 
							
						 
						
							
							
								
								swresample/dither: check memory allocation  
							
							check memory allocation in swri_get_dither()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								80a28c7509 
								
							
								 
							
						 
						
							
							
								
								swresample: Allow reinitialization without ever setting channel layouts  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d7b9cb2f7a 
								
							
								 
							
						 
						
							
							
								
								swresample: Allow reinitialization without ever setting channel counts  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4d00860ac7 
								
							
								 
							
						 
						
							
							
								
								swresample: Add prefix to soxr_resampler  
							
							also move declaration to header
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b74ecb82fa 
								
							
								 
							
						 
						
							
							
								
								swresample/x86/rematrix_init: Check av_malloc* return codes, forward errors  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9d7ae72725 
								
							
								 
							
						 
						
							
							
								
								swresample: Use int instead of enum for fields which are accessed through AVOptions as int  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6efd0ba977 
								
							
								 
							
						 
						
							
							
								
								swresample_internal.h: Move struct declaration before first use.  
							
							It seems more logical and works with more restricted C compilers
like tinycc.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7c51f5bd39 
								
							
								 
							
						 
						
							
							
								
								swr: aarch64 audio_convert and neon clobber test  
							
							Ported from avresample
Code by:  Mans Rullgard, Janne Grunau, Martin Storsjo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								97f8c7a03e 
								
							
								 
							
						 
						
							
							
								
								bump libpostproc and libswresample  
							
							this is needed / avoids some headaches  as one of their dependancies
(libavutil) was bumped
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								39a6e02fd4 
								
							
								 
							
						 
						
							
							
								
								fix spelling errors  
							
							Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								42a92a240d 
								
							
								 
							
						 
						
							
							
								
								swr: remove obsolete resample prototypes  
							
							Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b785c62681 
								
							
								 
							
						 
						
							
							
								
								swr: handle initial negative sample index outside DSP function.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e2b718464e 
								
							
								 
							
						 
						
							
							
								
								swresample: Make rematrix maxvalue user settable  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4cfc92081d 
								
							
								 
							
						 
						
							
							
								
								swr: add native_simd_one  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8b3affda87 
								
							
								 
							
						 
						
							
							
								
								swr: support a seperate output sample bits.  
							
							This avoids user apps having to mangle dither scale. for pcm24
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								00cae86754 
								
							
								 
							
						 
						
							
							
								
								swr: support first_pts  
							
							Trolled-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								db4e0ecaf0 
								
							
								 
							
						 
						
							
							
								
								swr: move silence buffer to context to avoid per use malloc/free  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dc6588421e 
								
							
								 
							
						 
						
							
							
								
								swr: move buffer used to discard sample to context  
							
							This avoids the need to allocate & free to repeatly
Fixes Ticket2122
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e5a736261b 
								
							
								 
							
						 
						
							
							
								
								swr: Use a temporary buffer for dither/Noise shaping when the input is read only  
							
							This avoids copying the input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2eec98125e 
								
							
								 
							
						 
						
							
							
								
								swr: mark noise data for noise shaping as const  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								558aa6cab7 
								
							
								 
							
						 
						
							
							
								
								swr: add seperate in/out pointers to the noise shaping code  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fca51256d4 
								
							
								 
							
						 
						
							
							
								
								swr: rename dither_pos to noise_pos  
							
							THis more closely matches what the field represents
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ead3a2a37e 
								
							
								 
							
						 
						
							
							
								
								swr: add noise_scale field to seperate it from the noise shaping scales  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6908ded20e 
								
							
								 
							
						 
						
							
							
								
								swr: fix the noise sample type for noise shaping  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3ef06f3415 
								
							
								 
							
						 
						
							
							
								
								swr: split swri_dither_init() out  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3ab1970612 
								
							
								 
							
						 
						
							
							
								
								swr: move dither related fields to their own context  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ba1314c2ef 
								
							
								 
							
						 
						
							
							
								
								swr: update copyright years of a few files iam working on  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								82742294b7 
								
							
								 
							
						 
						
							
							
								
								swr: Implement Noise shaping dither  
							
							The following variants are implemented:
lipshitz noise shaping dither
shibata noise shaping dither
low shibata noise shaping dither
high shibata noise shaping dither
f-weighted noise shaping dither
modified-e-weighted noise shaping dither
improved-e-weighted noise shaping dither
Data tables taken from SOX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8d9a503313 
								
							
								 
							
						 
						
							
							
								
								docs: add soxr documentation  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f9e55c0fed 
								
							
								 
							
						 
						
							
							
								
								swr: support -async X as a simple way to do what ffmpeg -async X did  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								801b315729 
								
							
								 
							
						 
						
							
							
								
								swr: Add SOX resampler support  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ae5a55e77a 
								
							
								 
							
						 
						
							
							
								
								swr: move flush into Resampler  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								431dcc49d2 
								
							
								 
							
						 
						
							
							
								
								swr: make realloc_audio() available outside swresample.c  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5a5d70748c 
								
							
								 
							
						 
						
							
							
								
								swr: Add API to make resample engine selectable.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d23e8f53ad 
								
							
								 
							
						 
						
							
							
								
								swr: use 64bit index/len for x86_64 mix  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0eebde07a9 
								
							
								 
							
						 
						
							
							
								
								ARM: libswresample: NEON optimised flat float to s16 conversion  
							
							Adapted to swr by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c5278cb84f 
								
							
								 
							
						 
						
							
							
								
								Add Dolby/DPLII downmix support to libswresample  
							
							Based on code by John Stebbins <jstebbins.hb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								323d912010 
								
							
								 
							
						 
						
							
							
								
								swr: update copyright years  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7e15df7551 
								
							
								 
							
						 
						
							
							
								
								swr: resampling: add filter type and Kaiser window beta to AVOptions  
							
							
								
							
							
						 
						13 years ago