Lines Matching +full:0 +full:x55

55         0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
104 for (i = 0; i < size; i++) in quan()
122 anmag = (an > 0) ? an : ((-an) & 0x1FFF); in fmult()
124 anmant = (anmag == 0) ? 32 : in fmult()
125 (anexp >= 0) ? anmag >> anexp : anmag << -anexp; in fmult()
126 wanexp = anexp + ((srn >> 6) & 0xF) - 13; in fmult()
128 wanmant = (anmant * (srn & 077) + 0x30) >> 4; in fmult()
129 retval = (wanexp >= 0) ? ((wanmant << wanexp) & 0x7FFF) : in fmult()
132 return (((an ^ srn) < 0) ? -retval : retval); in fmult()
148 state_ptr->dms = 0; in g72x_init_state()
149 state_ptr->dml = 0; in g72x_init_state()
150 state_ptr->ap = 0; in g72x_init_state()
151 for (cnta = 0; cnta < 2; cnta++) { in g72x_init_state()
152 state_ptr->a[cnta] = 0; in g72x_init_state()
153 state_ptr->pk[cnta] = 0; in g72x_init_state()
156 for (cnta = 0; cnta < 6; cnta++) { in g72x_init_state()
157 state_ptr->b[cnta] = 0; in g72x_init_state()
160 state_ptr->td = 0; in g72x_init_state()
174 sezi = fmult(state_ptr->b[0] >> 2, state_ptr->dq[0]); in predictor_zero()
188 fmult(state_ptr->a[0] >> 2, state_ptr->sr[0])); in predictor_pole()
208 if (dif > 0) in step_size()
210 else if (dif < 0) in step_size()
211 y += (dif * al + 0x3F) >> 6; in step_size()
241 mant = ((dqm << 7) >> exp) & 0x7F; /* Fractional portion. */ in quantize()
257 if (d < 0) /* take 1's complement of i */ in quantize()
259 else if (i == 0) /* take 1's complement of 0 */ in quantize()
280 if (dql < 0) { in reconstruct()
281 return ((sign) ? -0x8000 : 0); in reconstruct()
286 return ((sign) ? (dq - 0x8000) : dq); in reconstruct()
301 short a2p=0; /* LIMC */ in update()
310 pk0 = (dqsez < 0) ? 1 : 0; /* needed in updating predictor poles */ in update()
312 mag = dq & 0x7FFF; /* prediction difference magnitude */ in update()
315 ylfrac = (state_ptr->yl >> 10) & 0x1F; /* fractional part of yl */ in update()
319 if (state_ptr->td == 0) /* signal supposed voice */ in update()
320 tr = 0; in update()
322 tr = 0; /* treated as voice */ in update()
348 state_ptr->a[0] = 0; in update()
349 state_ptr->a[1] = 0; in update()
350 state_ptr->b[0] = 0; in update()
351 state_ptr->b[1] = 0; in update()
352 state_ptr->b[2] = 0; in update()
353 state_ptr->b[3] = 0; in update()
354 state_ptr->b[4] = 0; in update()
355 state_ptr->b[5] = 0; in update()
357 pks1 = pk0 ^ state_ptr->pk[0]; /* UPA2 */ in update()
361 if (dqsez != 0) { in update()
362 fa1 = (pks1) ? state_ptr->a[0] : -state_ptr->a[0]; in update()
364 a2p -= 0x100; in update()
366 a2p += 0xFF; in update()
378 a2p -= 0x80; in update()
385 a2p += 0x80; in update()
388 /* Possible bug: a2p not initialized if dqsez == 0) */ in update()
393 /* update predictor pole a[0] */ in update()
394 state_ptr->a[0] -= state_ptr->a[0] >> 8; in update()
395 if (dqsez != 0) in update()
397 if (pks1 == 0) in update()
398 state_ptr->a[0] += 192; in update()
400 state_ptr->a[0] -= 192; in update()
404 if (state_ptr->a[0] < -a1ul) in update()
405 state_ptr->a[0] = -a1ul; in update()
406 else if (state_ptr->a[0] > a1ul) in update()
407 state_ptr->a[0] = a1ul; in update()
410 for (cnt = 0; cnt < 6; cnt++) { in update()
415 if (dq & 0x7FFF) { /* XOR */ in update()
416 if ((dq ^ state_ptr->dq[cnt]) >= 0) in update()
424 for (cnt = 5; cnt > 0; cnt--) in update()
426 /* FLOAT A : convert dq[0] to 4-bit exp, 6-bit mantissa f.p. */ in update()
427 if (mag == 0) { in update()
428 state_ptr->dq[0] = (dq >= 0) ? 0x20 : (short)(unsigned short)0xFC20; in update()
431 state_ptr->dq[0] = (dq >= 0) ? in update()
433 (exp << 6) + ((mag << 6) >> exp) - 0x400; in update()
436 state_ptr->sr[1] = state_ptr->sr[0]; in update()
438 if (sr == 0) { in update()
439 state_ptr->sr[0] = 0x20; in update()
440 } else if (sr > 0) { in update()
442 state_ptr->sr[0] = (exp << 6) + ((sr << 6) >> exp); in update()
446 state_ptr->sr[0] = (exp << 6) + ((mag << 6) >> exp) - 0x400; in update()
448 state_ptr->sr[0] = (short)(unsigned short)0xFC20; in update()
451 state_ptr->pk[1] = state_ptr->pk[0]; in update()
452 state_ptr->pk[0] = pk0; in update()
456 state_ptr->td = 0; /* next one will be treated as voice */ in update()
460 state_ptr->td = 0; in update()
471 state_ptr->ap += (0x200 - state_ptr->ap) >> 4; in update()
473 state_ptr->ap += (0x200 - state_ptr->ap) >> 4; in update()
476 state_ptr->ap += (0x200 - state_ptr->ap) >> 4; in update()
517 /* ADPCM codes : 8, 9, ... F, 0, 1, ... , 6, 7 */ in tandem_adjust_alaw()
522 if (sp & 0x80) { in tandem_adjust_alaw()
523 sd = (sp == 0xD5) ? 0x55 : in tandem_adjust_alaw()
524 ((sp ^ 0x55) - 1) ^ 0x55; in tandem_adjust_alaw()
526 sd = (sp == 0x2A) ? 0x2A : in tandem_adjust_alaw()
527 ((sp ^ 0x55) + 1) ^ 0x55; in tandem_adjust_alaw()
530 if (sp & 0x80) in tandem_adjust_alaw()
531 sd = (sp == 0xAA) ? 0xAA : in tandem_adjust_alaw()
532 ((sp ^ 0x55) + 1) ^ 0x55; in tandem_adjust_alaw()
534 sd = (sp == 0x55) ? 0xD5 : in tandem_adjust_alaw()
535 ((sp ^ 0x55) - 1) ^ 0x55; in tandem_adjust_alaw()
551 sr = 0; in tandem_adjust_ulaw()
558 /* ADPCM codes : 8, 9, ... F, 0, 1, ... , 6, 7 */ in tandem_adjust_ulaw()
562 if (sp & 0x80) in tandem_adjust_ulaw()
563 sd = (sp == 0xFF) ? 0x7E : sp + 1; in tandem_adjust_ulaw()
565 sd = (sp == 0) ? 0 : sp - 1; in tandem_adjust_ulaw()
568 if (sp & 0x80) in tandem_adjust_ulaw()
569 sd = (sp == 0x80) ? 0x80 : sp - 1; in tandem_adjust_ulaw()
571 sd = (sp == 0x7F) ? 0xFE : sp + 1; in tandem_adjust_ulaw()