56f0fe6b84 
								
							
								 
							
						 
						
							
							
								
								swr: Fix ASSERT_LEVEL warning  
							
							Found-by: cehoyos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c5a08956a3 
								
							
								 
							
						 
						
							
							
								
								swresample: fix initilaize/initialize typo  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c3f87f7545 
								
							
								 
							
						 
						
							
							
								
								swresample/swresample: Cleanup on init failure.  
							
							This avoids leaks if the user doest call swr_close() after a failed init
Found-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								02915602d9 
								
							
								 
							
						 
						
							
							
								
								swresample: Check the return value of resampler->init()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								adb7372f74 
								
							
								 
							
						 
						
							
							
								
								swr: fix alignment issue caused by 8ch sse functions  
							
							Fix crash when doing 8 ch conversion from apps compiled with MSVS
Thanks to Ronald for giving this hint:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html 
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3c77bb5f23 
								
							
								 
							
						 
						
							
							
								
								swresample: Check channel layouts and channels against each other and print human readable error messages  
							
							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  
				
					
						
							
							
								 
						
							
							
							
								
							
								1a10134e20 
								
							
								 
							
						 
						
							
							
								
								swresample/swresample: Use av_mallocz_array()  
							
							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  
				
					
						
							
							
								 
						
							
							
							
								
							
								649c158e8c 
								
							
								 
							
						 
						
							
							
								
								Add FFMPEG_VERSION into the binary libs  
							
							This simplifies identifying from which revision a binary of a lib came from
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e4f8a973aa 
								
							
								 
							
						 
						
							
							
								
								swresample: Fix swr_drop_output so it does not flush the buffers  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								080c846f59 
								
							
								 
							
						 
						
							
							
								
								swresample: do not put multiple statements in one line  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6b347f519d 
								
							
								 
							
						 
						
							
							
								
								swresample/swresample: replace always true if() by av_assert0()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f9fefa499f 
								
							
								 
							
						 
						
							
							
								
								swresample/swresample: fix sample drop loop end condition  
							
							Fixes Ticket3985
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f4e814f787 
								
							
								 
							
						 
						
							
							
								
								swresample: check av_opt_set for failure in swr_alloc_set_opts()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								05ff1a2c05 
								
							
								 
							
						 
						
							
							
								
								swresample/swresample: Treat mono as planar  
							
							This might in some cases improve performance.
Idea from: fbc0b86599 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								37715b4594 
								
							
								 
							
						 
						
							
							
								
								swresample: split option table to a separate file  
							
							Signed-off-by: Timothy Gu <timothygu99@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  
				
					
						
							
							
								 
						
							
							
							
								
							
								96cb4c8718 
								
							
								 
							
						 
						
							
							
								
								swresample: swr_close()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6c6e4dd139 
								
							
								 
							
						 
						
							
							
								
								swr: check that the context for swr_convert() has been initialized  
							
							Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a66be60888 
								
							
								 
							
						 
						
							
							
								
								swresample: add swr_is_initialized()  
							
							Idea-from/based-on: 7e86c27b4e 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f284e2a58a 
								
							
								 
							
						 
						
							
							
								
								swresample: factorize clear_context() out  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								334e2e2363 
								
							
								 
							
						 
						
							
							
								
								lavu,lavc,lswr: do not hardcode AV_SAMPLE_FMT_NB value when setting sample format max value  
							
							The constant may change in libavutil but the library may be compiled
against an older version, thus rejecting a value which is otherwise
supported by the new libavutil.
INT_MAX is used here to denote the max allowed value for a sample format.
The opt-test code is changed to provide a valid reference example. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a6af5da7a2 
								
							
								 
							
						 
						
							
							
								
								swresample: use the internal buffer for resampling the last few samples  
							
							Fixes out of array read
Fixes Ticket3193
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								904c89ac1b 
								
							
								 
							
						 
						
							
							
								
								lswr/swresample: convert ocl and icl options to AV_OPT_TYPE_CHANNEL_LAYOUT  
							
							Improve interface flexibility. In particular makes it possible to set
channel layout through symbolic names using the av_opt_set() interface. 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9078b40d35 
								
							
								 
							
						 
						
							
							
								
								swresample: replace 2 av_free() by av_freep()  
							
							avoids leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e2b718464e 
								
							
								 
							
						 
						
							
							
								
								swresample: Make rematrix maxvalue user settable  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a9bbf59be7 
								
							
								 
							
						 
						
							
							
								
								cosmetics: Fix "dont" "wont" "doesnt" typos  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3289670142 
								
							
								 
							
						 
						
							
							
								
								swr: dont treat 32 and 24 as equal in simple copy check  
							
							Fixes dithering from 32 to 24 bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0804171104 
								
							
								 
							
						 
						
							
							
								
								swresample: set flags & description and add documentation for output_sample_bits  
							
							Allows users to actually use such option.
Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								495bf1b685 
								
							
								 
							
						 
						
							
							
								
								swr: Fix dithering of s16 with SIMD  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								35aaa306ac 
								
							
								 
							
						 
						
							
							
								
								swr: make the default of nopts for first_pts actually work  
							
							Fixes Ticket2210
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								2abbe6d07a 
								
							
								 
							
						 
						
							
							
								
								swr: add duplicate cutoff for compatibility  
							
							Based on
	commit 50f4337a2f 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								21cd905cd4 
								
							
								 
							
						 
						
							
							
								
								swr: check channel layouts before using them.  
							
							Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b5f544a0f9 
								
							
								 
							
						 
						
							
							
								
								swr: Dont use floats for S32->S32 when possible  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								be989f9236 
								
							
								 
							
						 
						
							
							
								
								swr: reorder init code to make rematrix status available earlier  
							
							This also makes some other fields available earlier which may
be usefull one day
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								167af704ea 
								
							
								 
							
						 
						
							
							
								
								swr: limit phase_shift to a less insane value.  
							
							This prevents potential crashes and out of memory issues if
the user manually sets such insane values.
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								d676598f87 
								
							
								 
							
						 
						
							
							
								
								swr: fix handling of timestamps that cause multiple drops or silence injections  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a34aee4646 
								
							
								 
							
						 
						
							
							
								
								swr: limit buffer size for silence injection  
							
							This reduces memory usage for unreasonable large silence injections
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b481d09bd9 
								
							
								 
							
						 
						
							
							
								
								swr: limit buffer size for discarding.  
							
							This prevents insane memory usage in case of insane input values.
Untested due to lack of a testcase that causes such insane allocation
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								a74548521b 
								
							
								 
							
						 
						
							
							
								
								swr: check that allocation of in/out_convert succeeded  
							
							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  
				
					
						
							
							
								 
						
							
							
							
								
							
								558aa6cab7 
								
							
								 
							
						 
						
							
							
								
								swr: add seperate in/out pointers to the noise shaping code  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago