FreeCalypso > hg > gsm-codec-lib
comparison libgsmefr/c1035pf.c @ 186:12d9d3649232
libgsmefr/c1035pf.c: perf opt
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 03 Jan 2023 03:05:38 +0000 |
parents | e005e7b91f3c |
children |
comparison
equal
deleted
inserted
replaced
185:a4d1615e2aa4 | 186:12d9d3649232 |
---|---|
146 | 146 |
147 y32[i] = s; move32 (); | 147 y32[i] = s; move32 (); |
148 | 148 |
149 s = L_abs (s); | 149 s = L_abs (s); |
150 test (); | 150 test (); |
151 if (L_sub (s, max) > (Word32) 0L) | 151 if (s > max) |
152 max = s; move32 (); | 152 max = s; move32 (); |
153 } | 153 } |
154 tot = L_add (tot, L_shr (max, 1)); | 154 tot = L_add (tot, L_shr (max, 1)); |
155 } | 155 } |
156 | 156 |
260 pos = ipos[0]; move16 (); | 260 pos = ipos[0]; move16 (); |
261 ipos[5] = pos; move16 (); | 261 ipos[5] = pos; move16 (); |
262 | 262 |
263 for (i = 1; i < NB_TRACK; i++) | 263 for (i = 1; i < NB_TRACK; i++) |
264 { | 264 { |
265 pos = add (pos, 1); | 265 pos++; |
266 if (sub (pos, NB_TRACK) >= 0) | 266 if (pos >= NB_TRACK) |
267 { | 267 { |
268 pos = 0; move16 (); | 268 pos = 0; move16 (); |
269 } | 269 } |
270 ipos[i] = pos; move16 (); | 270 ipos[i] = pos; move16 (); |
271 ipos[i + 5] = pos; move16 (); | 271 ipos[i + 5] = pos; move16 (); |
281 Word16 tmp; | 281 Word16 tmp; |
282 | 282 |
283 tmp = *ind; move16 (); | 283 tmp = *ind; move16 (); |
284 | 284 |
285 test (); | 285 test (); |
286 if (sub (n, 5) < 0) | 286 if (n < 5) |
287 { | 287 { |
288 tmp = (tmp & 0x8) | gray[tmp & 0x7]; logic16 (); logic16 (); | 288 tmp = (tmp & 0x8) | gray[tmp & 0x7]; logic16 (); logic16 (); |
289 logic16 (); | 289 logic16 (); |
290 } | 290 } |
291 else | 291 else |
832 if (((index ^ indx[track]) & 8) == 0) | 832 if (((index ^ indx[track]) & 8) == 0) |
833 { | 833 { |
834 /* sign of 1st pulse == sign of 2nd pulse */ | 834 /* sign of 1st pulse == sign of 2nd pulse */ |
835 | 835 |
836 test (); | 836 test (); |
837 if (sub (indx[track], index) <= 0) | 837 if (indx[track] <= index) |
838 { | 838 { |
839 indx[track + 5] = index; move16 (); | 839 indx[track + 5] = index; move16 (); |
840 } | 840 } |
841 else | 841 else |
842 { | 842 { |
848 else | 848 else |
849 { | 849 { |
850 /* sign of 1st pulse != sign of 2nd pulse */ | 850 /* sign of 1st pulse != sign of 2nd pulse */ |
851 | 851 |
852 test (); logic16 (); logic16 (); | 852 test (); logic16 (); logic16 (); |
853 if (sub ((indx[track] & 7), (index & 7)) <= 0) | 853 if ((indx[track] & 7) <= (index & 7)) |
854 { | 854 { |
855 indx[track + 5] = indx[track]; | 855 indx[track + 5] = indx[track]; |
856 move16 (); | 856 move16 (); |
857 indx[track] = index; move16 (); | 857 indx[track] = index; move16 (); |
858 } | 858 } |