mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	fmt-ops: add support for s24 with endian conversion
This commit is contained in:
		
							parent
							
								
									c047bab910
								
							
						
					
					
						commit
						f4387e0568
					
				
					 3 changed files with 43 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -316,6 +316,22 @@ conv_s24_to_f32d_c(struct convert *conv, void * SPA_RESTRICT dst[], const void *
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
conv_s24s_to_f32d_c(struct convert *conv, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src[],
 | 
			
		||||
		uint32_t n_samples)
 | 
			
		||||
{
 | 
			
		||||
	const uint8_t *s = src[0];
 | 
			
		||||
	float **d = (float **) dst;
 | 
			
		||||
	uint32_t i, j, n_channels = conv->n_channels;
 | 
			
		||||
 | 
			
		||||
	for (j = 0; j < n_samples; j++) {
 | 
			
		||||
		for (i = 0; i < n_channels; i++) {
 | 
			
		||||
			d[i][j] = S24_TO_F32(read_s24s(s));
 | 
			
		||||
			s += 3;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
conv_s24d_to_f32_c(struct convert *conv, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src[],
 | 
			
		||||
		uint32_t n_samples)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue