[Ffmpeg-devel] [PATCH] have cs_test check for sigsegv at smaller widths and sigill

Reimar Döffinger Reimar.Doeffinger
Fri Apr 13 17:24:08 CEST 2007


Hello,
On Fri, Apr 13, 2007 at 05:10:00PM +0200, Ivo wrote:
> Index: libswscale/rgb2rgb_template.c
> ===================================================================
> --- libswscale/rgb2rgb_template.c	(revision 22984)
> +++ libswscale/rgb2rgb_template.c	(working copy)
> @@ -1367,6 +1367,8 @@
>  #ifdef HAVE_MMX
>  /* TODO: unroll this loop */
>  	asm volatile (
> +		"cmp $0, %2			\n\t"
> +		"ja 2f				\n\t"
>  		"xor %%"REG_a", %%"REG_a"	\n\t"
>  		ASMALIGN(4)
>  		"1:				\n\t"
> @@ -1385,6 +1387,7 @@
>  		"add $8, %%"REG_a"		\n\t"
>  		"cmp %2, %%"REG_a"		\n\t"
>  		" jb 1b				\n\t"
> +		"2:				\n\t"

Might be nicer to the branch prediction to jump unconditionally to the
existing cmp after the xor.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list