changeset 7098:37b0958a1cad

removed unused code
author alex
date Tue, 27 Aug 2002 16:17:54 +0000
parents 5c87f14ad947
children 0b70f3dc34eb
files libmpcodecs/native/xa_gsm.c
diffstat 1 files changed, 0 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/native/xa_gsm.c	Tue Aug 27 15:46:41 2002 +0000
+++ b/libmpcodecs/native/xa_gsm.c	Tue Aug 27 16:17:54 2002 +0000
@@ -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();
 }