(sinc resampler) style nits
This commit is contained in:
parent
99fe15be46
commit
dc9ffcce66
|
@ -111,6 +111,7 @@ static void resampler_sinc_process_neon_kaiser(void *re_, struct resampler_data
|
|||
size_t frames = data->input_frames;
|
||||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -135,11 +136,11 @@ static void resampler_sinc_process_neon_kaiser(void *re_, struct resampler_data
|
|||
const float *buffer_r = resamp->buffer_r + resamp->ptr;
|
||||
while (resamp->time < phases)
|
||||
{
|
||||
int i;
|
||||
unsigned phase = resamp->time >> resamp->subphase_bits;
|
||||
const float *phase_table = resamp->phase_table + phase * taps * 2;
|
||||
const float *delta_table = phase_table + taps;
|
||||
float32x4_t delta = vdupq_n_f32((resamp->time & resamp->subphase_mask) * resamp->subphase_mod);
|
||||
int i;
|
||||
float32x4_t p1 = {0, 0, 0, 0}, p2 = {0, 0, 0, 0};
|
||||
float32x2_t p3, p4;
|
||||
|
||||
|
@ -258,7 +259,6 @@ static void resampler_sinc_process_avx_kaiser(void *re_, struct resampler_data *
|
|||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
{
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -284,13 +284,12 @@ static void resampler_sinc_process_avx_kaiser(void *re_, struct resampler_data *
|
|||
while (resamp->time < phases)
|
||||
{
|
||||
int i;
|
||||
__m256 res_l, res_r;
|
||||
unsigned phase = resamp->time >> resamp->subphase_bits;
|
||||
|
||||
float *phase_table = resamp->phase_table + phase * taps * 2;
|
||||
float *delta_table = phase_table + taps;
|
||||
__m256 delta = _mm256_set1_ps((float)
|
||||
(resamp->time & resamp->subphase_mask) * resamp->subphase_mod);
|
||||
|
||||
__m256 sum_l = _mm256_setzero_ps();
|
||||
__m256 sum_r = _mm256_setzero_ps();
|
||||
|
||||
|
@ -308,8 +307,8 @@ static void resampler_sinc_process_avx_kaiser(void *re_, struct resampler_data *
|
|||
|
||||
/* hadd on AVX is weird, and acts on low-lanes
|
||||
* and high-lanes separately. */
|
||||
__m256 res_l = _mm256_hadd_ps(sum_l, sum_l);
|
||||
__m256 res_r = _mm256_hadd_ps(sum_r, sum_r);
|
||||
res_l = _mm256_hadd_ps(sum_l, sum_l);
|
||||
res_r = _mm256_hadd_ps(sum_r, sum_r);
|
||||
res_l = _mm256_hadd_ps(res_l, res_l);
|
||||
res_r = _mm256_hadd_ps(res_r, res_r);
|
||||
res_l = _mm256_add_ps(_mm256_permute2f128_ps(res_l, res_l, 1), res_l);
|
||||
|
@ -326,7 +325,6 @@ static void resampler_sinc_process_avx_kaiser(void *re_, struct resampler_data *
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data->output_frames = out_frames;
|
||||
}
|
||||
|
@ -343,7 +341,6 @@ static void resampler_sinc_process_avx(void *re_, struct resampler_data *data)
|
|||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
{
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -369,7 +366,7 @@ static void resampler_sinc_process_avx(void *re_, struct resampler_data *data)
|
|||
while (resamp->time < phases)
|
||||
{
|
||||
int i;
|
||||
__m256 delta;
|
||||
__m256 delta, res_l, res_r;
|
||||
unsigned phase = resamp->time >> resamp->subphase_bits;
|
||||
float *phase_table = resamp->phase_table + phase * taps;
|
||||
|
||||
|
@ -388,8 +385,8 @@ static void resampler_sinc_process_avx(void *re_, struct resampler_data *data)
|
|||
|
||||
/* hadd on AVX is weird, and acts on low-lanes
|
||||
* and high-lanes separately. */
|
||||
__m256 res_l = _mm256_hadd_ps(sum_l, sum_l);
|
||||
__m256 res_r = _mm256_hadd_ps(sum_r, sum_r);
|
||||
res_l = _mm256_hadd_ps(sum_l, sum_l);
|
||||
res_r = _mm256_hadd_ps(sum_r, sum_r);
|
||||
res_l = _mm256_hadd_ps(res_l, res_l);
|
||||
res_r = _mm256_hadd_ps(res_r, res_r);
|
||||
res_l = _mm256_add_ps(_mm256_permute2f128_ps(res_l, res_l, 1), res_l);
|
||||
|
@ -406,7 +403,6 @@ static void resampler_sinc_process_avx(void *re_, struct resampler_data *data)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data->output_frames = out_frames;
|
||||
}
|
||||
|
@ -425,7 +421,6 @@ static void resampler_sinc_process_sse_kaiser(void *re_, struct resampler_data *
|
|||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
{
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -503,7 +498,6 @@ static void resampler_sinc_process_sse_kaiser(void *re_, struct resampler_data *
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data->output_frames = out_frames;
|
||||
}
|
||||
|
@ -520,7 +514,6 @@ static void resampler_sinc_process_sse(void *re_, struct resampler_data *data)
|
|||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
{
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -593,7 +586,6 @@ static void resampler_sinc_process_sse(void *re_, struct resampler_data *data)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data->output_frames = out_frames;
|
||||
}
|
||||
|
@ -611,7 +603,6 @@ static void resampler_sinc_process_c_kaiser(void *re_, struct resampler_data *da
|
|||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
{
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -661,8 +652,6 @@ static void resampler_sinc_process_c_kaiser(void *re_, struct resampler_data *da
|
|||
resamp->time += ratio;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
data->output_frames = out_frames;
|
||||
|
@ -680,7 +669,6 @@ static void resampler_sinc_process_c(void *re_, struct resampler_data *data)
|
|||
size_t out_frames = 0;
|
||||
unsigned taps = resamp->taps;
|
||||
|
||||
{
|
||||
while (frames)
|
||||
{
|
||||
while (frames && resamp->time >= phases)
|
||||
|
@ -727,8 +715,6 @@ static void resampler_sinc_process_c(void *re_, struct resampler_data *data)
|
|||
resamp->time += ratio;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
data->output_frames = out_frames;
|
||||
|
@ -774,7 +760,6 @@ static void sinc_init_table_kaiser(rarch_sinc_resampler_t *resamp,
|
|||
{
|
||||
int phase;
|
||||
int p;
|
||||
|
||||
for (p = 0; p < phases - 1; p++)
|
||||
{
|
||||
for (j = 0; j < taps; j++)
|
||||
|
@ -832,8 +817,8 @@ static void sinc_init_table_lanczos(
|
|||
|
||||
if (calculate_delta)
|
||||
{
|
||||
int phase;
|
||||
int p;
|
||||
int phase;
|
||||
|
||||
for (p = 0; p < phases - 1; p++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue