History

swr: unroll audioconvert core C function

36k->32k decicycles

Michael Niedermayer committed 14 years ago

Commit bbd3dc41 parent 4119fa71 file · +9 −2Browse files

Unified · Split

libswresample/audioconvert.c+9−2
@@ -47,9 +47,16 @@ struct AudioConvert { · 46 unmodified lines
4747 #define CONV_FUNC(ofmt, otype, ifmt, expr)\
4848 static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *po, const uint8_t *pi, int is, int os, uint8_t *end)\
4949 {\
50− do{\
50+ uint8_t *end2 = end - 3*os;\
51+ while(po < end2){\
5152 *(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+ }\
5360 }
5461
5562 //FIXME put things below under ifdefs so we do not waste space for cases no codec will need

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t