aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2016-03-01 22:53:18 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2016-03-28 16:56:11 +0100
commit1cbe4ff2acdd1f166ac7ac912c1b00da9fbf0dd1 (patch)
treede51b67ddad83e2b36f162155d24c3be7dcee0d7
parent7c2576e15d3265ff8205923049fc371a3d229d06 (diff)
downloadffmpeg-1cbe4ff2acdd1f166ac7ac912c1b00da9fbf0dd1.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> (cherry picked from commit 0a04c2885f02f7db6b410b6d43d120e5eb48dc18)
-rw-r--r--libavcodec/aacenc_utils.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/aacenc_utils.h b/libavcodec/aacenc_utils.h
index c2a2c2ec68..b9bd6bf449 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];
}