[Mplayer-cvslog] CVS: main/g72x g721.c,1.1,1.2 g723_16.c,1.1,1.2 g723_24.c,1.1,1.2 g723_40.c,1.1,1.2 g72x.c,1.2,1.3 private.h,1.1,1.2

Alex Beregszaszi alex at mplayer.dev.hu
Sat Dec 29 12:09:20 CET 2001


Update of /cvsroot/mplayer/main/g72x
In directory mplayer:/var/tmp.root/cvs-serv23216

Modified Files:
	g721.c g723_16.c g723_24.c g723_40.c g72x.c private.h 
Log Message:
prefixed all exported functions with g72x_ to eleminate further collisons

Index: g721.c
===================================================================
RCS file: /cvsroot/mplayer/main/g72x/g721.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- g721.c	17 Nov 2001 21:35:53 -0000	1.1
+++ g721.c	29 Dec 2001 11:09:07 -0000	1.2
@@ -92,23 +92,23 @@
 	/* linearize input sample to 14-bit PCM */
 	sl >>= 2;			/* 14-bit dynamic range */
 
-	sezi = predictor_zero(state_ptr);
+	sezi = g72x_predictor_zero(state_ptr);
 	sez = sezi >> 1;
-	se = (sezi + predictor_pole(state_ptr)) >> 1;	/* estimated signal */
+	se = (sezi + g72x_predictor_pole(state_ptr)) >> 1;	/* estimated signal */
 
 	d = sl - se;				/* estimation difference */
 
 	/* quantize the prediction difference */
-	y = step_size(state_ptr);		/* quantizer step size */
-	i = quantize(d, y, qtab_721, 7);	/* i = ADPCM code */
+	y = g72x_step_size(state_ptr);		/* quantizer step size */
+	i = g72x_quantize(d, y, qtab_721, 7);	/* i = ADPCM code */
 
-	dq = reconstruct(i & 8, _dqlntab[i], y);	/* quantized est diff */
+	dq = g72x_reconstruct(i & 8, _dqlntab[i], y);	/* quantized est diff */
 
 	sr = (dq < 0) ? se - (dq & 0x3FFF) : se + dq;	/* reconst. signal */
 
 	dqsez = sr + sez - se;			/* pole prediction diff. */
 
-	update(4, y, _witab[i] << 5, _fitab[i], dq, sr, dqsez, state_ptr);
+	g72x_update(4, y, _witab[i] << 5, _fitab[i], dq, sr, dqsez, state_ptr);
 
 	return (i);
 }
@@ -134,20 +134,20 @@
 	short		dqsez;
 
 	i &= 0x0f;			/* mask to get proper bits */
-	sezi = predictor_zero(state_ptr);
+	sezi = g72x_predictor_zero(state_ptr);
 	sez = sezi >> 1;
-	sei = sezi + predictor_pole(state_ptr);
+	sei = sezi + g72x_predictor_pole(state_ptr);
 	se = sei >> 1;			/* se = estimated signal */
 
-	y = step_size(state_ptr);	/* dynamic quantizer step size */
+	y = g72x_step_size(state_ptr);	/* dynamic quantizer step size */
 
-	dq = reconstruct(i & 0x08, _dqlntab[i], y); /* quantized diff. */
+	dq = g72x_reconstruct(i & 0x08, _dqlntab[i], y); /* quantized diff. */
 
 	sr = (dq < 0) ? (se - (dq & 0x3FFF)) : se + dq;	/* reconst. signal */
 
 	dqsez = sr - se + sez;			/* pole prediction diff. */
 
-	update(4, y, _witab[i] << 5, _fitab[i], dq, sr, dqsez, state_ptr);
+	g72x_update(4, y, _witab[i] << 5, _fitab[i], dq, sr, dqsez, state_ptr);
 
 	/* sr was 14-bit dynamic range */
 	return (sr << 2);	

