diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2016-03-01 22:53:18 +0100 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2016-03-06 11:49:19 +0100 |
commit | 0a04c2885f02f7db6b410b6d43d120e5eb48dc18 (patch) | |
tree | 9a093267f48e45552489606d62bd2518e7598ef4 /libavcodec/aacenc_utils.h | |
parent | 7dd60a0b54ee2d4a5aa2a069597b560e82afb201 (diff) | |
download | ffmpeg-streaming-0a04c2885f02f7db6b410b6d43d120e5eb48dc18.zip ffmpeg-streaming-0a04c2885f02f7db6b410b6d43d120e5eb48dc18.tar.gz |
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>
Diffstat (limited to 'libavcodec/aacenc_utils.h')
-rw-r--r-- | libavcodec/aacenc_utils.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aacenc_utils.h index c2a2c2e..b9bd6bf 100644 --- a/libavcodec/aacenc_utils.h +++ b/libavcodec/aacenc_utils.h @@ -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]; } |