mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: tweak SPA_MIN and SPA_MAX
This generates much better assembler because it can use a cmov in more cases.
This commit is contained in:
		
							parent
							
								
									fe7c6bcef9
								
							
						
					
					
						commit
						5fbda82cc3
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -131,13 +131,13 @@ struct spa_fraction {
 | 
				
			||||||
({				\
 | 
					({				\
 | 
				
			||||||
	__typeof__(a) _min_a = (a);	\
 | 
						__typeof__(a) _min_a = (a);	\
 | 
				
			||||||
	__typeof__(b) _min_b = (b);	\
 | 
						__typeof__(b) _min_b = (b);	\
 | 
				
			||||||
	SPA_LIKELY(_min_a < _min_b) ? _min_a : _min_b;	\
 | 
						SPA_LIKELY(_min_a <= _min_b) ? _min_a : _min_b;	\
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
#define SPA_MAX(a,b)		\
 | 
					#define SPA_MAX(a,b)		\
 | 
				
			||||||
({				\
 | 
					({				\
 | 
				
			||||||
	__typeof__(a) _max_a = (a);	\
 | 
						__typeof__(a) _max_a = (a);	\
 | 
				
			||||||
	__typeof__(b) _max_b = (b);	\
 | 
						__typeof__(b) _max_b = (b);	\
 | 
				
			||||||
	SPA_LIKELY(_max_a > _max_b) ? _max_a : _max_b;	\
 | 
						SPA_LIKELY(_max_a >= _max_b) ? _max_a : _max_b;	\
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
#define SPA_CLAMP(v,low,high)				\
 | 
					#define SPA_CLAMP(v,low,high)				\
 | 
				
			||||||
({							\
 | 
					({							\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue