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
249249 }
250250 #endif
251251
252+static 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+
252261 void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
253262 {
254263 // Common optimizations whether Altivec is available or not
255−
264+ c->prefetch = prefetch_ppc;
256265 switch (check_dcbzl_effect()) {
257266 case 32:
258267 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