2010-07-30 Magnus Granberg #179872 libswscale/rgb2rgb_template.c Fix TEXTREL in STORE_BGR24_MMX and rgb24tobgr24 ---a/libswscale/rgb2rgb_template.c 2010-05-04 23:01:48.000000000 +0200 +++ blibswscale/rgb2rgb_template.c 2010-07-30 18:21:51.080996155 +0200 @@ -127,14 +127,14 @@ "psrlq $8, %%mm3 \n\t" \ "psrlq $8, %%mm6 \n\t" \ "psrlq $8, %%mm7 \n\t" \ - "pand "MANGLE(mask24l)", %%mm0\n\t" \ - "pand "MANGLE(mask24l)", %%mm1\n\t" \ - "pand "MANGLE(mask24l)", %%mm4\n\t" \ - "pand "MANGLE(mask24l)", %%mm5\n\t" \ - "pand "MANGLE(mask24h)", %%mm2\n\t" \ - "pand "MANGLE(mask24h)", %%mm3\n\t" \ - "pand "MANGLE(mask24h)", %%mm6\n\t" \ - "pand "MANGLE(mask24h)", %%mm7\n\t" \ + "pand %2, %%mm0\n\t" \ + "pand %2, %%mm1\n\t" \ + "pand %2, %%mm4\n\t" \ + "pand %2, %%mm5\n\t" \ + "pand %3, %%mm2\n\t" \ + "pand %3, %%mm3\n\t" \ + "pand %3, %%mm6\n\t" \ + "pand %3, %%mm7\n\t" \ "por %%mm2, %%mm0 \n\t" \ "por %%mm3, %%mm1 \n\t" \ "por %%mm6, %%mm4 \n\t" \ @@ -144,14 +144,14 @@ "movq %%mm4, %%mm3 \n\t" \ "psllq $48, %%mm2 \n\t" \ "psllq $32, %%mm3 \n\t" \ - "pand "MANGLE(mask24hh)", %%mm2\n\t" \ - "pand "MANGLE(mask24hhh)", %%mm3\n\t" \ + "pand %4, %%mm2\n\t" \ + "pand %5, %%mm3\n\t" \ "por %%mm2, %%mm0 \n\t" \ "psrlq $16, %%mm1 \n\t" \ "psrlq $32, %%mm4 \n\t" \ "psllq $16, %%mm5 \n\t" \ "por %%mm3, %%mm1 \n\t" \ - "pand "MANGLE(mask24hhhh)", %%mm5\n\t" \ + "pand %6, %%mm5\n\t" \ "por %%mm5, %%mm4 \n\t" \ \ MOVNTQ" %%mm0, %0 \n\t" \ @@ -184,7 +184,7 @@ "movq %%mm5, %%mm7 \n\t" STORE_BGR24_MMX :"=m"(*dest) - :"m"(*s) + :"m"(*s), "m"(mask24l), "m"(mask24h), "m"(mask24hh), "m"(mask24hhh), "m"(mask24hhhh) :"memory"); dest += 24; s += 32; @@ -977,7 +977,7 @@ STORE_BGR24_MMX :"=m"(*d) - :"m"(*s) + :"m"(*s), "m"(mask24l), "m"(mask24h), "m"(mask24hh), "m"(mask24hhh), "m"(mask24hhhh) :"memory"); d += 24; s += 8; @@ -1083,7 +1083,7 @@ STORE_BGR24_MMX :"=m"(*d) - :"m"(*s) + :"m"(*s), "m"(mask24l), "m"(mask24h), "m"(mask24hh), "m"(mask24hhh), "m"(mask24hhhh) :"memory"); d += 24; s += 8; @@ -1297,9 +1297,9 @@ __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" + "movq %3, %%mm5 \n\t" + "movq %4, %%mm6 \n\t" + "movq %5, %%mm7 \n\t" ASMALIGN(4) "1: \n\t" PREFETCH" 32(%1, %%"REG_a") \n\t" @@ -1335,7 +1335,7 @@ " js 1b \n\t" "2: \n\t" : "+a" (mmx_size) - : "r" (src-mmx_size), "r"(dst-mmx_size) + : "r" (src-mmx_size), "r"(dst-mmx_size), "m"(mask24r), "m"(mask24g), "m"(mask24b) ); __asm__ volatile(SFENCE:::"memory");