Commit 6080edc6 authored by ivo's avatar ivo

skip MMX code in rgb24tobgr24 if the size of the input is smaller than the

size of the units the MMX code processes


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@23015 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 6bb7bf03
......@@ -1435,6 +1435,8 @@ static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long s
#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 @@ static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long s
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)
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment