diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2006-10-12 10:26:07 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2006-10-12 10:26:07 +0000 |
commit | a5db5bda07fa3cec06024d1e18fcbcb855a37d37 (patch) | |
tree | 589513c908e801537b21555e3ba7838e8a8d30f0 /libavcodec/ppc/dsputil_ppc.c | |
parent | a0490b324ac186b0ca6ad5880249299885963e8b (diff) | |
download | ffmpeg-a5db5bda07fa3cec06024d1e18fcbcb855a37d37.tar.gz |
ppc generic prefetch
Originally committed as revision 6669 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ppc/dsputil_ppc.c')
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index 48076d25a3..b8502a0dd2 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -249,10 +249,19 @@ long check_dcbzl_effect(void) } #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) { // Common optimizations whether Altivec is available or not - + c->prefetch = prefetch_ppc; switch (check_dcbzl_effect()) { case 32: c->clear_blocks = clear_blocks_dcbz32_ppc; |