For the longest time I took out a compiler and started cranking out an old idea. In that vein, I'm using libsndfile and its (highly reasonable) processing model: you just keep everything to zero padded ints (preferably signed) and go from there.

The trouble is that my code is of the kind that also requires lots of bit twiddling. My current problem comes from trying to make the code more or less adaptive to any bit width, while I also have to do stuff like computed shifts.

So, how do you go about systematically and portably implementing what you would expect from your logical operations, using standard C operations, without knowing the basic width of your types? (Logical, not arithmetic) right shifts of signed quantities, efficient parity, and computed shifts with negative offsets are proving particularly nasty at the moment. (It has to do with dithering at arbitrary word length which also has to be reasonably efficient if any set in silicon.)
--
Sampo Syreeni, aka decoy - de...@iki.fi, http://decoy.iki.fi/front
+358-50-5756111, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to