[FFmpeg-devel] [PATCH] Fix for inverted sign in?ffvorbis?audio?output (resubmit)
Siarhei Siamashka
siarhei.siamashka
Sat May 16 10:25:13 CEST 2009
On Friday 15 May 2009, Michael Niedermayer wrote:
> On Fri, May 15, 2009 at 10:52:05AM +0300, Siarhei Siamashka wrote:
[...]
> > Would this patch be finally OK (kind of blend of your and Reimar's
> > suggestions)?
>
> [...]
>
> > @@ -85,10 +85,12 @@ av_cold int ff_mdct_init(MDCTContext *s, int nbits,
> > int inverse) if (!s->tsin)
> > goto fail;
> >
> > + theta = scale < 0 ? 0.5 * M_PI : 0;
> > + scale = sqrt(fabs(scale));
> > for(i=0;i<n4;i++) {
> > - alpha = 2 * M_PI * (i + 1.0 / 8.0) / n;
> > - s->tcos[i] = -cos(alpha);
> > - s->tsin[i] = -sin(alpha);
> > + alpha = 2 * M_PI * (i + 1.0 / 8.0) / n + theta;
>
> alpha = 2 * M_PI * (i + theta) / n;
>
> would be slightly more accurate as (i + theta) / n is exact and thus
> the addition of two inexact variables is avoided
Fixed
--
Best regards,
Siarhei Siamashka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-for-getting-i-MDCT-output-multiplied-by-a-c.patch
Type: text/x-diff
Size: 9926 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090516/d1d2497d/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/20090516/d1d2497d/attachment.pgp>
More information about the ffmpeg-devel
mailing list