[Mplayer-cvslog] CVS: main/libac3 bit_allocate.c,1.1.1.1,1.2
Ivan Kalvachev
iive at mplayer.dev.hu
Fri Nov 16 19:05:41 CET 2001
Update of /cvsroot/mplayer/main/libac3
In directory mplayer:/var/tmp.root/cvs-serv28290
Modified Files:
bit_allocate.c
Log Message:
min/max conflict in QNX renamed to ac3_min/ac3_max
Index: bit_allocate.c
===================================================================
RCS file: /cvsroot/mplayer/main/libac3/bit_allocate.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- bit_allocate.c 24 Feb 2001 20:29:35 -0000 1.1.1.1
+++ bit_allocate.c 16 Nov 2001 18:05:39 -0000 1.2
@@ -30,8 +30,8 @@
static inline int16_t logadd(int16_t a,int16_t b);
static int16_t calc_lowcomp(int16_t a,int16_t b0,int16_t b1,int16_t bin);
-static inline uint16_t min(int16_t a,int16_t b);
-static inline uint16_t max(int16_t a,int16_t b);
+static inline uint16_t ac3_min(int16_t a,int16_t b);
+static inline uint16_t ac3_max(int16_t a,int16_t b);
static void ba_compute_psd(int16_t start, int16_t end, int16_t exps[],
int16_t psd[], int16_t bndpsd[]);
@@ -164,7 +164,7 @@
*
**/
-static inline uint16_t max(int16_t a,int16_t b)
+static inline uint16_t ac3_max(int16_t a,int16_t b)
{
return (a > b ? a : b);
}
@@ -174,7 +174,7 @@
*
**/
-static inline uint16_t min(int16_t a,int16_t b)
+static inline uint16_t ac3_min(int16_t a,int16_t b)
{
return (a < b ? a : b);
}
@@ -190,7 +190,7 @@
int16_t address;
c = a - b;
- address = min((abs(c) >> 1), 255);
+ address = ac3_min((abs(c) >> 1), 255);
if (c >= 0)
return(a + latab[address]);
@@ -318,7 +318,7 @@
k = masktab[start];
do {
- lastbin = min(bndtab[k] + bndsz[k], end);
+ lastbin = ac3_min(bndtab[k] + bndsz[k], end);
bndpsd[k] = psd[j];
j++;
@@ -373,14 +373,14 @@
}
}
- for (bin = begin; bin < min(bndend, 22); bin++) {
+ for (bin = begin; bin < ac3_min(bndend, 22); bin++) {
if (!(is_lfe && (bin == 6)))
lowcomp = calc_lowcomp(lowcomp, bndpsd[bin], bndpsd[bin+1], bin);
fastleak -= fdecay ;
- fastleak = max(fastleak, bndpsd[bin] - fgain);
+ fastleak = ac3_max(fastleak, bndpsd[bin] - fgain);
slowleak -= sdecay ;
- slowleak = max(slowleak, bndpsd[bin] - sgain);
- excite[bin] = max(fastleak - lowcomp, slowleak);
+ slowleak = ac3_max(slowleak, bndpsd[bin] - sgain);
+ excite[bin] = ac3_max(fastleak - lowcomp, slowleak);
}
begin = 22;
}
@@ -389,10 +389,10 @@
for (bin = begin; bin < bndend; bin++) {
fastleak -= fdecay;
- fastleak = max(fastleak, bndpsd[bin] - fgain);
+ fastleak = ac3_max(fastleak, bndpsd[bin] - fgain);
slowleak -= sdecay;
- slowleak = max(slowleak, bndpsd[bin] - sgain);
- excite[bin] = max(fastleak, slowleak) ;
+ slowleak = ac3_max(slowleak, bndpsd[bin] - sgain);
+ excite[bin] = ac3_max(fastleak, slowleak) ;
}
}
@@ -419,7 +419,7 @@
if (bndpsd[bin] < dbknee) {
excite[bin] += ((dbknee - bndpsd[bin]) >> 2);
}
- mask[bin] = max(excite[bin], hth[fscod][bin]);
+ mask[bin] = ac3_max(excite[bin], hth[fscod][bin]);
}
/* Perform delta bit modulation if necessary */
@@ -461,7 +461,7 @@
j = masktab[start];
do {
- lastbin = min(bndtab[j] + bndsz[j], end);
+ lastbin = ac3_min(bndtab[j] + bndsz[j], end);
mask[j] -= snroffset;
mask[j] -= floor;
@@ -472,7 +472,7 @@
mask[j] += floor;
for (k = i; k < lastbin; k++) {
address = (psd[i] - mask[j]) >> 5;
- address = min(63, max(0, address));
+ address = ac3_min(63, ac3_max(0, address));
bap[i] = baptab[address];
i++;
}
@@ -492,14 +492,14 @@
if ((b0 + 256) == b1)
a = 384;
else if (b0 > b1)
- a = max(0, a - 64);
+ a = ac3_max(0, a - 64);
} else if (bin < 20) {
if ((b0 + 256) == b1)
a = 320;
else if (b0 > b1)
- a = max(0, a - 64) ;
+ a = ac3_max(0, a - 64) ;
} else
- a = max(0, a - 128);
+ a = ac3_max(0, a - 128);
return(a);
}
More information about the MPlayer-cvslog
mailing list