Simplify float_to_s16/s16_to_float functions for ARM NEON ASM codepath

This commit is contained in:
twinaphex 2021-09-04 00:39:49 +02:00
parent 6d1c0e96a3
commit f905012376
2 changed files with 8 additions and 8 deletions

View File

@ -55,10 +55,10 @@ void convert_float_to_s16(int16_t *out,
if (aligned_samples)
convert_float_s16_asm(out, in, aligned_samples);
out = out + aligned_samples;
in = in + aligned_samples;
samples = samples - aligned_samples;
i = 0;
out += aligned_samples;
in += aligned_samples;
samples -= aligned_samples;
i = 0;
#else
int16x4x2_t oreg;
int32x4x2_t creg;

View File

@ -53,12 +53,12 @@ void convert_s16_to_float(float *out,
convert_s16_float_asm(out, in, aligned_samples, &gain);
/* Could do all conversion in ASM, but keep it simple for now. */
out = out + aligned_samples;
in = in + aligned_samples;
samples = samples - aligned_samples;
out += aligned_samples;
in += aligned_samples;
samples -= aligned_samples;
i = 0;
#else
float gf = gain / (1<<15);
float gf = gain / (1 << 15);
float32x4_t vgf = {gf, gf, gf, gf};
while (samples >= 8)
{