annotate Plugins/Input/mpg123/getbits.h @ 767:3ade061e7364 trunk

[svn] - typo
author nenolod
date Wed, 01 Mar 2006 10:05:28 -0800
parents 05d824e30afd
children b5ae09a6c2f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
1
127
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
2 /* that's the same file as getits.c but with defines to
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
3 force inlining */
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
4
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
5 unsigned long rval;
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
6 unsigned char rval_uc;
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
7
127
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
8 #define mpg123_backbits(bitbuf,nob) ((void)( \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
9 (*(bitbuf)).bitindex -= (nob), \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
10 (*(bitbuf)).wordpointer += ((*(bitbuf)).bitindex>>3), \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
11 (*(bitbuf)).bitindex &= 0x7 ))
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
12
127
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
13 #define mpg123_getbitoffset(bitbuf) ((-(*(bitbuf)).bitindex)&0x7)
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
14 #define mpg123_getbyte(bitbuf) (*(*(bitbuf)).wordpointer++)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
15
127
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
16 #define mpg123_getbits(bitbuf,nob) ( \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
17 rval = (*(bitbuf)).wordpointer[0], rval <<= 8, rval |= (*(bitbuf)).wordpointer[1], \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
18 rval <<= 8, rval |= (*(bitbuf)).wordpointer[2], rval <<= (*(bitbuf)).bitindex, \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
19 rval &= 0xffffff, (*(bitbuf)).bitindex += (nob), \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
20 rval >>= (24-(nob)), (*(bitbuf)).wordpointer += ((*(bitbuf)).bitindex>>3), \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
21 (*(bitbuf)).bitindex &= 7,rval)
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
22
127
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
23 #define mpg123_getbits_fast(bitbuf,nob) ( \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
24 rval = (unsigned char) ((*(bitbuf)).wordpointer[0] << (*(bitbuf)).bitindex), \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
25 rval |= ((unsigned long) (*(bitbuf)).wordpointer[1]<<(*(bitbuf)).bitindex)>>8, \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
26 rval <<= (nob), rval >>= 8, \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
27 (*(bitbuf)).bitindex += (nob), (*(bitbuf)).wordpointer += ((*(bitbuf)).bitindex>>3), \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
28 (*(bitbuf)).bitindex &= 7, rval )
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
29
127
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
30 #define mpg123_get1bit(bitbuf) ( \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
31 rval_uc = *(*(bitbuf)).wordpointer << (*(bitbuf)).bitindex, (*(bitbuf)).bitindex++, \
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
32 (*(bitbuf)).wordpointer += ((*(bitbuf)).bitindex>>3), (*(bitbuf)).bitindex &= 7, rval_uc>>7 )
05d824e30afd [svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents: 61
diff changeset
33