36k->32k decicycles
Unified · Split
| @@ -47,9 +47,16 @@ struct AudioConvert { · 46 unmodified lines | ||
| 47 | 47 | #define CONV_FUNC(ofmt, otype, ifmt, expr)\ |
| 48 | 48 | static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *po, const uint8_t *pi, int is, int os, uint8_t *end)\ |
| 49 | 49 | {\ |
| 50 | − do{\ | |
| 50 | + uint8_t *end2 = end - 3*os;\ | |
| 51 | + while(po < end2){\ | |
| 51 | 52 | *(otype*)po = expr; pi += is; po += os;\ |
| 52 | − }while(po < end);\ | |
| 53 | + *(otype*)po = expr; pi += is; po += os;\ | |
| 54 | + *(otype*)po = expr; pi += is; po += os;\ | |
| 55 | + *(otype*)po = expr; pi += is; po += os;\ | |
| 56 | + }\ | |
| 57 | + while(po < end){\ | |
| 58 | + *(otype*)po = expr; pi += is; po += os;\ | |
| 59 | + }\ | |
| 53 | 60 | } |
| 54 | 61 | |
| 55 | 62 | //FIXME put things below under ifdefs so we do not waste space for cases no codec will need |