[FFmpeg-cvslog] aacdec_usac: do not round noise amplitude values

Lynne git at videolan.org
Sat Jun 8 01:23:18 EEST 2024


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Thu Jun  6 17:23:47 2024 +0200| [9b41cc04300e8d00ae3a6326639e975712e21bb6] | committer: Lynne

aacdec_usac: do not round noise amplitude values

Use floating point division instead of integer division.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b41cc04300e8d00ae3a6326639e975712e21bb6
---

 libavcodec/aac/aacdec_usac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 5dd489a43b..9173f1b354 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -930,7 +930,7 @@ static void apply_noise_fill(AACDecContext *ac, SingleChannelElement *sce,
     float *coef;
     IndividualChannelStream *ics = &sce->ics;
 
-    float noise_val = pow(2, (ue->noise.level - 14)/3);
+    float noise_val = powf(2, ((float)ue->noise.level - 14.0f)/3.0f);
     int noise_offset = ue->noise.offset - 16;
     int band_off;
 



More information about the ffmpeg-cvslog mailing list