aboutsummaryrefslogtreecommitdiffhomepage
path: root/libswscale
diff options
context:
space:
mode:
authorGravatar ivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-18 09:27:59 +0000
committerGravatar ivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-18 09:27:59 +0000
commit59a2d69862575c5107244661625499e361d698e4 (patch)
tree7d2bbc3fa83a458ae92558532db8130b21e84a92 /libswscale
parent346fa283f55d485e4d7aa59016d3f5213cd3a611 (diff)
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: svn://svn.mplayerhq.hu/mplayer/trunk@23015 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/rgb2rgb_template.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index 2e2066b2cb..f06e4ed72d 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -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)
);