You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
aacenc_utils: Use temporary variable.
This ensures gcc does not create unnecessary loads or stores and possibly even does not vectorize the negation. Speeds up mp3 to aac transcoding with default settings by 10% when using "gcc (Debian 5.3.1-10) 5.3.1 20160224". Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
@@ -68,10 +68,11 @@ static inline void quantize_bands(int *out, const float *in, const float *scaled
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
float qc = scaled[i] * Q34;
|
float qc = scaled[i] * Q34;
|
||||||
out[i] = (int)FFMIN(qc + rounding, (float)maxval);
|
int tmp = (int)FFMIN(qc + rounding, (float)maxval);
|
||||||
if (is_signed && in[i] < 0.0f) {
|
if (is_signed && in[i] < 0.0f) {
|
||||||
out[i] = -out[i];
|
tmp = -tmp;
|
||||||
}
|
}
|
||||||
|
out[i] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user