Commit 73539127 authored by lu_zero's avatar lu_zero

ppc generic prefetch

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6669 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 226b6c2e
...@@ -249,10 +249,19 @@ long check_dcbzl_effect(void) ...@@ -249,10 +249,19 @@ long check_dcbzl_effect(void)
} }
#endif #endif
static void prefetch_ppc(void *mem, int stride, int h)
{
register const uint8_t *p = mem;
do {
asm volatile ("dcbt 0,%0" : : "r" (p));
p+= stride;
} while(--h);
}
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
{ {
// Common optimizations whether Altivec is available or not // Common optimizations whether Altivec is available or not
c->prefetch = prefetch_ppc;
switch (check_dcbzl_effect()) { switch (check_dcbzl_effect()) {
case 32: case 32:
c->clear_blocks = clear_blocks_dcbz32_ppc; c->clear_blocks = clear_blocks_dcbz32_ppc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment