mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-05 02:34:18 +00:00
sigh
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7883 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2e741e0f28
commit
959472d617
@ -40,7 +40,7 @@ $(SHOUT_DIR):
|
|||||||
$(GETLIB) $(SHOUT).tar.gz
|
$(GETLIB) $(SHOUT).tar.gz
|
||||||
|
|
||||||
$(SHOUT_DIR)/Makefile: $(SHOUT_DIR)
|
$(SHOUT_DIR)/Makefile: $(SHOUT_DIR)
|
||||||
cd $(SHOUT_DIR) && ./configure $(DEFAULT_ARGS) --with-speex=no
|
cd $(SHOUT_DIR) && ./configure $(DEFAULT_ARGS) --with-speex=no --without-vorbis
|
||||||
$(TOUCH_TARGET)
|
$(TOUCH_TARGET)
|
||||||
|
|
||||||
$(SHOUTLA): $(SHOUT_DIR)/Makefile
|
$(SHOUTLA): $(SHOUT_DIR)/Makefile
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#define MPEG1
|
#define MPEG1
|
||||||
|
|
||||||
/* These should all be constants setup once using init_layer3_const */
|
/* These should all be constants setup once using init_layer3_const */
|
||||||
static real ispow[8207];
|
static real __ispow[8207];
|
||||||
static real aa_ca[8], aa_cs[8];
|
static real aa_ca[8], aa_cs[8];
|
||||||
static real COS1[12][6];
|
static real COS1[12][6];
|
||||||
static real win[4][36];
|
static real win[4][36];
|
||||||
@ -33,6 +33,14 @@ struct bandInfoStruct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static inline real find_pow(int i)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (i > 0 && i < 8207) ? __ispow[i] : 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct bandInfoStruct bandInfo[9] = {
|
struct bandInfoStruct bandInfo[9] = {
|
||||||
|
|
||||||
/* MPEG 1.0 */
|
/* MPEG 1.0 */
|
||||||
@ -104,7 +112,7 @@ void init_layer3_const(void)
|
|||||||
gainpow2[i + 256] = pow((double) 2.0, -0.25 * (double) (i + 210));
|
gainpow2[i + 256] = pow((double) 2.0, -0.25 * (double) (i + 210));
|
||||||
|
|
||||||
for (i = 0; i < 8207; i++)
|
for (i = 0; i < 8207; i++)
|
||||||
ispow[i] = pow((double) i, (double) 4.0 / 3.0);
|
__ispow[i] = pow((double) i, (double) 4.0 / 3.0);
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
static double Ci[8] = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 };
|
static double Ci[8] = { -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037 };
|
||||||
@ -681,20 +689,21 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
|
|||||||
x = y >> 4;
|
x = y >> 4;
|
||||||
y &= 0xf;
|
y &= 0xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x == 15) {
|
if (x == 15) {
|
||||||
max[lwin] = cb;
|
max[lwin] = cb;
|
||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
x += getbits(mp, h->linbits);
|
x += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt = -ispow[x] * v;
|
*xrpnt = find_pow(x) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt = ispow[x] * v;
|
*xrpnt = find_pow(x) * v;
|
||||||
} else if (x) {
|
} else if (x) {
|
||||||
max[lwin] = cb;
|
max[lwin] = cb;
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt = -ispow[x] * v;
|
*xrpnt = find_pow(x) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt = ispow[x] * v;
|
*xrpnt = find_pow(x) * v;
|
||||||
part2remain--;
|
part2remain--;
|
||||||
} else
|
} else
|
||||||
*xrpnt = 0.0;
|
*xrpnt = 0.0;
|
||||||
@ -704,15 +713,15 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
y += getbits(mp, h->linbits);
|
y += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt = -ispow[y] * v;
|
*xrpnt = find_pow(y) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt = ispow[y] * v;
|
*xrpnt = find_pow(y) * v;
|
||||||
} else if (y) {
|
} else if (y) {
|
||||||
max[lwin] = cb;
|
max[lwin] = cb;
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt = -ispow[y] * v;
|
*xrpnt = find_pow(y) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt = ispow[y] * v;
|
*xrpnt = find_pow(y) * v;
|
||||||
part2remain--;
|
part2remain--;
|
||||||
} else
|
} else
|
||||||
*xrpnt = 0.0;
|
*xrpnt = 0.0;
|
||||||
@ -859,15 +868,15 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
x += getbits(mp, h->linbits);
|
x += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt++ = -ispow[x] * v;
|
*xrpnt++ = find_pow(x) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt++ = ispow[x] * v;
|
*xrpnt++ = find_pow(x) * v;
|
||||||
} else if (x) {
|
} else if (x) {
|
||||||
max = cb;
|
max = cb;
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt++ = -ispow[x] * v;
|
*xrpnt++ = find_pow(x) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt++ = ispow[x] * v;
|
*xrpnt++ = find_pow(x) * v;
|
||||||
part2remain--;
|
part2remain--;
|
||||||
} else
|
} else
|
||||||
*xrpnt++ = 0.0;
|
*xrpnt++ = 0.0;
|
||||||
@ -877,15 +886,15 @@ static int III_dequantize_sample(struct mpstr *mp, real xr[SBLIMIT][SSLIMIT], in
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
y += getbits(mp, h->linbits);
|
y += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt++ = -ispow[y] * v;
|
*xrpnt++ = find_pow(y) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt++ = ispow[y] * v;
|
*xrpnt++ = find_pow(y) * v;
|
||||||
} else if (y) {
|
} else if (y) {
|
||||||
max = cb;
|
max = cb;
|
||||||
if (get1bit(mp))
|
if (get1bit(mp))
|
||||||
*xrpnt++ = -ispow[y] * v;
|
*xrpnt++ = find_pow(y) * -1 * v;
|
||||||
else
|
else
|
||||||
*xrpnt++ = ispow[y] * v;
|
*xrpnt++ = find_pow(y) * v;
|
||||||
part2remain--;
|
part2remain--;
|
||||||
} else
|
} else
|
||||||
*xrpnt++ = 0.0;
|
*xrpnt++ = 0.0;
|
||||||
@ -1049,22 +1058,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
x += getbits(mp, h->linbits);
|
x += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt = *xr0pnt + a;
|
*xrpnt = *xr0pnt + a;
|
||||||
*xr0pnt -= a;
|
*xr0pnt -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt = *xr0pnt - a;
|
*xrpnt = *xr0pnt - a;
|
||||||
*xr0pnt += a;
|
*xr0pnt += a;
|
||||||
}
|
}
|
||||||
} else if (x) {
|
} else if (x) {
|
||||||
max[lwin] = cb;
|
max[lwin] = cb;
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt = *xr0pnt + a;
|
*xrpnt = *xr0pnt + a;
|
||||||
*xr0pnt -= a;
|
*xr0pnt -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt = *xr0pnt - a;
|
*xrpnt = *xr0pnt - a;
|
||||||
*xr0pnt += a;
|
*xr0pnt += a;
|
||||||
}
|
}
|
||||||
@ -1079,22 +1088,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
y += getbits(mp, h->linbits);
|
y += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt = *xr0pnt + a;
|
*xrpnt = *xr0pnt + a;
|
||||||
*xr0pnt -= a;
|
*xr0pnt -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt = *xr0pnt - a;
|
*xrpnt = *xr0pnt - a;
|
||||||
*xr0pnt += a;
|
*xr0pnt += a;
|
||||||
}
|
}
|
||||||
} else if (y) {
|
} else if (y) {
|
||||||
max[lwin] = cb;
|
max[lwin] = cb;
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt = *xr0pnt + a;
|
*xrpnt = *xr0pnt + a;
|
||||||
*xr0pnt -= a;
|
*xr0pnt -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt = *xr0pnt - a;
|
*xrpnt = *xr0pnt - a;
|
||||||
*xr0pnt += a;
|
*xr0pnt += a;
|
||||||
}
|
}
|
||||||
@ -1231,22 +1240,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
x += getbits(mp, h->linbits);
|
x += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt++ = *xr0pnt + a;
|
*xrpnt++ = *xr0pnt + a;
|
||||||
*xr0pnt++ -= a;
|
*xr0pnt++ -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt++ = *xr0pnt - a;
|
*xrpnt++ = *xr0pnt - a;
|
||||||
*xr0pnt++ += a;
|
*xr0pnt++ += a;
|
||||||
}
|
}
|
||||||
} else if (x) {
|
} else if (x) {
|
||||||
max = cb;
|
max = cb;
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt++ = *xr0pnt + a;
|
*xrpnt++ = *xr0pnt + a;
|
||||||
*xr0pnt++ -= a;
|
*xr0pnt++ -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[x] * v;
|
real a = find_pow(x) * v;
|
||||||
*xrpnt++ = *xr0pnt - a;
|
*xrpnt++ = *xr0pnt - a;
|
||||||
*xr0pnt++ += a;
|
*xr0pnt++ += a;
|
||||||
}
|
}
|
||||||
@ -1259,22 +1268,22 @@ static int III_dequantize_sample_ms(real xr[2][SBLIMIT][SSLIMIT], int *scf, stru
|
|||||||
part2remain -= h->linbits + 1;
|
part2remain -= h->linbits + 1;
|
||||||
y += getbits(mp, h->linbits);
|
y += getbits(mp, h->linbits);
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt++ = *xr0pnt + a;
|
*xrpnt++ = *xr0pnt + a;
|
||||||
*xr0pnt++ -= a;
|
*xr0pnt++ -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt++ = *xr0pnt - a;
|
*xrpnt++ = *xr0pnt - a;
|
||||||
*xr0pnt++ += a;
|
*xr0pnt++ += a;
|
||||||
}
|
}
|
||||||
} else if (y) {
|
} else if (y) {
|
||||||
max = cb;
|
max = cb;
|
||||||
if (get1bit(mp)) {
|
if (get1bit(mp)) {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt++ = *xr0pnt + a;
|
*xrpnt++ = *xr0pnt + a;
|
||||||
*xr0pnt++ -= a;
|
*xr0pnt++ -= a;
|
||||||
} else {
|
} else {
|
||||||
real a = ispow[y] * v;
|
real a = find_pow(y) * v;
|
||||||
*xrpnt++ = *xr0pnt - a;
|
*xrpnt++ = *xr0pnt - a;
|
||||||
*xr0pnt++ += a;
|
*xr0pnt++ += a;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user