comparison libmpcodecs/vf_fspp.c @ 37086:f19959d0bbc9

Fix libmpcodecs inline asm on ICL. Author: Matt Oliver <protogonoi@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
author michael
date Fri, 02 May 2014 18:36:48 +0000
parents cb58825b8571
children e476a46c6a2b
comparison
equal deleted inserted replaced
37085:aadeccf8159b 37086:f19959d0bbc9
1596 "jnz 1b \n\t" 1596 "jnz 1b \n\t"
1597 "5: \n\t" 1597 "5: \n\t"
1598 1598
1599 : "+S"(data), "+D"(output), "+c"(cnt), "=o"(temps) 1599 : "+S"(data), "+D"(output), "+c"(cnt), "=o"(temps)
1600 : "d"(thr_adr) 1600 : "d"(thr_adr)
1601 NAMED_CONSTRAINTS_ADD(ff_MM_FIX_0_707106781,MM_2,MM_FIX_1_414213562_A,MM_FIX_1_414213562,MM_FIX_0_382683433,
1602 ff_MM_FIX_0_541196100,MM_FIX_1_306562965,MM_FIX_0_847759065)
1603 NAMED_CONSTRAINTS_ADD(MM_FIX_0_566454497,MM_FIX_0_198912367,MM_FIX_2_613125930,MM_FIX_1_847759065,
1604 MM_FIX_1_082392200,ff_MM_FIX_0_541196100,MM_FIX_1_306562965)
1601 : "%"REG_a 1605 : "%"REG_a
1602 ); 1606 );
1603 } 1607 }
1604 1608
1605 #endif // HAVE_MMX 1609 #endif // HAVE_MMX
1865 "dec %%"REG_c" \n\t" 1869 "dec %%"REG_c" \n\t"
1866 "jnz 1b \n\t" 1870 "jnz 1b \n\t"
1867 1871
1868 : "+S"(workspace), "+D"(output_adr), "+c"(cnt), "=o"(temps) 1872 : "+S"(workspace), "+D"(output_adr), "+c"(cnt), "=o"(temps)
1869 : "a"(output_stride*sizeof(short)) 1873 : "a"(output_stride*sizeof(short))
1874 NAMED_CONSTRAINTS_ADD(MM_FIX_1_414213562_A,MM_FIX_2_613125930,MM_FIX_1_847759065,MM_FIX_1_082392200,
1875 MM_FIX_1_414213562,MM_DESCALE_RND)
1870 : "%"REG_d 1876 : "%"REG_d
1871 ); 1877 );
1872 } 1878 }
1873 1879
1874 #endif // HAVE_MMX 1880 #endif // HAVE_MMX
1972 "psubw %%mm4, %%mm6 \n\t" 1978 "psubw %%mm4, %%mm6 \n\t"
1973 1979
1974 "movd (%%"REG_S",%%"REG_a",2), %%mm3 \n\t" //5 1980 "movd (%%"REG_S",%%"REG_a",2), %%mm3 \n\t" //5
1975 "paddw %%mm4, %%mm1 \n\t" 1981 "paddw %%mm4, %%mm1 \n\t"
1976 1982
1977 "movq %%mm5, 0*8+%3 \n\t" //t7 1983 "movq %%mm5, %3 \n\t" //t7
1978 "punpcklbw %%mm7, %%mm3 \n\t" 1984 "punpcklbw %%mm7, %%mm3 \n\t"
1979 1985
1980 "movq %%mm6, 1*8+%3 \n\t" //t6 1986 "movq %%mm6, %4 \n\t" //t6
1981 "movq %%mm2, %%mm4 \n\t" 1987 "movq %%mm2, %%mm4 \n\t"
1982 1988
1983 "movd (%%"REG_S"), %%mm5 \n\t" //3 1989 "movd (%%"REG_S"), %%mm5 \n\t" //3
1984 "paddw %%mm3, %%mm2 \n\t" 1990 "paddw %%mm3, %%mm2 \n\t"
1985 1991
2021 "punpckhwd %%mm6, %%mm2 \n\t" 2027 "punpckhwd %%mm6, %%mm2 \n\t"
2022 2028
2023 "psubw %%mm1, %%mm5 \n\t" //d1 2029 "psubw %%mm1, %%mm5 \n\t" //d1
2024 "movq %%mm0, %%mm6 \n\t" 2030 "movq %%mm0, %%mm6 \n\t"
2025 2031
2026 "movq 1*8+%3, %%mm1 \n\t" 2032 "movq %4, %%mm1 \n\t"
2027 "punpcklwd %%mm5, %%mm0 \n\t" 2033 "punpcklwd %%mm5, %%mm0 \n\t"
2028 2034
2029 "punpckhwd %%mm5, %%mm6 \n\t" 2035 "punpckhwd %%mm5, %%mm6 \n\t"
2030 "movq %%mm0, %%mm5 \n\t" 2036 "movq %%mm0, %%mm5 \n\t"
2031 2037
2045 "paddw %%mm1, %%mm4 \n\t" 2051 "paddw %%mm1, %%mm4 \n\t"
2046 2052
2047 "movq %%mm7, "DCTSIZE_S"*3*2(%%"REG_D") \n\t" 2053 "movq %%mm7, "DCTSIZE_S"*3*2(%%"REG_D") \n\t"
2048 "psllw $2, %%mm3 \n\t" //t10 2054 "psllw $2, %%mm3 \n\t" //t10
2049 2055
2050 "movq 0*8+%3, %%mm2 \n\t" 2056 "movq %3, %%mm2 \n\t"
2051 "psllw $2, %%mm4 \n\t" //t11 2057 "psllw $2, %%mm4 \n\t" //t11
2052 2058
2053 "pmulhw "MANGLE(MM_FIX_0_707106781)", %%mm4 \n\t" //z3 2059 "pmulhw "MANGLE(MM_FIX_0_707106781)", %%mm4 \n\t" //z3
2054 "paddw %%mm2, %%mm1 \n\t" 2060 "paddw %%mm2, %%mm1 \n\t"
2055 2061
2108 "movq %%mm5, "DCTSIZE_S"*3*2+"DCTSIZE_S"(%%"REG_D") \n\t" 2114 "movq %%mm5, "DCTSIZE_S"*3*2+"DCTSIZE_S"(%%"REG_D") \n\t"
2109 "add $"DCTSIZE_S"*2*4, %%"REG_D" \n\t" //4 rows 2115 "add $"DCTSIZE_S"*2*4, %%"REG_D" \n\t" //4 rows
2110 "dec %%"REG_c" \n\t" 2116 "dec %%"REG_c" \n\t"
2111 "jnz 6b \n\t" 2117 "jnz 6b \n\t"
2112 2118
2113 : "+S"(pixels), "+D"(data), "+c"(cnt), "=o"(temps) 2119 : "+S"(pixels), "+D"(data), "+c"(cnt), "=o"(temps), "=o"(temps[1])
2114 : "a"(line_size) 2120 : "a"(line_size)
2121 NAMED_CONSTRAINTS_ADD(ff_MM_FIX_0_707106781,ff_MM_FIX_0_541196100,MM_FIX_0_382683433,MM_FIX_1_306562965)
2115 : "%"REG_d); 2122 : "%"REG_d);
2116 } 2123 }
2117 2124
2118 #endif // HAVE_MMX 2125 #endif // HAVE_MMX