mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	sprinkly SPA_LIKELY/UNLIKELY around
This commit is contained in:
		
							parent
							
								
									d762d57665
								
							
						
					
					
						commit
						cb7bfdf98a
					
				
					 10 changed files with 118 additions and 129 deletions
				
			
		| 
						 | 
				
			
			@ -1074,15 +1074,15 @@ static int impl_node_process(void *object)
 | 
			
		|||
			r = spa_node_process(this->nodes[i]);
 | 
			
		||||
			spa_log_trace_fp(this->log, NAME " %p: process %d %d: %s",
 | 
			
		||||
					this, i, r, r < 0 ? spa_strerror(r) : "ok");
 | 
			
		||||
			if (r < 0)
 | 
			
		||||
			if (SPA_UNLIKELY(r < 0))
 | 
			
		||||
				return r;
 | 
			
		||||
 | 
			
		||||
			if (r & SPA_STATUS_HAVE_DATA)
 | 
			
		||||
				ready++;
 | 
			
		||||
 | 
			
		||||
			if (i == 0)
 | 
			
		||||
			if (SPA_UNLIKELY(i == 0))
 | 
			
		||||
				res |= r & SPA_STATUS_NEED_DATA;
 | 
			
		||||
			if (i == this->n_nodes-1)
 | 
			
		||||
			if (SPA_UNLIKELY(i == this->n_nodes-1))
 | 
			
		||||
				res |= r & SPA_STATUS_HAVE_DATA;
 | 
			
		||||
		}
 | 
			
		||||
		if (res & SPA_STATUS_HAVE_DATA)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ conv_s16_to_f32d_1s_sse2(void *data, void * SPA_RESTRICT dst[], const void * SPA
 | 
			
		|||
	__m128i in;
 | 
			
		||||
	__m128 out, factor = _mm_set1_ps(1.0f / S16_SCALE);
 | 
			
		||||
 | 
			
		||||
	if (SPA_IS_ALIGNED(d0, 16))
 | 
			
		||||
	if (SPA_LIKELY(SPA_IS_ALIGNED(d0, 16)))
 | 
			
		||||
		unrolled = n_samples & ~3;
 | 
			
		||||
	else
 | 
			
		||||
		unrolled = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue