[FFmpeg-cvslog] eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation

Janne Grunau git at videolan.org
Fri Feb 10 01:47:57 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Thu Feb  9 20:46:08 2012 +0100| [c57fe49da8feda7d2e6c266978250a15a83e0484] | committer: Janne Grunau

eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation

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

 libavcodec/eac3dec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c
index 212f6b4..7072f78 100644
--- a/libavcodec/eac3dec.c
+++ b/libavcodec/eac3dec.c
@@ -140,7 +140,7 @@ void ff_eac3_apply_spectral_extension(AC3DecodeContext *s)
            each band. */
         bin = s->spx_src_start_freq;
         for (bnd = 0; bnd < s->num_spx_bands; bnd++) {
-            float nscale = s->spx_noise_blend[ch][bnd] * rms_energy[bnd] * (1.0f/(1<<31));
+            float nscale = s->spx_noise_blend[ch][bnd] * rms_energy[bnd] * (1.0f / INT32_MIN);
             float sscale = s->spx_signal_blend[ch][bnd];
             for (i = 0; i < s->spx_band_sizes[bnd]; i++) {
                 float noise  = nscale * (int32_t)av_lfg_get(&s->dith_state);



More information about the ffmpeg-cvslog mailing list