[FFmpeg-devel] [PATCH] vorbis_enc.c: avoid div zero that causes noise
Ronald S. Bultje
rsbultje
Tue Jun 1 20:35:41 CEST 2010
Hi,
On Tue, Jun 1, 2010 at 2:28 PM, Frank Barchard <fbarchard at google.com> wrote:
> Improves quality for ff vorbis encoding of silence.
>
> Some audio files had clicking, typically at the beginning or end. ?It was
> tracked down to a divide by zero.
> Two samples that improve in quality with the patch are:
> pitivi - http://jeff.ecchi.ca/public/test-html5.html
> red -
> http://movies.apple.com/movies/us/hd_gallery/gl1800/1080p/artbeats_red_m1080p.mov
[..]
> + if (average) {
> + average *= pow(tot_average / average, 0.5) * pow(1.25, position/200.); // MAGIC!
> + } else {
> + average = 0;
> + }
The last 3 lines seem unnecessary?
Ronald
More information about the ffmpeg-devel
mailing list