[Mplayer-cvslog] CVS: main/libmpcodecs/native xa_gsm.c,1.4,1.5

Alex Beregszaszi alex at mplayerhq.hu
Tue Aug 27 18:18:08 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs/native
In directory mail:/var/tmp.root/cvs-serv2075

Modified Files:
	xa_gsm.c 
Log Message:
removed unused code

Index: xa_gsm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/native/xa_gsm.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xa_gsm.c	13 Apr 2002 18:19:36 -0000	1.4
+++ xa_gsm.c	27 Aug 2002 16:17:54 -0000	1.5
@@ -39,43 +39,11 @@
 //static short gsm_buf[320];
 static XA_GSM_STATE gsm_state;
 
-static unsigned char xa_sign_2_ulaw[256];
-
-static unsigned char XA_Signed_To_uLaw(long ch)
-{
-  long mask;
-  if (ch < 0) { ch = -ch; mask = 0x7f; }
-  else { mask = 0xff; }
-  if (ch < 32)		{ ch = 0xF0 | (15 - (ch / 2)); }
-  else if (ch < 96)	{ ch = 0xE0 | (15 - (ch - 32) / 4); }
-  else if (ch < 224)	{ ch = 0xD0 | (15 - (ch - 96) / 8); }
-  else if (ch < 480)	{ ch = 0xC0 | (15 - (ch - 224) / 16); }
-  else if (ch < 992)	{ ch = 0xB0 | (15 - (ch - 480) / 32); }
-  else if (ch < 2016)	{ ch = 0xA0 | (15 - (ch - 992) / 64); }
-  else if (ch < 4064)	{ ch = 0x90 | (15 - (ch - 2016) / 128); }
-  else if (ch < 8160)	{ ch = 0x80 | (15 - (ch - 4064) /  256); }
-  else			{ ch = 0x80; }
-  return (mask & ch);
-}
-
-static void Gen_Signed_2_uLaw()
-{
-  unsigned long i;
-  for(i=0;i<256;i++)
-  { unsigned char d;
-    char ch = i;
-    long chr = ch;
-    d = XA_Signed_To_uLaw(chr * 16);
-    xa_sign_2_ulaw[i] = d;
-  }
-}
-
 
 void GSM_Init()
 {
   memset((char *)(&gsm_state), 0, sizeof(XA_GSM_STATE));
   gsm_state.nrp = 40;
-  Gen_Signed_2_uLaw();
 }
 
 




More information about the MPlayer-cvslog mailing list