8b710ea5e7 
								
							
								 
							
						 
						
							
							
								
								swresample: Use channel count in rematrix initialization  
							
							Rematrixing supports up to 64 channels. However, there is only a limited number of channel layouts defined. Since the in/out channel count is currently obtained from the channel layout, for undefined layouts (e.g. for 9, 10, 11 channels etc.) the rematrixing fails.
This patch changes rematrix init methods to use in (used) and out channel count directly instead of computing it from channel layout.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						7 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6325bd3717 
								
							
								 
							
						 
						
							
							
								
								swresample/rematrix: fix update of channel matrix if input or output layout is undefined  
							
							Prefer direct in/out channel count values over channel layout, when
available. Fixes a pan filter bug (ticket #6790 ).
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> 
							
						 
						7 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ff994c2aaa 
								
							
								 
							
						 
						
							
							
								
								lswr/rematrix: Support s32p.  
							
							Fixes ticket #6785 . 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								fd502f4f5f 
								
							
								 
							
						 
						
							
							
								
								build: Generalize yasm/nasm-related variable names  
							
							None of them are specific to the YASM assembler.
(Cherry-picked from libav commit 39e208f4d4 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								353f509ee3 
								
							
								 
							
						 
						
							
							
								
								lswr/rematrix: Remove an aggressive loop optimization.  
							
							Fixes undefined behaviour and a gcc warning:
libswresample/rematrix.c:376:47: warning: iteration 64 invokes undefined behavior 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9445e7e6d5 
								
							
								 
							
						 
						
							
							
								
								swresample/rematrix: Fix float part of swr_set_matrix()  
							
							Fixes Ticket #5897 .
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								23c0779cda 
								
							
								 
							
						 
						
							
							
								
								swresample: Add swr_build_matrix()  
							
							API and Doxy documentation is taken from avresample_build_matrix()
Fixes: Ticket5780
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								740f5105d5 
								
							
								 
							
						 
						
							
							
								
								swresample: Use double and float for matrixes for best quality and speed  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2f76157eb0 
								
							
								 
							
						 
						
							
							
								
								swresample/rematrix: Use clipping s16 rematrixing if overflows are possible  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7fe81bc4f8 
								
							
								 
							
						 
						
							
							
								
								swresample/rematrix: Use error diffusion to avoid error in the DC component of the matrix  
							
							This fixes the sum of the integer coefficients ending up summing to a value
larger than the value representing unity.
This issue occurs with qN0.dts when converting to stereo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								cdf4a13f86 
								
							
								 
							
						 
						
							
							
								
								swresample: slightly nicer debug output for auto matrix  
							
							This is the matrix that will be used for up/downmixing. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								52acd22a7d 
								
							
								 
							
						 
						
							
							
								
								libswresample/rematrix: Check for malloc errors  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								80a28c7509 
								
							
								 
							
						 
						
							
							
								
								swresample: Allow reinitialization without ever setting channel layouts  
							
							
								
							
							
						 
						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  
				
					
						
							
							
								 
						
							
							
							
								
							
								2c5c37ade1 
								
							
								 
							
						 
						
							
							
								
								libswresample: move condition to start of loop.  
							
							This avoids several issue like calculating sum/maxcoef
incorrectly due to adding up matrix entries that will
be overwritten, as well as out-of-range writes to
s->matrix if the maximum allowed number of channels is used.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								284123d7fd 
								
							
								 
							
						 
						
							
							
								
								Remove pointless if.  
							
							A branch to avoid some calculation seems unlikely to have any benefits.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2231d5b671 
								
							
								 
							
						 
						
							
							
								
								libswresample: Avoid needlessly large on-stack array.  
							
							We only actually need to use a tiny part of it.
Unfortunately we seem to have no real test coverage on
the code, so this is a bit risky.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								291d464161 
								
							
								 
							
						 
						
							
							
								
								swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input  
							
							Fixes Ticket 3542
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4a640a6ac8 
								
							
								 
							
						 
						
							
							
								
								lswr: fix assert failure on unknown layouts.  
							
							
								
							
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c56d4dab03 
								
							
								 
							
						 
						
							
							
								
								swr/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX output  
							
							Fixes Ticket2859
Note, testcases related to the downmix channels are welcome.
(id like to make sure this is working correctly now, as obviously it didnt
 work before ...)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6dfffe9200 
								
							
								 
							
						 
						
							
							
								
								swr: clean layouts before checking sanity  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7ac12599fe 
								
							
								 
							
						 
						
							
							
								
								swresample: fix negative rematrix volumns  
							
							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  
				
					
						
							
							
								 
						
							
							
							
								
							
								4cfc92081d 
								
							
								 
							
						 
						
							
							
								
								swr: add native_simd_one  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b84de51f54 
								
							
								 
							
						 
						
							
							
								
								swresample/rematrix: add S32 mixing code  
							
							Needed for dithering S32
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6e29f39252 
								
							
								 
							
						 
						
							
							
								
								swr/rematrix: use av_calloc()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						12 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5e68bf9b92 
								
							
								 
							
						 
						
							
							
								
								swr/rematrix: move templating parameters to template itself.  
							
							
								
							
							
						 
						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  
				
					
						
							
							
								 
						
							
							
							
								
							
								555f352f99 
								
							
								 
							
						 
						
							
							
								
								swr/rematrix: fix C99 left shift overflow  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								31a797eb28 
								
							
								 
							
						 
						
							
							
								
								swr: add av_cold to init/free functions  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0e78e575ed 
								
							
								 
							
						 
						
							
							
								
								swr/auto_matrix: treat a single channel as mono instead of failing  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f8d74cbdc3 
								
							
								 
							
						 
						
							
							
								
								swr/auto_matrix: treat stereo downmix like stereo.  
							
							Based on code by John Stebbins
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c8ffab06f4 
								
							
								 
							
						 
						
							
							
								
								swr/auto_matrix: add clean layout function  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ebc854e4e9 
								
							
								 
							
						 
						
							
							
								
								swr/auto_matrix: move layouts to local variables  
							
							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  
				
					
						
							
							
								 
						
							
							
							
								
							
								2dd2e42951 
								
							
								 
							
						 
						
							
							
								
								swr: update rematrix coeffs to match AC-3  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7309451d73 
								
							
								 
							
						 
						
							
							
								
								swr: fix warning: passing argument 2 of s->mix_any_f from incompatible pointer type  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								04b5eb47a6 
								
							
								 
							
						 
						
							
							
								
								swr: fix mix* related function pointer warnings  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								065851ffac 
								
							
								 
							
						 
						
							
							
								
								lswr/rematrix: specify explicitly the name of the unsupported channel layouts  
							
							Help debugging. 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								728f86edfc 
								
							
								 
							
						 
						
							
							
								
								swr: mix_2_1_int16_mmx/sse  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								cbeeaf2593 
								
							
								 
							
						 
						
							
							
								
								swr: mix_1_1 int16 MMX  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								beb0cd6acf 
								
							
								 
							
						 
						
							
							
								
								swr: SIMD rematrixing and SSE/AVX mix_1_1 float  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								48a45f819f 
								
							
								 
							
						 
						
							
							
								
								swr: add native matrix for SIMD  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a5c6349358 
								
							
								 
							
						 
						
							
							
								
								swr: skip memset(0) in rematrix when the array is known to be already 0  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b0348158a0 
								
							
								 
							
						 
						
							
							
								
								swr: 5.1->stereo double, float and s16  
							
							2.5 times faster than the generic code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ca30ae12c5 
								
							
								 
							
						 
						
							
							
								
								swr: add all in one rematrixing function ptr  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dfde3d497e 
								
							
								 
							
						 
						
							
							
								
								swr: add inrermediate sample type for rematrixing  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f2e799a3d0 
								
							
								 
							
						 
						
							
							
								
								swr: add double precision support to the rematrix code  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6d5bf67f04 
								
							
								 
							
						 
						
							
							
								
								swr: add lfe_mix_level  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9b42653b22 
								
							
								 
							
						 
						
							
							
								
								swr: update side to back mixing.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						13 years ago