summaryrefslogtreecommitdiff
path: root/src/libxineadec
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-12-07 15:34:29 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-12-07 15:34:29 +0000
commitc8fdff20285b59cd892297317572fbb4c3633f78 (patch)
tree102be6141b635eb2bff16358ca13b79924b211f4 /src/libxineadec
parenta2dcf860b2777e530646abd00202c3fb5b3a5a81 (diff)
downloadxine-lib-c8fdff20285b59cd892297317572fbb4c3633f78.tar.gz
xine-lib-c8fdff20285b59cd892297317572fbb4c3633f78.tar.bz2
get rid of XINE_{ASSERT,ABORT} and useless xine_print_trace (useless). Replace XINE_ASSERT by _x_assert, which works exaclty as assert, except that it still warns with NDEBUG defined (but don't abort). Fix missuning of assert(0), which isn't safe, abort is abort, assert is for debugging purpose only, so all assert(0) has been converted to abort() alls. In osd_preload_fonts(): alloc needed memory chunk. Define NDEBUG in CFLAGS, for non DEBUG build only.
CVS patchset: 5860 CVS date: 2003/12/07 15:34:29
Diffstat (limited to 'src/libxineadec')
-rw-r--r--src/libxineadec/gsm610/long_term.c54
-rw-r--r--src/libxineadec/gsm610/lpc.c22
-rw-r--r--src/libxineadec/gsm610/rpe.c30
-rw-r--r--src/libxineadec/gsm610/short_term.c4
4 files changed, 55 insertions, 55 deletions
diff --git a/src/libxineadec/gsm610/long_term.c b/src/libxineadec/gsm610/long_term.c
index c8564447d..625662e1f 100644
--- a/src/libxineadec/gsm610/long_term.c
+++ b/src/libxineadec/gsm610/long_term.c
@@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/long_term.c,v 1.2 2003/02/28 02:51:50 storri Exp $ */
+/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/long_term.c,v 1.3 2003/12/07 15:34:30 f1rmb Exp $ */
#include <stdio.h>
#include "xineutils.h"
@@ -81,13 +81,13 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
temp = 0;
if (dmax == 0) scal = 0;
else {
- XINE_ASSERT(dmax > 0, "value 'dmax' is not > 0: %d", dmax);
+ _x_assert(dmax > 0);
temp = gsm_norm( (longword)dmax << 16 );
}
if (temp > 6) scal = 0;
else scal = 6 - temp;
- XINE_ASSERT(scal >= 0, "value 'scal' is not >= 0: %d", scal);
+ _x_assert(scal >= 0);
/* Search for the maximum cross-correlation and coding of the LTP lag
*/
@@ -107,10 +107,10 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
/* Rescaling of L_max
*/
- XINE_ASSERT((scal <= 100) && (scal >= -100), "value 'scal' is not within range -100 to 100: %d", scal);
+ _x_assert((scal <= 100) && (scal >= -100));
L_max = L_max >> (6 - scal); /* sub(6, scal) */
- XINE_ASSERT( Nc <= 120 && Nc >= 40, "value 'Nc' is not within range 40 to 120: %d", Nc);
+ _x_assert(Nc <= 120 && Nc >= 40);
/* Compute the power of the reconstructed short term residual
* signal dp[..]
@@ -182,14 +182,14 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
temp = 0;
if (dmax == 0) scal = 0;
else {
- XINE_ASSERT(dmax > 0, "value 'dmax' is not > 0: %d", dmax);
- temp = gsm_norm( (longword)dmax << 16 );
+ _x_assert(dmax > 0);
+ temp = gsm_norm( (longword)dmax << 16 );
}
if (temp > 6) scal = 0;
else scal = 6 - temp;
- XINE_ASSERT(scal >= 0, "value 'scal' is not >= 0: %d", scal);
+ _x_assert(scal >= 0);
/* Initialization of a working array wt
*/
@@ -242,10 +242,10 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
/* Rescaling of L_max
*/
- XINE_ASSERT( (scal <= 100) && (scal >= -100), "value 'scal' is not within range -100 to 100: %d", scal);
+ _x_assert( (scal <= 100) && (scal >= -100));
L_max = L_max >> (6 - scal); /* sub(6, scal) */
- XINE_ASSERT( Nc <= 120 && Nc >= 40, "value 'Nc' is not within range 40 to 120: %d", Nc);
+ _x_assert( Nc <= 120 && Nc >= 40);
/* Compute the power of the reconstructed short term residual
* signal dp[..]
@@ -323,7 +323,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
temp = 0;
if (dmax == 0) scal = 0;
else {
- XINE_ASSERT(dmax > 0, "value 'dmax' is not > 0: %d", dmax);
+ _x_assert(dmax > 0);
temp = gsm_norm( (longword)dmax << 16 );
}
@@ -331,7 +331,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
if (temp > 6) scal = 0;
else scal = 6 - temp;
- XINE_ASSERT(scal >= 0, "value 'scal' is not >= 0: %d", scal);
+ _x_assert(scal >= 0);
ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100;
@@ -424,11 +424,11 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
/* Rescaling of L_max
*/
- XINE_ASSERT( (scal <= 100) && (scal >= -100), "value 'scal' is not within range -100 to 100: %d", scal);
+ _x_assert( (scal <= 100) && (scal >= -100));
L_max = L_max >> (6 - scal); /* sub(6, scal) */
- XINE_ASSERT( Nc <= 120 && Nc >= 40, "value 'Nc' is not within range 40 to 120: %d", Nc);
+ _x_assert( Nc <= 120 && Nc >= 40);
/* Compute the power of the reconstructed short term residual
* signal dp[..]
@@ -502,14 +502,14 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
temp = 0;
if (dmax == 0) scal = 0;
else {
- XINE_ASSERT(dmax > 0, "value 'dmax' is not > 0: %d", dmax);
+ _x_assert(dmax > 0);
temp = gsm_norm( (longword)dmax << 16 );
}
if (temp > 6) scal = 0;
else scal = 6 - temp;
- XINE_ASSERT(scal >= 0, "value 'scal' is not >= 0: %d", scal);
+ _x_assert(scal >= 0);
/* Initialization of a working array wt
*/
@@ -591,11 +591,11 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
/* Rescaling of L_max
*/
- XINE_ASSERT( (scal <= 100) && (scal >= -100), "value 'scal' is not within range -100 to 100: %d", scal);
+ _x_assert( (scal <= 100) && (scal >= -100));
L_max = L_max >> (6 - scal); /* sub(6, scal) */
- XINE_ASSERT( Nc <= 120 && Nc >= 40, "value 'Nc' is not within range 40 to 120: %d", Nc);
+ _x_assert( Nc <= 120 && Nc >= 40);
/* Compute the power of the reconstructed short term residual
@@ -666,7 +666,7 @@ static void Cut_Fast_Calculation_of_the_LTP_parameters P5((st,
else if (-d[k] > wt_max) wt_max = -d[best_k = k];
}
- XINE_ASSERT(wt_max >= 0, "value 'wt_max' is not >= 0: %d", wt_max);
+ _x_assert(wt_max >= 0);
wt_float = (float)wt_max;
for (k = -120; k < 0; ++k) dp_float[k] = (float)dp[k];
@@ -884,12 +884,12 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */
word * bc /* gain factor OUT */
)
{
- XINE_ASSERT( d,"value 'd' is NULL");
- XINE_ASSERT( dp, "value 'dp' is NULL");
- XINE_ASSERT( e, "value 'e' is NULL");
- XINE_ASSERT( dpp, "value 'dpp' is NULL");
- XINE_ASSERT( Nc, "value 'Nc' is NULL");
- XINE_ASSERT( bc, "value 'bc' is NULL" );
+ _x_assert( d );
+ _x_assert( dp );
+ _x_assert( e );
+ _x_assert( dpp );
+ _x_assert( Nc );
+ _x_assert( bc );
#if defined(FAST) && defined(USE_FLOAT_MUL)
if (S->fast)
@@ -935,7 +935,7 @@ void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),
*/
Nr = Ncr < 40 || Ncr > 120 ? S->nrp : Ncr;
S->nrp = Nr;
- XINE_ASSERT(Nr >= 40 && Nr <= 120, "value 'Nr' is not within range of 40 to 120: %d", Nr);
+ _x_assert(Nr >= 40 && Nr <= 120);
/* Decoding of the LTP gain bcr
*/
@@ -944,7 +944,7 @@ void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),
/* Computation of the reconstructed short term residual
* signal drp[0..39]
*/
- XINE_ASSERT(brp != MIN_WORD, "value 'brp' is equal to MIN_WORD");
+ _x_assert(brp != MIN_WORD);
for (k = 0; k <= 39; k++) {
drpp = GSM_MULT_R( brp, drp[ k - Nr ] );
diff --git a/src/libxineadec/gsm610/lpc.c b/src/libxineadec/gsm610/lpc.c
index 461f0b70f..0f51fa55f 100644
--- a/src/libxineadec/gsm610/lpc.c
+++ b/src/libxineadec/gsm610/lpc.c
@@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/lpc.c,v 1.2 2003/02/28 02:51:50 storri Exp $ */
+/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/lpc.c,v 1.3 2003/12/07 15:34:30 f1rmb Exp $ */
#include <stdio.h>
#include "xineutils.h"
@@ -54,7 +54,7 @@ static void Autocorrelation P2((s, L_ACF),
*/
if (smax == 0) scalauto = 0;
else {
- XINE_ASSERT(smax > 0, "Scale maximum (smax) is not greater than 0: %d", smax);
+ _x_assert(smax > 0);
scalauto = 4 - gsm_norm( (longword)smax << 16 );/* sub(4,..) */
}
@@ -139,7 +139,7 @@ static void Autocorrelation P2((s, L_ACF),
/* Rescaling of the array s[0..159]
*/
if (scalauto > 0) {
- XINE_ASSERT(scalauto <= 4, "scalauto is not <= 4: %d", scalauto);
+ _x_assert(scalauto <= 4);
for (k = 160; k--; *s++ <<= scalauto) ;
}
}
@@ -194,10 +194,10 @@ static void Reflection_coefficients P2( (L_ACF, r),
return;
}
- XINE_ASSERT( L_ACF[0] != 0 , "L_ACF[0] is NULL");
+ _x_assert( L_ACF[0] != 0 );
temp = gsm_norm( L_ACF[0] );
- XINE_ASSERT(temp >= 0 && temp < 32, "temp is not within range 0 to 32: %d", temp);
+ _x_assert(temp >= 0 && temp < 32);
/* ? overflow ? */
for (i = 0; i <= 8; i++) ACF[i] = SASR( L_ACF[i] << temp, 16 );
@@ -221,11 +221,11 @@ static void Reflection_coefficients P2( (L_ACF, r),
*r = gsm_div( temp, P[0] );
- XINE_ASSERT(*r >= 0, "value 'r' is not >= 0: %d", *r);
+ _x_assert(*r >= 0);
if (P[1] > 0) *r = -*r; /* r[n] = sub(0, r[n]) */
- XINE_ASSERT (*r != MIN_WORD, "value 'r' is equal to MIN_WORD: %d", *r);
+ _x_assert(*r != MIN_WORD);
if (n == 8) return;
@@ -268,15 +268,15 @@ static void Transformation_to_Log_Area_Ratios P1((r),
temp = *r;
temp = GSM_ABS(temp);
- XINE_ASSERT(temp >= 0, "value 'temp' is not >= 0: %d", temp);
+ _x_assert(temp >= 0);
if (temp < 22118) {
temp >>= 1;
} else if (temp < 31130) {
- XINE_ASSERT(temp >= 11059, "value 'temp' is not >= 11059: %d", temp);
+ _x_assert(temp >= 11059);
temp -= 11059;
} else {
- XINE_ASSERT(temp >= 26112, "value 'temp' is not >= 26112: %d", temp);
+ _x_assert(temp >= 26112);
temp -= 26112;
temp <<= 2;
}
@@ -287,7 +287,7 @@ static void Transformation_to_Log_Area_Ratios P1((r),
else {
*r = temp;
}
- XINE_ASSERT (*r != MIN_WORD, "value 'r' is equal to MIN_WORD: %d", *r);
+ _x_assert(*r != MIN_WORD);
}
}
diff --git a/src/libxineadec/gsm610/rpe.c b/src/libxineadec/gsm610/rpe.c
index 4a9751cfa..67d94d30e 100644
--- a/src/libxineadec/gsm610/rpe.c
+++ b/src/libxineadec/gsm610/rpe.c
@@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/rpe.c,v 1.2 2003/02/28 02:51:50 storri Exp $ */
+/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/rpe.c,v 1.3 2003/12/07 15:34:30 f1rmb Exp $ */
#include <stdio.h>
#include "xineutils.h"
@@ -141,7 +141,7 @@ static void RPE_grid_selection P3((x,xM,Mc_out),
*
* temp1 = SASR( x[m + 3*i], 2 );
*
- * XINE_ASSERT(temp1 != MIN_WORD,"temp1 equals MIN_WORD");
+ * _x_assert(temp1 != MIN_WORD);
*
* L_temp = GSM_L_MULT( temp1, temp1 );
* L_result = GSM_L_ADD( L_temp, L_result );
@@ -245,8 +245,8 @@ static void APCM_quantization_xmaxc_to_exp_mant P3((xmaxc,exp_out,mant_out),
mant -= 8;
}
- XINE_ASSERT( exp >= -4 && exp <= 6,"exp is not within range of -4 to 6: %d", exp );
- XINE_ASSERT( mant >= 0 && mant <= 7,"mant is not within range of 0 to 7: %d", mant );
+ _x_assert( exp >= -4 && exp <= 6 );
+ _x_assert( mant >= 0 && mant <= 7 );
*exp_out = exp;
*mant_out = mant;
@@ -289,14 +289,14 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
itest |= (temp <= 0);
temp = SASR( temp, 1 );
- XINE_ASSERT(exp <= 5, "exp is greater than 5: %d", exp);
+ _x_assert(exp <= 5);
if (itest == 0) exp++; /* exp = add (exp, 1) */
}
- XINE_ASSERT(exp <= 6 && exp >= 0, "exp is not within range of 0 to 6: %d", exp);
+ _x_assert(exp <= 6 && exp >= 0);
temp = exp + 5;
- XINE_ASSERT(temp <= 11 && temp >= 0, "temp is within range of 0 to 11: %d", temp);
+ _x_assert(temp <= 11 && temp >= 0);
xmaxc = gsm_add( SASR(xmax, temp), exp << 3 );
/* Quantizing and coding of the xM[0..12] RPE sequence
@@ -319,15 +319,15 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
/* Direct computation of xMc[0..12] using table 4.5
*/
- XINE_ASSERT((exp <= 4096) && (exp >= -4096), "exp is not within range of -4069 to 4096: %d", exp );
- XINE_ASSERT((mant >= 0) && (mant <= 7), "mant is not within range of 0 to 7: %d", mant );
+ _x_assert((exp <= 4096) && (exp >= -4096));
+ _x_assert((mant >= 0) && (mant <= 7));
temp1 = 6 - exp; /* normalization by the exponent */
temp2 = gsm_NRFAC[ mant ]; /* inverse mantissa */
for (i = 0; i <= 12; i++) {
- XINE_ASSERT(temp1 >= 0 && temp1 < 16, "temp1 is not within range of 0 to 15: %d", temp1);
+ _x_assert(temp1 >= 0 && temp1 < 16);
temp = xM[i] << temp1;
temp = GSM_MULT( temp, temp2 );
@@ -360,21 +360,21 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
word temp, temp1, temp2, temp3;
longword ltmp;
- XINE_ASSERT((mant >= 0) && (mant <= 7), "mant is not within range of 0 to 7: %d", mant );
+ _x_assert((mant >= 0) && (mant <= 7));
temp1 = gsm_FAC[ mant ]; /* see 4.2-15 for mant */
temp2 = gsm_sub( 6, exp ); /* see 4.2-15 for exp */
temp3 = gsm_asl( 1, gsm_sub( temp2, 1 ));
for (i = 13; i--;) {
- XINE_ASSERT((mant >= 0) && (mant <= 7), "mant is not within range of 0 to 7: %d", mant );
+ _x_assert((mant >= 0) && (mant <= 7));
- XINE_ASSERT((*xMc <= 7) && (*xMc >= 0), "xMc is not 3 bit unsigned: %d", *xMc ); /* 3 bit unsigned */
+ _x_assert((*xMc <= 7) && (*xMc >= 0)); /* 3 bit unsigned */
/* temp = gsm_sub( *xMc++ << 1, 7 ); */
temp = (*xMc++ << 1) - 7; /* restore sign */
- XINE_ASSERT((temp <= 7) && (temp >= -7), "temp is not 4 bit signed: %d", temp); /* 4 bit signed */
+ _x_assert((temp <= 7) && (temp >= -7)); /* 4 bit signed */
temp <<= 12; /* 16 bit signed */
temp = GSM_MULT_R( temp1, temp );
@@ -400,7 +400,7 @@ static void RPE_grid_positioning P3((Mc,xMp,ep),
{
int i = 13;
- XINE_ASSERT((0 <= Mc) && (Mc <= 3), "Mc is not within the range of 0 to 3: %d", Mc);
+ _x_assert((0 <= Mc) && (Mc <= 3));
switch (Mc) {
case 3: *ep++ = 0;
diff --git a/src/libxineadec/gsm610/short_term.c b/src/libxineadec/gsm610/short_term.c
index 52ac623d2..8222b2caa 100644
--- a/src/libxineadec/gsm610/short_term.c
+++ b/src/libxineadec/gsm610/short_term.c
@@ -4,7 +4,7 @@
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
*/
-/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/short_term.c,v 1.2 2003/02/28 02:51:50 storri Exp $ */
+/* $Header: /nfshome/cvs/xine-lib/src/libxineadec/gsm610/short_term.c,v 1.3 2003/12/07 15:34:30 f1rmb Exp $ */
#include <stdio.h>
#include "xineutils.h"
@@ -42,7 +42,7 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
* temp2 = *B << 1;
* temp1 = GSM_SUB( temp1, temp2 );
*
- * XINE_ASSERT(*INVA != MIN_WORD, "INVA table equlas MIN_WORD");
+ * _x_assert(*INVA != MIN_WORD);
*
* temp1 = GSM_MULT_R( *INVA, temp1 );
* *LARpp = GSM_ADD( temp1, temp1 );