Index: g723_16.c
===================================================================
RCS file: /cvsroot/mplayer/main/g72x/g723_16.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- g723_16.c	17 Nov 2001 21:35:53 -0000	1.1
+++ g723_16.c	29 Dec 2001 11:09:07 -0000	1.2
@@ -94,16 +94,16 @@
 		/* linearize input sample to 14-bit PCM */
 		sl >>= 2;               /* sl of 14-bit dynamic range */
 
-       sezi = predictor_zero(state_ptr);
+       sezi = g72x_predictor_zero(state_ptr);
        sez = sezi >> 1;
-       sei = sezi + predictor_pole(state_ptr);
+       sei = sezi + g72x_predictor_pole(state_ptr);
        se = sei >> 1;                  /* se = estimated signal */
 
        d = sl - se;                    /* d = estimation diff. */
 
        /* quantize prediction difference d */
-       y = step_size(state_ptr);       /* quantizer step size */
-       i = quantize(d, y, qtab_723_16, 1);  /* i = ADPCM code */
+       y = g72x_step_size(state_ptr);       /* quantizer step size */
+       i = g72x_quantize(d, y, qtab_723_16, 1);  /* i = ADPCM code */
 
              /* Since quantize() only produces a three level output
               * (1, 2, or 3), we must create the fourth one on our own
@@ -112,13 +112,13 @@
          if ((d & 0x8000) == 0)             /* If d > 0, i=3 isn't right... */
            i = 0;
            
-       dq = reconstruct(i & 2, _dqlntab[i], y); /* quantized diff. */
+       dq = g72x_reconstruct(i & 2, _dqlntab[i], y); /* quantized diff. */
 
        sr = (dq < 0) ? se - (dq & 0x3FFF) : se + dq; /* reconstructed signal */
 
        dqsez = sr + sez - se;          /* pole prediction diff. */
 
