History

ppc generic prefetch

Originally committed as revision 6669 to svn://svn.ffmpeg.org/ffmpeg/trunk

Luca Barbato committed 20 years ago

Commit a5db5bd1 parent a0490b31 file · +10 −1Browse files

Unified · Split

libavcodec/ppc/dsputil_ppc.c+10−1
@@ -249,10 +249,19 @@ long check_dcbzl_effect(void) · 248 unmodified lines
249}249}
250#endif250#endif
251 251
252static void prefetch_ppc(void *mem, int stride, int h)
253{
254 register const uint8_t *p = mem;
255 do {
256 asm volatile ("dcbt 0,%0" : : "r" (p));
257 p+= stride;
258 } while(--h);
259}
260
252void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)261void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
253{262{
254 // Common optimizations whether Altivec is available or not263 // Common optimizations whether Altivec is available or not
255 264 c->prefetch = prefetch_ppc;
256 switch (check_dcbzl_effect()) {265 switch (check_dcbzl_effect()) {
257 case 32:266 case 32:
258 c->clear_blocks = clear_blocks_dcbz32_ppc;267 c->clear_blocks = clear_blocks_dcbz32_ppc;

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