Mercurial > mplayer.hg
changeset 22997:fd0fda0c6555
skip MMX code in rgb24tobgr24 if the size of the input is smaller than the
size of the units the MMX code processes
author | ivo |
---|---|
date | Wed, 18 Apr 2007 09:27:59 +0000 |
parents | 2a60af5e78a7 |
children | 85343b921fef |
files | libswscale/rgb2rgb_template.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/rgb2rgb_template.c Wed Apr 18 09:26:22 2007 +0000 +++ b/libswscale/rgb2rgb_template.c Wed Apr 18 09:27:59 2007 +0000 @@ -1435,6 +1435,8 @@ #ifdef HAVE_MMX long mmx_size= 23 - src_size; asm volatile ( + "test %%"REG_a", %%"REG_a" \n\t" + "jns 2f \n\t" "movq "MANGLE(mask24r)", %%mm5 \n\t" "movq "MANGLE(mask24g)", %%mm6 \n\t" "movq "MANGLE(mask24b)", %%mm7 \n\t" @@ -1471,6 +1473,7 @@ MOVNTQ" %%mm1, 16(%2, %%"REG_a")\n\t" "add $24, %%"REG_a" \n\t" " js 1b \n\t" + "2: \n\t" : "+a" (mmx_size) : "r" (src-mmx_size), "r"(dst-mmx_size) );