[FFmpeg-devel] [PATCH] Some IWMMXT functions for libavcodec #2

Siarhei Siamashka siarhei.siamashka
Sat May 17 12:34:48 CEST 2008


On Saturday 17 May 2008, Siarhei Siamashka wrote:
[...]
> >                   "subs r1, r1, #2           \n\t"
> >                   "bne 1b                    \n\t"
> >                   /* last step */
> >                   BODY(3, 4, 1, 2)
> >                   "textrmsw %0, wr0, #0      \n\t"
> >
> >                   : "=r"(s), "+r"(pix)
> >                   : "r"(stride), "r"(h - 2)
> >                   : "r1");
>
> Why are you introducing the extra "r1" register? You could just directly
> use "h" variable as a loop counter. By using alternative versions of
> conditional jump ("bgt" instead of "bne"), you could try to eliminate the
> need of doing arithmetics on "h" before the loop.

Sorry, my bad. Using "bgt" will not directly help here (you still can
remove this "h - 2" arithmetics in function prologue, but that would require
increasing code size and I'm not sure it is worth efforts). Excessive use
of "r1" register comment still applies.


-- 
Best regards,
Siarhei Siamashka




More information about the ffmpeg-devel mailing list