[vorbis-dev] minor psy.c modifications

Monty xiphmont at xiph.org
Thu Feb 1 18:42:41 PST 2001



On Fri, Feb 02, 2001 at 03:10:11AM +0100, Attila Padar wrote:
> Hello!
> Some minor bugfixes...
> source: psy.c
> function: _vp_psy_init
> 
> 1. '-' or '+' in this line?
> maxoc=toOC((n*.5f  - .25f)*rate/n)*(1<<(p->shiftoc+1))+.5f;
> maxoc=toOC((n*.5f  + .25f)*rate/n)*(1<<(p->shiftoc+1))+.5f;

'-' is correct.

> 2. I know: sizeof(float *) and sizeof(float) are 4 bytes long, but...
> old lines:
> p->noisemedian=_ogg_malloc(n*sizeof(float *));
> p->noiseoffset=_ogg_malloc(n*sizeof(float *));

These two were in fact wrong.

> p->tonecurves[i]=_ogg_malloc(P_LEVELS*sizeof(float *));

This one is correct as is.

> 3. modified bark_noise_median():
> 3/a: floating point based (new) style:

OK, applied the spirit of one. As an aside, a patch is generally
preferred, but this wasn't that big.

Monty

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list