[Ffmpeg-devel] [PATCH] Upate of Zaurus IWMMXT patch
Måns Rullgård
mans
Tue Apr 10 14:49:50 CEST 2007
Vadim Lebedev <vadim at mbdsys.com> writes:
> 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
>
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list