Browse Source

Avoid division by zero that caused noise, typically at the beginning or

end of a file.

Patch by Frank Barchard, fbarchard google

Originally committed as revision 23426 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Frank Barchard Carl Eugen Hoyos 15 years ago
parent
commit
83b7076131
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/vorbis_enc.c

+ 1
- 1
libavcodec/vorbis_enc.c View File

@@ -681,7 +681,7 @@ static void floor_fit(vorbis_enc_context *venc, vorbis_enc_floor *fc,
float average = averages[i];
int j;

average *= pow(tot_average / average, 0.5) * pow(1.25, position/200.); // MAGIC!
average = sqrt(tot_average * average) * pow(1.25f, position*0.005f); // MAGIC!
for (j = 0; j < range - 1; j++)
if (ff_vorbis_floor1_inverse_db_table[j * fc->multiplier] > average)
break;


Loading…
Cancel
Save