[FFmpeg-devel] [PATCH] Fix for issue #829 ("ffvorbis outputs crackling sound, libvorbis plays fine")
Michael Niedermayer
michaelni
Mon May 11 00:29:53 CEST 2009
On Sun, May 10, 2009 at 12:06:54PM +0300, Siarhei Siamashka wrote:
> Hello,
>
> --
> Best regards,
> Siarhei Siamashka
> vorbis_dec.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
> e20c143c53ac71f5135d4139be815d0aab188ecd 0006-Fix-for-issue-829-ffvorbis-outputs-crackling-soun.patch
> From 289c9acd419f1f314dcf4be02cdc2b80e157d16c Mon Sep 17 00:00:00 2001
> From: Siarhei Siamashka <siarhei.siamashka at gmail.com>
> Date: Sun, 10 May 2009 10:50:20 +0300
> Subject: [PATCH] Fix for issue #829 ("ffvorbis outputs crackling sound, libvorbis plays fine")
>
> This problem affects floor0 encoded files. Tracked down by valgrind (was
> reported as the use of uninitialized memory).
>
> With this patch applied, tiny_psnr now reports the following when ffvorbis
> is compared to libvorbis-1.0beta4 output for 'lsp-test.ogg' sample:
>
> stddev: 0.76 PSNR: 98.69 bytes: 3498380/ 3498452
> ---
> libavcodec/vorbis_dec.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
> index 49d6e8e..f626bce 100644
> --- a/libavcodec/vorbis_dec.c
> +++ b/libavcodec/vorbis_dec.c
> @@ -1039,16 +1039,16 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc,
> float two_cos_w=2.0f*cos(wstep*iter_cond); // needed all times
>
> /* similar part for the q and p products */
> - for(j=0;j<order;j+=2) {
> - q *= lsp[j] -two_cos_w;
> - p *= lsp[j+1]-two_cos_w;
> + for(j=1;j<order;j+=2) {
> + q *= lsp[j-1]-two_cos_w;
> + p *= lsp[j] -two_cos_w;
am i missing something or is all what you change equivalent to
for order-1 vs. for order ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090511/3712600a/attachment.pgp>
More information about the ffmpeg-devel
mailing list