[FFmpeg-devel] [PATCH] Fix for issue #829 (" ffvorbis outputs?crackling sound, libvorbis plays fine")

Siarhei Siamashka siarhei.siamashka
Wed May 13 08:49:19 CEST 2009


On Tuesday 12 May 2009, Michael Niedermayer wrote:
> On Mon, May 11, 2009 at 08:41:40PM +0200, Reimar D?ffinger wrote:
> > On Mon, May 11, 2009 at 07:17:49PM +0200, Michael Niedermayer wrote:
> > > On Mon, May 11, 2009 at 11:08:56AM +0300, Siarhei Siamashka wrote:
> > > > On Monday 11 May 2009, Michael Niedermayer wrote:
> > > > > On Sun, May 10, 2009 at 12:06:54PM +0300, Siarhei Siamashka wrote:
> > > >
> > > > [...]
> > > >
> > > > > >  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 ?
> > > >
> > > > You are not missing anything. This has exactly the same effect. I can
> > > > change the patch to use 'order-1' if you like it better this way.
> > >
> > > if changing a single line does the trick id prefer that
> >
> > And also check if
> >
> > > for(j=0;j+1<order;j+=2) {
>
> thats even better yes

And this even better patch is attached, hopefully for the final review.

-- 
Best regards,
Siarhei Siamashka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-for-issue-829-ffvorbis-outputs-crackling-soun.patch
Type: text/x-diff
Size: 1379 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090513/13b658fd/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090513/13b658fd/attachment.pgp>



More information about the ffmpeg-devel mailing list