Commit 063daf1f authored by mru's avatar mru

ARM: add prefetch function using ARMv5 PLD instruction

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14962 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e7b59c69
......@@ -203,6 +203,19 @@ static void simple_idct_ipp_add(uint8_t *dest, int line_size, DCTELEM *block)
}
#endif
#ifdef HAVE_ARMV5TE
static void prefetch_arm(void *mem, int stride, int h)
{
asm volatile(
"1: \n\t"
"subs %0, %0, #1 \n\t"
"pld [%1] \n\t"
"add %1, %1, %2 \n\t"
"bgt 1b \n\t"
: "+r"(h), "+r"(mem) : "r"(stride));
}
#endif
int mm_support(void)
{
return ENABLE_IWMMXT * MM_IWMMXT;
......@@ -279,6 +292,10 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_arm; //OK
c->put_no_rnd_pixels_tab[1][3] = put_no_rnd_pixels8_xy2_arm;
#ifdef HAVE_ARMV5TE
c->prefetch = prefetch_arm;
#endif
#ifdef HAVE_IWMMXT
dsputil_init_iwmmxt(c, avctx);
#endif
......
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