swresample/resample: manually unroll the main loop in bessel()
About 10% faster Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
							parent
							
								
									6024c865ef
								
							
						
					
					
						commit
						1bc873acd6
					
				| @ -51,11 +51,13 @@ static double bessel(double x){ | |||||||
|     x= x*x/4; |     x= x*x/4; | ||||||
|     t = x; |     t = x; | ||||||
|     v = 1 + x; |     v = 1 + x; | ||||||
|     for(i=1; v != lastv; i++){ |     for(i=1; v != lastv; i+=2){ | ||||||
|         lastv=v; |  | ||||||
|         t *= x*inv[i]; |         t *= x*inv[i]; | ||||||
|         v += t; |         v += t; | ||||||
|         av_assert2(i<99); |         lastv=v; | ||||||
|  |         t *= x*inv[i + 1]; | ||||||
|  |         v += t; | ||||||
|  |         av_assert2(i<98); | ||||||
|     } |     } | ||||||
|     return v; |     return v; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user