Searched refs:pcm_val (Results 1 – 7 of 7) sorted by relevance
95 int16_t pcm_val) /* 2's complement (13-bit range) */ in st_13linear2alaw() argument107 if (pcm_val >= 0) { in st_13linear2alaw()111 pcm_val = -pcm_val - 1; in st_13linear2alaw()115 seg = search(pcm_val, seg_aend, 8); in st_13linear2alaw()124 aval |= (pcm_val >> 1) & QUANT_MASK; in st_13linear2alaw()126 aval |= (pcm_val >> seg) & QUANT_MASK; in st_13linear2alaw()197 int16_t pcm_val) /* 2's complement (14-bit range) */ in st_14linear2ulaw() argument210 if (pcm_val < 0) { in st_14linear2ulaw()211 pcm_val = -pcm_val; in st_14linear2ulaw()216 if ( pcm_val > CLIP ) pcm_val = CLIP; /* clip the magnitude */ in st_14linear2ulaw()[all …]
26 unsigned char st_13linear2alaw(int16_t pcm_val);36 unsigned char st_14linear2ulaw(int16_t pcm_val);
231 s16_to_alaw (gint16 pcm_val) in s16_to_alaw() argument233 if (pcm_val >= 0) in s16_to_alaw()234 return alaw_encode[pcm_val / 16]; in s16_to_alaw()236 return (0x7F & alaw_encode[pcm_val / -16]); in s16_to_alaw()281 s16_to_alaw (gint pcm_val) in s16_to_alaw() argument287 if (pcm_val >= 0) { in s16_to_alaw()291 pcm_val = -pcm_val; in s16_to_alaw()292 if (pcm_val > 0x7fff) in s16_to_alaw()293 pcm_val = 0x7fff; in s16_to_alaw()296 if (pcm_val < 256) in s16_to_alaw()[all …]
96 static unsigned char s16_to_alaw(int pcm_val) in s16_to_alaw() argument102 if (pcm_val >= 0) { in s16_to_alaw()106 pcm_val = -pcm_val; in s16_to_alaw()107 if (pcm_val > 0x7fff) in s16_to_alaw()108 pcm_val = 0x7fff; in s16_to_alaw()111 if (pcm_val < 256) in s16_to_alaw()112 aval = pcm_val >> 4; in s16_to_alaw()115 seg = val_seg(pcm_val); in s16_to_alaw()116 aval = (seg << 4) | ((pcm_val >> (seg + 3)) & 0x0f); in s16_to_alaw()
106 static unsigned char s16_to_ulaw(int pcm_val) /* 2's complement (16-bit range) */ in s16_to_ulaw() argument112 if (pcm_val < 0) { in s16_to_ulaw()113 pcm_val = 0x84 - pcm_val; in s16_to_ulaw()116 pcm_val += 0x84; in s16_to_ulaw()119 if (pcm_val > 0x7fff) in s16_to_ulaw()120 pcm_val = 0x7fff; in s16_to_ulaw()123 seg = val_seg(pcm_val); in s16_to_ulaw()129 uval = (seg << 4) | ((pcm_val >> (seg + 3)) & 0x0f); in s16_to_ulaw()
32 short pcm_val;34 ucode = linear2ulaw(pcm_val);37 acode = linear2alaw(pcm_val);40 pcm_val = ulaw2linear(ucode);41 pcm_val = alaw2linear(acode);
153 st_14linear2ulaw(int16_t pcm_val) /* 2's complement (14-bit range) */ in st_14linear2ulaw() argument161 if (pcm_val < 0) { in st_14linear2ulaw()162 pcm_val = -pcm_val; in st_14linear2ulaw()167 if ( pcm_val > CLIP ) pcm_val = CLIP; /* clip the magnitude */ in st_14linear2ulaw()168 pcm_val += (BIAS >> 2); in st_14linear2ulaw()171 seg = search(pcm_val, seg_uend, 8); in st_14linear2ulaw()180 uval = (unsigned char) (seg << 4) | ((pcm_val >> (seg + 1)) & 0xF); in st_14linear2ulaw()247 st_linear2alaw(int16_t pcm_val) /* 2's complement (13-bit range) */ in st_linear2alaw() argument254 if (pcm_val >= 0) { in st_linear2alaw()258 pcm_val = -pcm_val - 1; in st_linear2alaw()[all …]