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

pull/3/merge
Janne Grunau 13 years ago
parent 456d3e4fb5
commit c57fe49da8
  1. 2
      libavcodec/eac3dec.c

@ -140,7 +140,7 @@ void ff_eac3_apply_spectral_extension(AC3DecodeContext *s)
each band. */ each band. */
bin = s->spx_src_start_freq; bin = s->spx_src_start_freq;
for (bnd = 0; bnd < s->num_spx_bands; bnd++) { 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]; float sscale = s->spx_signal_blend[ch][bnd];
for (i = 0; i < s->spx_band_sizes[bnd]; i++) { for (i = 0; i < s->spx_band_sizes[bnd]; i++) {
float noise = nscale * (int32_t)av_lfg_get(&s->dith_state); float noise = nscale * (int32_t)av_lfg_get(&s->dith_state);

Loading…
Cancel
Save