summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/aacenc_quantization.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc_quantization.h b/libavcodec/aacenc_quantization.h
index 64093b8d66..b514954e4d 100644
--- a/libavcodec/aacenc_quantization.h
+++ b/libavcodec/aacenc_quantization.h
@@ -110,7 +110,7 @@ static av_always_inline float quantize_and_encode_band_cost_template(
}
di = t - quantized;
if (out)
- out[i+j] = copysignf(quantized, in[i+j]);
+ out[i+j] = in[i+j] >= 0 ? quantized : -quantized;
if (vec[j] != 0.0f)
curbits++;
rd += di*di;