comparison libgsmefr/d1035pf.c @ 187:6ad363f7ea30

libgsmefr/d1035pf.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 03 Jan 2023 03:22:04 +0000
parents d80e9f12a1d1
children
comparison
equal deleted inserted replaced
186:12d9d3649232 187:6ad363f7ea30
39 39
40 tmp = index[j]; move16 (); 40 tmp = index[j]; move16 ();
41 i = tmp & 7; logic16 (); 41 i = tmp & 7; logic16 ();
42 i = dgray[i]; move16 (); 42 i = dgray[i]; move16 ();
43 43
44 i = extract_l (L_shr (L_mult (i, 5), 1)); 44 i *= 5;
45 pos1 = add (i, j); /* position of pulse "j" */ 45 pos1 = i + j; /* position of pulse "j" */
46 46
47 i = shr (tmp, 3) & 1; logic16 (); 47 i = shr (tmp, 3) & 1; logic16 ();
48 if (i == 0) 48 if (i == 0)
49 { 49 {
50 sign = 4096; move16 (); /* +1.0 */ 50 sign = 4096; move16 (); /* +1.0 */
58 58
59 /* compute index i */ 59 /* compute index i */
60 60
61 i = index[add (j, 5)] & 7; logic16 (); 61 i = index[add (j, 5)] & 7; logic16 ();
62 i = dgray[i]; move16 (); 62 i = dgray[i]; move16 ();
63 i = extract_l (L_shr (L_mult (i, 5), 1)); 63 i *= 5;
64 64
65 pos2 = add (i, j); /* position of pulse "j+5" */ 65 pos2 = i + j; /* position of pulse "j+5" */
66 66
67 if (sub (pos2, pos1) < 0) 67 if (pos2 < pos1)
68 { 68 {
69 sign = negate (sign); 69 sign = negate (sign);
70 } 70 }
71 cod[pos2] = add (cod[pos2], sign); move16 (); 71 cod[pos2] = add (cod[pos2], sign); move16 ();
72 } 72 }