You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
@@ -66,10 +66,9 @@ static inline void quantize_bands(int *out, const float *in, const float *scaled
|
|||||||
const float rounding)
|
const float rounding)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
double qc;
|
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
qc = scaled[i] * Q34;
|
float qc = scaled[i] * Q34;
|
||||||
out[i] = (int)FFMIN(qc + rounding, (double)maxval);
|
out[i] = (int)FFMIN(qc + rounding, (float)maxval);
|
||||||
if (is_signed && in[i] < 0.0f) {
|
if (is_signed && in[i] < 0.0f) {
|
||||||
out[i] = -out[i];
|
out[i] = -out[i];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user