Browse Source

aacenc: avoid double in quantize_bands.

I cannot see any point whatsoever to use
double here instead of float, the results
are likely identical in all cases..
Using float allows for much more
efficient use of SIMD.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 0a04c2885f)
tags/n3.0.1
Reimar Döffinger Rostislav Pehlivanov 10 years ago
parent
commit
1cbe4ff2ac
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      libavcodec/aacenc_utils.h

+ 2
- 3
libavcodec/aacenc_utils.h View File

@@ -66,10 +66,9 @@ static inline void quantize_bands(int *out, const float *in, const float *scaled
const float rounding)
{
int i;
double qc;
for (i = 0; i < size; i++) {
qc = scaled[i] * Q34;
out[i] = (int)FFMIN(qc + rounding, (double)maxval);
float qc = scaled[i] * Q34;
out[i] = (int)FFMIN(qc + rounding, (float)maxval);
if (is_signed && in[i] < 0.0f) {
out[i] = -out[i];
}


Loading…
Cancel
Save