Sorry for the previous post, but tot_ener has to be initialized each time
L3psycho_anal since it is not declared static.
So forget the memset, and declare tot_ener as

 FLOAT8 tot_ener[4]={0,0,0,0};

Under MSVC this will give not FPU problems anymore (at least when the
EM_OVERFLOW,_EM_UNDERFLOW and the _EM_ZERODIVIDE bits are cleared. There are
still some problems in the lame_encode function when the _EM_INVALID is
cleared as well.


Albert

http://www.cdex.n3.net/

mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]

----- Original Message -----
From: Albert Faber <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 14, 2000 8:39 PM
Subject: Re: [MP3 ENCODER] using lame363 for shuttle transmission


> There seems to be a problem in the function L3psycho_anal , the tot_ener
> variable is used before it is assigned or initialized in
>
>     FLOAT8 tmp = tot_ener[3]+tot_ener[2];
>     ms_ener_ratio_old=0;
>     if (tmp>0) ms_ener_ratio_old=tot_ener[3]/tmp;
>
>
> to fix it, add the following line to the initialization part (e.g. after
the
> other memsets)
> memset (tot_ener,0, sizeof(tot_ener));
>
>
>
> Albert
>
> http://www.cdex.n3.net/
>
> mailto:[EMAIL PROTECTED]
> mailto:[EMAIL PROTECTED]
>
> ----- Original Message -----
> From: Mathew Hendry <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 14, 2000 6:21 PM
> Subject: RE: [MP3 ENCODER] using lame363 for shuttle transmission
>
>
> > > From: Mathew Hendry [mailto:[EMAIL PROTECTED]]
> > >
> > > The offending function appears to be lame.c/lame_encode(). If
> > > I compile this
> > > function separately with optimisation disabled the problem
> > > disappears. Still
> > > looking...
> >
> > Declaring avg_slots_per_frame "volatile" (line 547 in lame.c) fixes it
in
> > some cases. I was using the following test options, with fools.wav as my
> > source
> >
> > -b 32 -f
> > -b 128 -f
> > -b 320 -f
> > -b 32 -h
> > -b 128 -h
> > -b 320 -h
> >
> > Where before all were different, now only the 32kbps files are
different.
> > With -b 32 -f, even the file sizes are different...
> >
> > I'm using gcc 2.95.2 under WinNT, compiling with the following options
> >
> > -O9 -fomit-frame-pointer -mpentiumpro -ffast-math     \
> > -funroll-loops -Wall -malign-double -mcpu=pentiumpro  \
> > -mfancy-math-387 -pipe
> >
> > and the usual -DNDEBUG -D__NO_MATH_INLINES
> >
> > BTW, can't check the -DABORTFP business, as this gcc doesn't support it
(I
> > guess I don't have the right libraries).
> >
> > -- Mat.
> > --
> > MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
>
> --
> MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to