summaryrefslogtreecommitdiffstats
path: root/mpg123_artsplugin/mpg123/layer3.c
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /mpg123_artsplugin/mpg123/layer3.c
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz
tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpg123_artsplugin/mpg123/layer3.c')
-rw-r--r--mpg123_artsplugin/mpg123/layer3.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/mpg123_artsplugin/mpg123/layer3.c b/mpg123_artsplugin/mpg123/layer3.c
index b4f33510..b012047a 100644
--- a/mpg123_artsplugin/mpg123/layer3.c
+++ b/mpg123_artsplugin/mpg123/layer3.c
@@ -612,7 +612,7 @@ static int pretab2[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
#define BITSHIFT ((sizeof(long)-1)*8)
#define REFRESH_MASK \
while(num < BITSHIFT) { \
- mask |= ((unsigned long)getbyte(&bsi))<<(BITSHIFT-num); \
+ tqmask |= ((unsigned long)getbyte(&bsi))<<(BITSHIFT-num); \
num += 8; \
part2remain -= 8; }
@@ -626,10 +626,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
int *me;
int num=getbitoffset(&bsi);
- long mask;
+ long tqmask;
/* we must split this, because for num==0 the shift is undefined if you do it in one step */
- mask = ((unsigned long) getbits(&bsi,num))<<BITSHIFT;
- mask <<= 8-num;
+ tqmask = ((unsigned long) getbits(&bsi,num))<<BITSHIFT;
+ tqmask <<= 8-num;
part2remain -= num;
{
@@ -702,10 +702,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
register short *val = h->table;
REFRESH_MASK;
while((y=*val++)<0) {
- if (mask < 0)
+ if (tqmask < 0)
val -= y;
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
x = y >> 4;
y &= 0xf;
@@ -713,23 +713,23 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if(x == 15 && h->linbits) {
max[lwin] = cb;
REFRESH_MASK;
- x += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits);
+ x += ((unsigned long) tqmask) >> (BITSHIFT+8-h->linbits);
num -= h->linbits+1;
- mask <<= h->linbits;
- if(mask < 0)
+ tqmask <<= h->linbits;
+ if(tqmask < 0)
*xrpnt = REAL_MUL(-ispow[x], v);
else
*xrpnt = REAL_MUL(ispow[x], v);
- mask <<= 1;
+ tqmask <<= 1;
}
else if(x) {
max[lwin] = cb;
- if(mask < 0)
+ if(tqmask < 0)
*xrpnt = REAL_MUL(-ispow[x], v);
else
*xrpnt = REAL_MUL(ispow[x], v);
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
else
*xrpnt = DOUBLE_TO_REAL(0.0);
@@ -737,23 +737,23 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if(y == 15 && h->linbits) {
max[lwin] = cb;
REFRESH_MASK;
- y += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits);
+ y += ((unsigned long) tqmask) >> (BITSHIFT+8-h->linbits);
num -= h->linbits+1;
- mask <<= h->linbits;
- if(mask < 0)
+ tqmask <<= h->linbits;
+ if(tqmask < 0)
*xrpnt = REAL_MUL(-ispow[y], v);
else
*xrpnt = REAL_MUL(ispow[y], v);
- mask <<= 1;
+ tqmask <<= 1;
}
else if(y) {
max[lwin] = cb;
- if(mask < 0)
+ if(tqmask < 0)
*xrpnt = REAL_MUL(-ispow[y], v);
else
*xrpnt = REAL_MUL(ispow[y], v);
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
else
*xrpnt = DOUBLE_TO_REAL(0.0);
@@ -767,10 +767,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
REFRESH_MASK;
while((a=*val++)<0) {
- if (mask < 0)
+ if (tqmask < 0)
val -= a;
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
if(part2remain+num <= 0) {
num -= part2remain+num;
@@ -800,12 +800,12 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if(part2remain+num <= 0) {
break;
}
- if(mask < 0)
+ if(tqmask < 0)
*xrpnt = -v;
else
*xrpnt = v;
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
else
*xrpnt = DOUBLE_TO_REAL(0.0);
@@ -879,10 +879,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
register short *val = h->table;
REFRESH_MASK;
while((y=*val++)<0) {
- if (mask < 0)
+ if (tqmask < 0)
val -= y;
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
x = y >> 4;
y &= 0xf;
@@ -891,23 +891,23 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if (x == 15 && h->linbits) {
max = cb;
REFRESH_MASK;
- x += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits);
+ x += ((unsigned long) tqmask) >> (BITSHIFT+8-h->linbits);
num -= h->linbits+1;
- mask <<= h->linbits;
- if(mask < 0)
+ tqmask <<= h->linbits;
+ if(tqmask < 0)
*xrpnt++ = REAL_MUL(-ispow[x], v);
else
*xrpnt++ = REAL_MUL(ispow[x], v);
- mask <<= 1;
+ tqmask <<= 1;
}
else if(x) {
max = cb;
- if(mask < 0)
+ if(tqmask < 0)
*xrpnt++ = REAL_MUL(-ispow[x], v);
else
*xrpnt++ = REAL_MUL(ispow[x], v);
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
else
*xrpnt++ = DOUBLE_TO_REAL(0.0);
@@ -915,23 +915,23 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if (y == 15 && h->linbits) {
max = cb;
REFRESH_MASK;
- y += ((unsigned long) mask) >> (BITSHIFT+8-h->linbits);
+ y += ((unsigned long) tqmask) >> (BITSHIFT+8-h->linbits);
num -= h->linbits+1;
- mask <<= h->linbits;
- if(mask < 0)
+ tqmask <<= h->linbits;
+ if(tqmask < 0)
*xrpnt++ = REAL_MUL(-ispow[y], v);
else
*xrpnt++ = REAL_MUL(ispow[y], v);
- mask <<= 1;
+ tqmask <<= 1;
}
else if(y) {
max = cb;
- if(mask < 0)
+ if(tqmask < 0)
*xrpnt++ = REAL_MUL(-ispow[y], v);
else
*xrpnt++ = REAL_MUL(ispow[y], v);
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
else
*xrpnt++ = DOUBLE_TO_REAL(0.0);
@@ -947,10 +947,10 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
REFRESH_MASK;
while((a=*val++)<0) {
- if (mask < 0)
+ if (tqmask < 0)
val -= a;
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
if(part2remain+num <= 0) {
num -= part2remain+num;
@@ -978,12 +978,12 @@ static int III_dequantize_sample(real xr[SBLIMIT][SSLIMIT],int *scf,
if(part2remain+num <= 0) {
break;
}
- if(mask < 0)
+ if(tqmask < 0)
*xrpnt++ = -v;
else
*xrpnt++ = v;
num--;
- mask <<= 1;
+ tqmask <<= 1;
}
else
*xrpnt++ = DOUBLE_TO_REAL(0.0);