Lines Matching defs:state_ptr
80 * pointed to by 'state_ptr'.
85 struct audio_g72x_state *state_ptr)
89 state_ptr->yl = 34816;
90 state_ptr->yu = 544;
91 state_ptr->dms = 0;
92 state_ptr->dml = 0;
93 state_ptr->ap = 0;
95 state_ptr->a[cnta] = 0;
96 state_ptr->pk[cnta] = 0;
97 state_ptr->sr[cnta] = 32;
100 state_ptr->b[cnta] = 0;
101 state_ptr->dq[cnta] = 32;
103 state_ptr->td = 0;
104 state_ptr->leftover_cnt = 0; /* no left over codes */
176 struct audio_g72x_state *state_ptr,
190 if (state_ptr->td == 0) {
192 } else if (state_ptr->yl > 0x40000) {
195 thr2 = (0x20 + ((state_ptr->yl >> 10) & 0x1F)) <<
196 (state_ptr->yl >> 15);
209 state_ptr->yu = y + ((_witab[i] - y) >> 5);
212 if (state_ptr->yu < 544) {
213 state_ptr->yu = 544;
214 } else if (state_ptr->yu > 5120) {
215 state_ptr->yu = 5120;
219 state_ptr->yl += state_ptr->yu + ((-state_ptr->yl) >> 6);
225 state_ptr->a[0] = 0;
226 state_ptr->a[1] = 0;
227 state_ptr->b[0] = 0;
228 state_ptr->b[1] = 0;
229 state_ptr->b[2] = 0;
230 state_ptr->b[3] = 0;
231 state_ptr->b[4] = 0;
232 state_ptr->b[5] = 0;
236 pks1 = pk0 ^ state_ptr->pk[0];
238 a2p = state_ptr->a[1] - (state_ptr->a[1] >> 7);
240 fa1 = (pks1) ? state_ptr->a[0] : -state_ptr->a[0];
249 if (pk0 ^ state_ptr->pk[1]) {
268 state_ptr->a[1] = a2p;
271 state_ptr->a[0] -= state_ptr->a[0] >> 8;
274 state_ptr->a[0] += 192;
276 state_ptr->a[0] -= 192;
282 if (state_ptr->a[0] < -a1ul)
283 state_ptr->a[0] = -a1ul;
284 else if (state_ptr->a[0] > a1ul)
285 state_ptr->a[0] = a1ul;
289 state_ptr->b[cnt] -= state_ptr->b[cnt] >> 8;
292 if ((dq ^ state_ptr->dq[cnt]) >= 0)
293 state_ptr->b[cnt] += 128;
295 state_ptr->b[cnt] -= 128;
301 state_ptr->dq[cnt] = state_ptr->dq[cnt-1];
304 state_ptr->dq[0] = (dq >= 0) ? 0x20 : 0xFC20;
307 state_ptr->dq[0] = (dq >= 0) ?
312 state_ptr->sr[1] = state_ptr->sr[0];
315 state_ptr->sr[0] = 0x20;
318 state_ptr->sr[0] = (exp << 6) + ((sr << 6) >> exp);
322 state_ptr->sr[0] = (exp << 6) + ((mag << 6) >> exp) - 0x400;
326 state_ptr->pk[1] = state_ptr->pk[0];
327 state_ptr->pk[0] = pk0;
331 state_ptr->td = 0;
333 state_ptr->td = 1;
335 state_ptr->td = 0;
341 state_ptr->dms += (fi - state_ptr->dms) >> 5; /* FILTA */
342 state_ptr->dml += (((fi << 2) - state_ptr->dml) >> 7); /* FILTB */
345 state_ptr->ap = 256;
347 state_ptr->ap += (0x200 - state_ptr->ap) >> 4;
348 else if (state_ptr->td == 1)
349 state_ptr->ap += (0x200 - state_ptr->ap) >> 4;
350 else if (abs((state_ptr->dms << 2) - state_ptr->dml) >=
351 (state_ptr->dml >> 3))
352 state_ptr->ap += (0x200 - state_ptr->ap) >> 4;
354 state_ptr->ap += (-state_ptr->ap) >> 4;
593 struct audio_g72x_state *state_ptr)
611 for (i = 0; state_ptr->leftover_cnt > 0; i++) {
612 *out_buf++ = state_ptr->leftover[i];
613 state_ptr->leftover_cnt -= 8;
616 state_ptr->leftover_cnt = 0;
632 if (state_ptr->leftover_cnt > 0) {
633 *char_out = state_ptr->leftover[0];
634 state_ptr->leftover_cnt = 0;
658 sezi = _g721_fmult(state_ptr->b[0] >> 2, state_ptr->dq[0]);
660 sezi = sezi + _g721_fmult(state_ptr->b[cnt] >> 2,
661 state_ptr->dq[cnt]);
664 sei = sei + _g721_fmult(state_ptr->a[cnt] >> 2,
665 state_ptr->sr[cnt]);
670 if (state_ptr->ap >= 256)
671 y = state_ptr->yu;
673 y = state_ptr->yl >> 6;
674 dif = state_ptr->yu - y;
675 al = state_ptr->ap >> 2;
696 state_ptr->leftover[0] = i;
697 state_ptr->leftover_cnt = 4;
709 _g721_update(y, i, dq, sr, pk0, state_ptr, sigpk);
732 struct audio_g72x_state *state_ptr) /* the decoder's state structure. */
757 sezi = _g721_fmult(state_ptr->b[0] >> 2, state_ptr->dq[0]);
759 sezi = sezi + _g721_fmult(state_ptr->b[cnt] >> 2,
760 state_ptr->dq[cnt]);
763 sei = sei + _g721_fmult(state_ptr->a[cnt] >> 2,
764 state_ptr->sr[cnt]);
768 if (state_ptr->ap >= 256)
769 y = state_ptr->yu;
771 y = state_ptr->yl >> 6;
772 dif = state_ptr->yu - y;
773 al = state_ptr->ap >> 2;
806 _g721_update(y, i, dq, sr, pk0, state_ptr, sigpk);