[Ffmpeg-devel] [PATCH] Upate of Zaurus IWMMXT patch
Vadim Lebedev
vadim
Tue Apr 10 14:50:08 CEST 2007
David Bateman wrote:
> The code from the Zaurus fork of mplayer included a number of
> improvements
> for ARM chips (see http://atty.skr.jp/zplayer/). Most of the patches to
> ffmpeg that can be found there have already been imported into ffmpeg,
> with
> the exception of the attached little change that add a IWMMXT specific
> dsputils clear_blocks function.
>
> Regards
> D.
>
>------------------------------------------------------------------------
>
>diff -Nru mplayer-checkout-2007-04-04.orig/libavcodec/armv4l/dsputil_iwmmxt.c mplayer-checkout-2007-04-04/libavcodec/armv4l/dsputil_iwmmxt.c
>--- mplayer-checkout-2007-04-04.orig/libavcodec/armv4l/dsputil_iwmmxt.c 2007-04-04 06:15:10.000000000 +0200
>+++ mplayer-checkout-2007-04-04/libavcodec/armv4l/dsputil_iwmmxt.c 2007-04-05 14:06:22.640911772 +0200
>@@ -123,6 +123,25 @@
> : "cc", "memory", "r12");
> }
>
>+static void clear_blocks_iwmmxt(DCTELEM *blocks)
>+{
>+ __asm __volatile(
>+ "wzero wr0 \n\t"
>+ "mov r1, #(128 * 6 / 32) \n\t"
>+ "1: \n\t"
>+ "wstrd wr0, [%0] \n\t"
>+ "wstrd wr0, [%0, #8] \n\t"
>+ "wstrd wr0, [%0, #16] \n\t"
>+ "wstrd wr0, [%0, #24] \n\t"
>+ "subs r1, r1, #1 \n\t"
>+ "add %0, %0, #32 \n\t"
>+ "bne 1b \n\t"
>+ : "+r"(blocks)
>+ :
>+ : "r1"
>+ );
>+}
>+
>
>
I'm affraid my ARM asm skills are a little rusty but
shouldn't the order of these 2 lines be inverted, becase ADD
instruction clears Z flag?
+ "subs r1, r1, #1 \n\t"
+ "add %0, %0, #32 \n\t"
Thanks
Vadim
More information about the ffmpeg-devel
mailing list