-       update(2, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+       g72x_update(2, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
 
        return (i);
 }
@@ -142,19 +142,19 @@
        short           dqsez;
 
        i &= 0x03;                      /* mask to get proper bits */
-       sezi = predictor_zero(state_ptr);
+       sezi = g72x_predictor_zero(state_ptr);
        sez = sezi >> 1;
-       sei = sezi + predictor_pole(state_ptr);
+       sei = sezi + g72x_predictor_pole(state_ptr);
        se = sei >> 1;                  /* se = estimated signal */
 
-       y = step_size(state_ptr);       /* adaptive quantizer step size */
-       dq = reconstruct(i & 0x02, _dqlntab[i], y); /* unquantize pred diff */
+       y = g72x_step_size(state_ptr);       /* adaptive quantizer step size */
+       dq = g72x_reconstruct(i & 0x02, _dqlntab[i], y); /* unquantize pred diff */
 
        sr = (dq < 0) ? (se - (dq & 0x3FFF)) : (se + dq); /* reconst. signal */
 
        dqsez = sr - se + sez;                  /* pole prediction diff. */
 
-       update(2, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+       g72x_update(2, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
 
 		/* sr was of 14-bit dynamic range */
 		return (sr << 2);       

Index: g723_24.c
===================================================================
RCS file: /cvsroot/mplayer/main/g72x/g723_24.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- g723_24.c	17 Nov 2001 21:35:53 -0000	1.1
+++ g723_24.c	29 Dec 2001 11:09:07 -0000	1.2
@@ -80,23 +80,23 @@
 	/* linearize input sample to 14-bit PCM */
 	sl >>= 2;		/* sl of 14-bit dynamic range */
 
-	sezi = predictor_zero(state_ptr);
+	sezi = g72x_predictor_zero(state_ptr);
 	sez = sezi >> 1;
-	sei = sezi + predictor_pole(state_ptr);
+	sei = sezi + g72x_predictor_pole(state_ptr);
 	se = sei >> 1;			/* se = estimated signal */
 
 	d = sl - se;			/* d = estimation diff. */
 
 	/* quantize prediction difference d */
-	y = step_size(state_ptr);	/* quantizer step size */
-	i = quantize(d, y, qtab_723_24, 3);	/* i = ADPCM code */
-	dq = reconstruct(i & 4, _dqlntab[i], y); /* quantized diff. */
+	y = g72x_step_size(state_ptr);	/* quantizer step size */
+	i = g72x_quantize(d, y, qtab_723_24, 3);	/* i = ADPCM code */
+	dq = g72x_reconstruct(i & 4, _dqlntab[i], y); /* quantized diff. */
 
 	sr = (dq < 0) ? se - (dq & 0x3FFF) : se + dq; /* reconstructed signal */
 
 	dqsez = sr + sez - se;		/* pole prediction diff. */
 
-	update(3, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+	g72x_update(3, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
 
 	return (i);
 }
@@ -120,19 +120,19 @@
 	short		dqsez;
 
 	i &= 0x07;			/* mask to get proper bits */
-	sezi = predictor_zero(state_ptr);
+	sezi = g72x_predictor_zero(state_ptr);
 	sez = sezi >> 1;
-	sei = sezi + predictor_pole(state_ptr);
+	sei = sezi + g72x_predictor_pole(state_ptr);
 	se = sei >> 1;			/* se = estimated signal */
 
-	y = step_size(state_ptr);	/* adaptive quantizer step size */
-	dq = reconstruct(i & 0x04, _dqlntab[i], y); /* unquantize pred diff */
+	y = g72x_step_size(state_ptr);	/* adaptive quantizer step size */
+	dq = g72x_reconstruct(i & 0x04, _dqlntab[i], y); /* unquantize pred diff */
 
 	sr = (dq < 0) ? (se - (dq & 0x3FFF)) : (se + dq); /* reconst. signal */
 
 	dqsez = sr - se + sez;			/* pole prediction diff. */
 
-	update(3, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+	g72x_update(3, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
 
 	return (sr << 2);	/* sr was of 14-bit dynamic range */
 }

Index: g723_40.c
===================================================================
RCS file: /cvsroot/mplayer/main/g72x/g723_40.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- g723_40.c	17 Nov 2001 21:35:53 -0000	1.1
+++ g723_40.c	29 Dec 2001 11:09:07 -0000	1.2
@@ -96,24 +96,24 @@
 	/* linearize input sample to 14-bit PCM */
 	sl >>= 2;		/* sl of 14-bit dynamic range */
 
-	sezi = predictor_zero(state_ptr);
+	sezi = g72x_predictor_zero(state_ptr);
 	sez = sezi >> 1;
-	sei = sezi + predictor_pole(state_ptr);
+	sei = sezi + g72x_predictor_pole(state_ptr);
 	se = sei >> 1;			/* se = estimated signal */
 
 	d = sl - se;			/* d = estimation difference */
 
 	/* quantize prediction difference */
-	y = step_size(state_ptr);	/* adaptive quantizer step size */
-	i = quantize(d, y, qtab_723_40, 15);	/* i = ADPCM code */
+	y = g72x_step_size(state_ptr);	/* adaptive quantizer step size */
+	i = g72x_quantize(d, y, qtab_723_40, 15);	/* i = ADPCM code */
 
-	dq = reconstruct(i & 0x10, _dqlntab[i], y);	/* quantized diff */
+	dq = g72x_reconstruct(i & 0x10, _dqlntab[i], y);	/* quantized diff */
 
 	sr = (dq < 0) ? se - (dq & 0x7FFF) : se + dq; /* reconstructed signal */
 
 	dqsez = sr + sez - se;		/* dqsez = pole prediction diff. */
 
-	update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+	g72x_update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
 
 	return (i);
 }
@@ -134,19 +134,19 @@
 	short		dqsez;
 
 	i &= 0x1f;			/* mask to get proper bits */
-	sezi = predictor_zero(state_ptr);
+	sezi = g72x_predictor_zero(state_ptr);
 	sez = sezi >> 1;
-	sei = sezi + predictor_pole(state_ptr);
+	sei = sezi + g72x_predictor_pole(state_ptr);
 	se = sei >> 1;			/* se = estimated signal */
 
-	y = step_size(state_ptr);	/* adaptive quantizer step size */
-	dq = reconstruct(i & 0x10, _dqlntab[i], y);	/* estimation diff. */
+	y = g72x_step_size(state_ptr);	/* adaptive quantizer step size */
+	dq = g72x_reconstruct(i & 0x10, _dqlntab[i], y);	/* estimation diff. */
 
 	sr = (dq < 0) ? (se - (dq & 0x7FFF)) : (se + dq); /* reconst. signal */
 
 	dqsez = sr - se + sez;		/* pole prediction diff. */
 
-	update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+	g72x_update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
 
 	return (sr << 2);	/* sr was of 14-bit dynamic range */
 }

Index: g72x.c
===================================================================
RCS file: /cvsroot/mplayer/main/g72x/g72x.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- g72x.c	25 Dec 2001 11:16:12 -0000	1.2
+++ g72x.c	29 Dec 2001 11:09:07 -0000	1.3
@@ -293,7 +293,7 @@
  * computes the estimated signal from 6-zero predictor.
  *
  */
-int  predictor_zero (G72x_STATE *state_ptr)
+int  g72x_predictor_zero (G72x_STATE *state_ptr)
 {
 	int		i;
 	int		sezi;
@@ -309,7 +309,7 @@
  * computes the estimated signal from 2-pole predictor.
  *
  */
-int  predictor_pole(G72x_STATE *state_ptr)
+int  g72x_predictor_pole(G72x_STATE *state_ptr)
 {
 	return (fmult(state_ptr->a[1] >> 2, state_ptr->sr[1]) +
 	    fmult(state_ptr->a[0] >> 2, state_ptr->sr[0]));
@@ -320,7 +320,7 @@
  * computes the quantization step size of the adaptive quantizer.
  *
  */
-int  step_size (G72x_STATE *state_ptr)
+int  g72x_step_size (G72x_STATE *state_ptr)
 {
 	int		y;
 	int		dif;
@@ -349,7 +349,7 @@
  * size scale factor division operation is done in the log base 2 domain
  * as a subtraction.
  */
-int quantize(
+int g72x_quantize(
 	int		d,	/* Raw difference signal sample */
 	int		y,	/* Step size multiplier */
 	short	*table,	/* quantization table */
@@ -400,7 +400,7 @@
  * Multiplication is performed in log base 2 domain as addition.
  */
 int
-reconstruct(
+g72x_reconstruct(
 	int		sign,	/* 0 for non-negative value */
 	int		dqln,	/* G.72x codeword */
 	int		y)	/* Step size multiplier */
@@ -429,7 +429,7 @@
  * updates the state variables for each output code
  */
 void
-update(
+g72x_update(
 	int		code_size,	/* distinguish 723_40 with others */
 	int		y,		/* quantizer step size */
 	int		wi,		/* scale factor multiplier */

Index: private.h
===================================================================
RCS file: /cvsroot/mplayer/main/g72x/private.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- private.h	17 Nov 2001 21:35:53 -0000	1.1
+++ private.h	29 Dec 2001 11:09:07 -0000	1.2
@@ -79,17 +79,17 @@
 
 
 
-int	predictor_zero(G72x_STATE *state_ptr);
+int	g72x_predictor_zero(G72x_STATE *state_ptr);
 
-int	predictor_pole(G72x_STATE *state_ptr);
+int	g72x_predictor_pole(G72x_STATE *state_ptr);
 
-int	step_size(G72x_STATE *state_ptr);
+int	g72x_step_size(G72x_STATE *state_ptr);
 
-int	quantize(int d, int	y, short *table, int size);
+int	g72x_quantize(int d, int	y, short *table, int size);
 
-int	reconstruct(int sign, int dqln,	int y);
+int	g72x_reconstruct(int sign, int dqln,	int y);
 
-void update (int code_size, int y, int wi, int fi, int dq, int sr, int dqsez, G72x_STATE *state_ptr);
+void g72x_update (int code_size, int y, int wi, int fi, int dq, int sr, int dqsez, G72x_STATE *state_ptr);
 
 int g721_encoder	(int sample, G72x_STATE *state_ptr);
 int g721_decoder	(int code, G72x_STATE *state_ptr);




More information about the MPlayer-cvslog mailing list