In vorbis/lib/mdct.h the following are defined: for integer: #define TRIGBITS 14 #define cPI3_8 6270 #define cPI2_8 11585 #define cPI1_8 15137 #define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5)) for floats: #define cPI3_8 .38268343236508977175F #define cPI2_8 .70710678118654752441F #define cPI1_8 .92387953251128675613F #define FLOAT_CONV(x) = x Could someone explain where these values come from? What's the significance of TRIGBITS? It seems that the integer values are related to the floating point values by q14 representation (multiply by 2^14 to get the integer values) but why chose q14? Why the subscript _8? And what do PI1, PI2, PI3 represent? Hope someone can shed some light on this for me! Gov <p>--- >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-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
>#define cPI3_8 .38268343236508977175F >#define cPI2_8 .70710678118654752441F >#define cPI1_8 .92387953251128675613FThose are the values for cos(PI/8), cos(2*PI/8), and cos(3*PI/8). Hope this helps, Carsten Haese. <p><p><p>--- >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-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Yes, thanks a lot!!! -----Original Message----- From: Carsten Haese [mailto:chaese@accesstoledo.com] Sent: Thursday, August 01, 2002 4:14 PM To: vorbis@xiph.org Subject: RE: [vorbis] mdct.h - PI1_8, PI2_8 etc. <p>>#define cPI3_8 .38268343236508977175F>#define cPI2_8 .70710678118654752441F >#define cPI1_8 .92387953251128675613FThose are the values for cos(PI/8), cos(2*PI/8), and cos(3*PI/8). Hope this helps, Carsten Haese. <p><p><p>--- >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-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered. <p>--- >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-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.