[vorbis-dev] use of 'long' in vorbis structures

Michael Smith msmith at xiph.org
Wed May 21 16:12:46 PDT 2003



On Thursday 22 May 2003 09:11, David Etherton wrote:
> The codebase sets up ogg_int32_t, etc, but then uses long directly in
> several structures.  Unfortunately for me longs are 64 bits on my platform,
> not 32, and I end up getting hammered by unnecessary software math routine
> calls.
>
> Should I be able to just search/replace 'long' with 'ogg_int32_t' in the
> code or would that cause more problems than it fixes?

Yes, that should be fine (watch for the unsigned longs, though - there aren't 
many). The ogg and vorbis libraries are all pretty careful to specifically 
use ogg_int64_t where they _need_ more than 32 bit integers.

 I doubt it's something we want to accept into mainline-cvs, but perhaps we 
could set up a branch for weird-ps2-optimisations, if other people are going 
to find this useful? long being software-emulated is very weird, I dobut many 
other platforms do that - and since many of the longs are in the public API, 
we couldn't change them for the normal version anyway.

Mike

--- >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