Showing the changes to codec/processing/src (2 of 18 files). Show all
Unified · Split
| @@ -147,7 +147,20 @@ SECTION .text · 146 unmodified lines | ||
| 147 | 147 | movdqa %2, %1 |
| 148 | 148 | psrldq %2, 2 |
| 149 | 149 | punpcklbw %2, %4 |
| 150 | +%ifdef X86_32_PICASM | |
| 151 | + push r0 | |
| 152 | + mov r0, esp | |
| 153 | + and esp, 0xfffffff0 | |
| 154 | + push 0x00140014 | |
| 155 | + push 0x00140014 | |
| 156 | + push 0x00140014 | |
| 157 | + push 0x00140014 | |
| 158 | + pmullw %2, [esp] | |
| 159 | + mov esp, r0 | |
| 160 | + pop r0 | |
| 161 | +%else | |
| 150 | 162 | pmullw %2, [sse2_20] |
| 163 | +%endif | |
| 151 | 164 | paddw %3, %2 |
| 152 | 165 | |
| 153 | 166 | movdqa %2, %1 |
| @@ -184,7 +197,13 @@ WELS_EXTERN BilateralLumaFilter8_sse2 · 30 unmodified lines | ||
| 184 | 197 | |
| 185 | 198 | movq xmm6, [r0] |
| 186 | 199 | punpcklbw xmm6, xmm7 |
| 200 | +%ifdef X86_32_PICASM | |
| 201 | + pcmpeqw xmm3, xmm3 | |
| 202 | + psrlw xmm3, 15 | |
| 203 | + psllw xmm3, 5 | |
| 204 | +%else | |
| 187 | 205 | movdqa xmm3, [sse2_32] |
| 206 | +%endif | |
| 188 | 207 | pxor xmm4, xmm4 ; nTotWeight |
| 189 | 208 | pxor xmm5, xmm5 ; nSum |
| 190 | 209 | |
| @@ -1253,7 +1253,20 @@ FAST_WIDTH: · 1252 unmodified lines | ||
| 1253 | 1253 | pmaddwd xmm2, xmm1 |
| 1254 | 1254 | pshufd xmm1, xmm2, 00000001b |
| 1255 | 1255 | paddd xmm2, xmm1 |
| 1256 | +%ifdef X86_32_PICASM | |
| 1257 | + push r0 | |
| 1258 | + mov r0, esp | |
| 1259 | + and esp, 0xffffffe0 | |
| 1260 | + push 0x00000000 | |
| 1261 | + push 0x00000000 | |
| 1262 | + push 0x00000000 | |
| 1263 | + push 0x00004000 | |
| 1264 | + movdqa xmm1, [esp] | |
| 1265 | + mov esp, r0 | |
| 1266 | + pop r0 | |
| 1267 | +%else | |
| 1256 | 1268 | movdqa xmm1, [add_extra_half] |
| 1269 | +%endif | |
| 1257 | 1270 | paddd xmm2, xmm1 |
| 1258 | 1271 | psrld xmm2, 15 |
| 1259 | 1272 | |
| @@ -1554,7 +1567,20 @@ FAST_WIDTH: · 294 unmodified lines | ||
| 1554 | 1567 | pmaddwd xmm2, xmm1 |
| 1555 | 1568 | pshufd xmm1, xmm2, 00000001b |
| 1556 | 1569 | paddd xmm2, xmm1 |
| 1570 | +%ifdef X86_32_PICASM | |
| 1571 | + push r0 | |
| 1572 | + mov r0, esp | |
| 1573 | + and esp, 0xffffffe0 | |
| 1574 | + push 0x00000000 | |
| 1575 | + push 0x00000000 | |
| 1576 | + push 0x00000000 | |
| 1577 | + push 0x00004000 | |
| 1578 | + movdqa xmm1, [esp] | |
| 1579 | + mov esp, r0 | |
| 1580 | + pop r0 | |
| 1581 | +%else | |
| 1557 | 1582 | movdqa xmm1, [add_extra_half] |
| 1583 | +%endif | |
| 1558 | 1584 | paddd xmm2, xmm1 |
| 1559 | 1585 | psrld xmm2, 15 |
| 1560 | 1586 | |
| @@ -1671,15 +1697,52 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 110 unmodified lines | ||
| 1671 | 1697 | ;1st line |
| 1672 | 1698 | movdqa xmm0, [r2] ;F * e E * d D * c C * b B * a A |
| 1673 | 1699 | movdqa xmm1, xmm0 |
| 1700 | +%ifdef X86_32_PICASM | |
| 1701 | + push r0 | |
| 1702 | + mov r0, esp | |
| 1703 | + and esp, 0xfffffff0 | |
| 1704 | + push 0x80808080 ;shufb_mask_onethird_low_1 | |
| 1705 | + push 0x80808080 | |
| 1706 | + push 0x80800f0c | |
| 1707 | + push 0x09060300 | |
| 1708 | + push 0x80808080 ;shufb_mask_onethird_high_1 | |
| 1709 | + push 0x80808080 | |
| 1710 | + push 0x8080800d | |
| 1711 | + push 0x0a070401 | |
| 1712 | + push 0x80808080 ;shufb_mask_onethird_low_2 | |
| 1713 | + push 0x800e0b08 | |
| 1714 | + push 0x05028080 | |
| 1715 | + push 0x80808080 | |
| 1716 | + push 0x80808080 ;shufb_mask_onethird_high_2 | |
| 1717 | + push 0x800f0c09 | |
| 1718 | + push 0x06030080 | |
| 1719 | + push 0x80808080 | |
| 1720 | + push 0x0d0a0704 ;shufb_mask_onethird_low_3 | |
| 1721 | + push 0x01808080 | |
| 1722 | + push 0x80808080 | |
| 1723 | + push 0x80808080 | |
| 1724 | + push 0x0e0b0805 ;shufb_mask_onethird_high_3 | |
| 1725 | + push 0x02808080 | |
| 1726 | + push 0x80808080 | |
| 1727 | + push 0x80808080 | |
| 1728 | + movdqa xmm5, [esp+80] | |
| 1729 | + movdqa xmm6, [esp+64] | |
| 1730 | +%else | |
| 1674 | 1731 | movdqa xmm5, [shufb_mask_onethird_low_1] |
| 1675 | 1732 | movdqa xmm6, [shufb_mask_onethird_high_1] |
| 1733 | +%endif | |
| 1676 | 1734 | pshufb xmm0, xmm5 ;0 0 0 0 0 0 0 0 0 0 F E D C B A -> xmm0 |
| 1677 | 1735 | pshufb xmm1, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e d c b a -> xmm1 |
| 1678 | 1736 | |
| 1679 | 1737 | movdqa xmm2, [r2+16] ;k K * j J * i I * h H * g G * f |
| 1680 | 1738 | movdqa xmm3, xmm2 |
| 1739 | +%ifdef X86_32_PICASM | |
| 1740 | + movdqa xmm5, [esp+48] | |
| 1741 | + movdqa xmm6, [esp+32] | |
| 1742 | +%else | |
| 1681 | 1743 | movdqa xmm5, [shufb_mask_onethird_low_2] |
| 1682 | 1744 | movdqa xmm6, [shufb_mask_onethird_high_2] |
| 1745 | +%endif | |
| 1683 | 1746 | pshufb xmm2, xmm5 ;0 0 0 0 0 K J I H G 0 0 0 0 0 0 -> xmm2 |
| 1684 | 1747 | pshufb xmm3, xmm6 ;0 0 0 0 0 k j i h g f 0 0 0 0 0 -> xmm3 |
| 1685 | 1748 | |
| @@ -1688,8 +1751,13 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 2 unmodified lines | ||
| 1688 | 1751 | |
| 1689 | 1752 | movdqa xmm2, [r2+32] ;* p P * o O * n N * m M * l L * |
| 1690 | 1753 | movdqa xmm3, xmm2 |
| 1754 | +%ifdef X86_32_PICASM | |
| 1755 | + movdqa xmm5, [esp+16] | |
| 1756 | + movdqa xmm6, [esp] | |
| 1757 | +%else | |
| 1691 | 1758 | movdqa xmm5, [shufb_mask_onethird_low_3] |
| 1692 | 1759 | movdqa xmm6, [shufb_mask_onethird_high_3] |
| 1760 | +%endif | |
| 1693 | 1761 | pshufb xmm2, xmm5 ;P O N M L 0 0 0 0 0 0 0 0 0 0 0 -> xmm2 |
| 1694 | 1762 | pshufb xmm3, xmm6 ;p o n m l 0 0 0 0 0 0 0 0 0 0 0 -> xmm3 |
| 1695 | 1763 | |
| @@ -1700,15 +1768,25 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 4 unmodified lines | ||
| 1700 | 1768 | ;2nd line |
| 1701 | 1769 | movdqa xmm2, [r2+r3] ;F' * e' E' * d' D' * c' C' * b' B' * a' A' |
| 1702 | 1770 | movdqa xmm3, xmm2 |
| 1771 | +%ifdef X86_32_PICASM | |
| 1772 | + movdqa xmm5, [esp+80] | |
| 1773 | + movdqa xmm6, [esp+64] | |
| 1774 | +%else | |
| 1703 | 1775 | movdqa xmm5, [shufb_mask_onethird_low_1] |
| 1704 | 1776 | movdqa xmm6, [shufb_mask_onethird_high_1] |
| 1777 | +%endif | |
| 1705 | 1778 | pshufb xmm2, xmm5 ;0 0 0 0 0 0 0 0 0 0 F' E' D' C' B' A' -> xmm2 |
| 1706 | 1779 | pshufb xmm3, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e' d' c' b' a' -> xmm3 |
| 1707 | 1780 | |
| 1708 | 1781 | movdqa xmm1, [r2+r3+16] ;k' K' * j' J' * i' I' * h' H' * g' G' * f' |
| 1709 | 1782 | movdqa xmm4, xmm1 |
| 1783 | +%ifdef X86_32_PICASM | |
| 1784 | + movdqa xmm5, [esp+48] | |
| 1785 | + movdqa xmm6, [esp+32] | |
| 1786 | +%else | |
| 1710 | 1787 | movdqa xmm5, [shufb_mask_onethird_low_2] |
| 1711 | 1788 | movdqa xmm6, [shufb_mask_onethird_high_2] |
| 1789 | +%endif | |
| 1712 | 1790 | pshufb xmm1, xmm5 ;0 0 0 0 0 K' J' I' H' G' 0 0 0 0 0 0 -> xmm1 |
| 1713 | 1791 | pshufb xmm4, xmm6 ;0 0 0 0 0 k' j' i' h' g' f' 0 0 0 0 0 -> xmm4 |
| 1714 | 1792 | |
| @@ -1717,8 +1795,15 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 2 unmodified lines | ||
| 1717 | 1795 | |
| 1718 | 1796 | movdqa xmm1, [r2+r3+32] ; * p' P' * o' O' * n' N' * m' M' * l' L' * |
| 1719 | 1797 | movdqa xmm4, xmm1 |
| 1798 | +%ifdef X86_32_PICASM | |
| 1799 | + movdqa xmm5, [esp+16] | |
| 1800 | + movdqa xmm6, [esp] | |
| 1801 | + mov esp, r0 | |
| 1802 | + pop r0 | |
| 1803 | +%else | |
| 1720 | 1804 | movdqa xmm5, [shufb_mask_onethird_low_3] |
| 1721 | 1805 | movdqa xmm6, [shufb_mask_onethird_high_3] |
| 1806 | +%endif | |
| 1722 | 1807 | pshufb xmm1, xmm5 ;P' O' N' M' L' 0 0 0 0 0 0 0 0 0 0 0 -> xmm1 |
| 1723 | 1808 | pshufb xmm4, xmm6 ;p' o' n' m' l' 0 0 0 0 0 0 0 0 0 0 0 -> xmm4 |
| 1724 | 1809 | |
| @@ -1821,15 +1906,52 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 96 unmodified lines | ||
| 1821 | 1906 | ;1st line |
| 1822 | 1907 | movntdqa xmm0, [r2] ;F * e E * d D * c C * b B * a A |
| 1823 | 1908 | movdqa xmm1, xmm0 |
| 1909 | +%ifdef X86_32_PICASM | |
| 1910 | + push r0 | |
| 1911 | + mov r0, esp | |
| 1912 | + and esp, 0xfffffff0 | |
| 1913 | + push 0x80808080 ;shufb_mask_onethird_low_1 | |
| 1914 | + push 0x80808080 | |
| 1915 | + push 0x80800f0c | |
| 1916 | + push 0x09060300 | |
| 1917 | + push 0x80808080 ;shufb_mask_onethird_high_1 | |
| 1918 | + push 0x80808080 | |
| 1919 | + push 0x8080800d | |
| 1920 | + push 0x0a070401 | |
| 1921 | + push 0x80808080 ;shufb_mask_onethird_low_2 | |
| 1922 | + push 0x800e0b08 | |
| 1923 | + push 0x05028080 | |
| 1924 | + push 0x80808080 | |
| 1925 | + push 0x80808080 ;shufb_mask_onethird_high_2 | |
| 1926 | + push 0x800f0c09 | |
| 1927 | + push 0x06030080 | |
| 1928 | + push 0x80808080 | |
| 1929 | + push 0x0d0a0704 ;shufb_mask_onethird_low_3 | |
| 1930 | + push 0x01808080 | |
| 1931 | + push 0x80808080 | |
| 1932 | + push 0x80808080 | |
| 1933 | + push 0x0e0b0805 ;shufb_mask_onethird_high_3 | |
| 1934 | + push 0x02808080 | |
| 1935 | + push 0x80808080 | |
| 1936 | + push 0x80808080 | |
| 1937 | + movdqa xmm5, [esp+80] | |
| 1938 | + movdqa xmm6, [esp+64] | |
| 1939 | +%else | |
| 1824 | 1940 | movdqa xmm5, [shufb_mask_onethird_low_1] |
| 1825 | 1941 | movdqa xmm6, [shufb_mask_onethird_high_1] |
| 1942 | +%endif | |
| 1826 | 1943 | pshufb xmm0, xmm5 ;0 0 0 0 0 0 0 0 0 0 F E D C B A -> xmm0 |
| 1827 | 1944 | pshufb xmm1, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e d c b a -> xmm1 |
| 1828 | 1945 | |
| 1829 | 1946 | movntdqa xmm2, [r2+16] ;k K * j J * i I * h H * g G * f |
| 1830 | 1947 | movdqa xmm3, xmm2 |
| 1948 | +%ifdef X86_32_PICASM | |
| 1949 | + movdqa xmm5, [esp+48] | |
| 1950 | + movdqa xmm6, [esp+32] | |
| 1951 | +%else | |
| 1831 | 1952 | movdqa xmm5, [shufb_mask_onethird_low_2] |
| 1832 | 1953 | movdqa xmm6, [shufb_mask_onethird_high_2] |
| 1954 | +%endif | |
| 1833 | 1955 | pshufb xmm2, xmm5 ;0 0 0 0 0 K J I H G 0 0 0 0 0 0 -> xmm2 |
| 1834 | 1956 | pshufb xmm3, xmm6 ;0 0 0 0 0 k j i h g f 0 0 0 0 0 -> xmm3 |
| 1835 | 1957 | |
| @@ -1838,8 +1960,13 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 2 unmodified lines | ||
| 1838 | 1960 | |
| 1839 | 1961 | movntdqa xmm2, [r2+32] ;* p P * o O * n N * m M * l L * |
| 1840 | 1962 | movdqa xmm3, xmm2 |
| 1963 | +%ifdef X86_32_PICASM | |
| 1964 | + movdqa xmm5, [esp+16] | |
| 1965 | + movdqa xmm6, [esp] | |
| 1966 | +%else | |
| 1841 | 1967 | movdqa xmm5, [shufb_mask_onethird_low_3] |
| 1842 | 1968 | movdqa xmm6, [shufb_mask_onethird_high_3] |
| 1969 | +%endif | |
| 1843 | 1970 | pshufb xmm2, xmm5 ;P O N M L 0 0 0 0 0 0 0 0 0 0 0 -> xmm2 |
| 1844 | 1971 | pshufb xmm3, xmm6 ;p o n m l 0 0 0 0 0 0 0 0 0 0 0 -> xmm3 |
| 1845 | 1972 | |
| @@ -1850,15 +1977,25 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 4 unmodified lines | ||
| 1850 | 1977 | ;2nd line |
| 1851 | 1978 | movntdqa xmm2, [r2+r3] ;F' * e' E' * d' D' * c' C' * b' B' * a' A' |
| 1852 | 1979 | movdqa xmm3, xmm2 |
| 1980 | +%ifdef X86_32_PICASM | |
| 1981 | + movdqa xmm5, [esp+80] | |
| 1982 | + movdqa xmm6, [esp+64] | |
| 1983 | +%else | |
| 1853 | 1984 | movdqa xmm5, [shufb_mask_onethird_low_1] |
| 1854 | 1985 | movdqa xmm6, [shufb_mask_onethird_high_1] |
| 1986 | +%endif | |
| 1855 | 1987 | pshufb xmm2, xmm5 ;0 0 0 0 0 0 0 0 0 0 F' E' D' C' B' A' -> xmm2 |
| 1856 | 1988 | pshufb xmm3, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e' d' c' b' a' -> xmm3 |
| 1857 | 1989 | |
| 1858 | 1990 | movntdqa xmm1, [r2+r3+16] ;k' K' * j' J' * i' I' * h' H' * g' G' * f' |
| 1859 | 1991 | movdqa xmm4, xmm1 |
| 1992 | +%ifdef X86_32_PICASM | |
| 1993 | + movdqa xmm5, [esp+48] | |
| 1994 | + movdqa xmm6, [esp+32] | |
| 1995 | +%else | |
| 1860 | 1996 | movdqa xmm5, [shufb_mask_onethird_low_2] |
| 1861 | 1997 | movdqa xmm6, [shufb_mask_onethird_high_2] |
| 1998 | +%endif | |
| 1862 | 1999 | pshufb xmm1, xmm5 ;0 0 0 0 0 K' J' I' H' G' 0 0 0 0 0 0 -> xmm1 |
| 1863 | 2000 | pshufb xmm4, xmm6 ;0 0 0 0 0 k' j' i' h' g' f' 0 0 0 0 0 -> xmm4 |
| 1864 | 2001 | |
| @@ -1867,8 +2004,15 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 2 unmodified lines | ||
| 1867 | 2004 | |
| 1868 | 2005 | movntdqa xmm1, [r2+r3+32] ; * p' P' * o' O' * n' N' * m' M' * l' L' * |
| 1869 | 2006 | movdqa xmm4, xmm1 |
| 2007 | +%ifdef X86_32_PICASM | |
| 2008 | + movdqa xmm5, [esp+16] | |
| 2009 | + movdqa xmm6, [esp] | |
| 2010 | + mov esp, r0 | |
| 2011 | + pop r0 | |
| 2012 | +%else | |
| 1870 | 2013 | movdqa xmm5, [shufb_mask_onethird_low_3] |
| 1871 | 2014 | movdqa xmm6, [shufb_mask_onethird_high_3] |
| 2015 | +%endif | |
| 1872 | 2016 | pshufb xmm1, xmm5 ;P' O' N' M' L' 0 0 0 0 0 0 0 0 0 0 0 -> xmm1 |
| 1873 | 2017 | pshufb xmm4, xmm6 ;p' o' n' m' l' 0 0 0 0 0 0 0 0 0 0 0 -> xmm4 |
| 1874 | 2018 | |
| @@ -2112,7 +2256,20 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_ssse3 · 237 unmodified lines | ||
| 2112 | 2256 | add r6, r0 |
| 2113 | 2257 | movq xmm7, [r6] |
| 2114 | 2258 | |
| 2259 | +%ifdef X86_32_PICASM | |
| 2260 | + push r0 | |
| 2261 | + mov r0, esp | |
| 2262 | + and esp, 0xfffffff0 | |
| 2263 | + push 0x80808080 | |
| 2264 | + push 0x0d090501 | |
| 2265 | + push 0x80808080 | |
| 2266 | + push 0x0c080400 | |
| 2267 | + movdqa xmm6, [esp] | |
| 2268 | + mov esp, r0 | |
| 2269 | + pop r0 | |
| 2270 | +%else | |
| 2115 | 2271 | movdqa xmm6, [shufb_mask_quarter] |
| 2272 | +%endif | |
| 2116 | 2273 | .yloops_quarter_sse3: |
| 2117 | 2274 | ;mov eax, [esp+40] ; iSrcWidth |
| 2118 | 2275 | ;sar eax, $02 ; iSrcWidth >> 2 |
| @@ -2221,7 +2378,20 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 102 unmodified lines | ||
| 2221 | 2378 | add r6, r0 |
| 2222 | 2379 | movq xmm7, [r6] |
| 2223 | 2380 | |
| 2381 | +%ifdef X86_32_PICASM | |
| 2382 | + push r0 | |
| 2383 | + mov r0, esp | |
| 2384 | + and esp, 0xfffffff0 | |
| 2385 | + push 0x80808080 | |
| 2386 | + push 0x0d090501 | |
| 2387 | + push 0x80808080 | |
| 2388 | + push 0x0c080400 | |
| 2389 | + movdqa xmm6, [esp] | |
| 2390 | + mov esp, r0 | |
| 2391 | + pop r0 | |
| 2392 | +%else | |
| 2224 | 2393 | movdqa xmm6, [shufb_mask_quarter] ;mask |
| 2394 | +%endif | |
| 2225 | 2395 | |
| 2226 | 2396 | .yloops_quarter_sse4: |
| 2227 | 2397 | %ifdef X86_32 |
| @@ -2364,7 +2534,20 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 136 unmodified lines | ||
| 2364 | 2534 | |
| 2365 | 2535 | %macro SSSE3_BilinearFastDownsample4xOrLess_8px 0 |
| 2366 | 2536 | movdqa xmm_tmp0, xmm_xpos_int |
| 2537 | +%ifdef X86_32_PICASM | |
| 2538 | + push r0 | |
| 2539 | + mov r0, esp | |
| 2540 | + and esp, 0xfffffff0 | |
| 2541 | + push 0x08080808 | |
| 2542 | + push 0x08080808 | |
| 2543 | + push 0x00000000 | |
| 2544 | + push 0x00000000 | |
| 2545 | + pshufb xmm_tmp0, [esp] | |
| 2546 | + mov esp, r0 | |
| 2547 | + pop r0 | |
| 2548 | +%else | |
| 2367 | 2549 | pshufb xmm_tmp0, [shufb_0000000088888888] |
| 2550 | +%endif | |
| 2368 | 2551 | psubb xmm_xpos_int, xmm_tmp0 |
| 2369 | 2552 | SSE2_UnpckXFracuw xmm_tmp0, xmm_tmp1, xmm_xpos_frac |
| 2370 | 2553 | mov r_tmp0, i_xpos |
| @@ -2372,7 +2555,24 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 1 unmodified line | ||
| 2372 | 2555 | lddqu xmm_tmp3, [p_src_row0 + r_tmp0] |
| 2373 | 2556 | lddqu xmm_tmp4, [p_src_row1 + r_tmp0] |
| 2374 | 2557 | movdqa xmm_tmp2, xmm_xpos_int |
| 2558 | +%ifdef X86_32_PICASM | |
| 2559 | + push r5 | |
| 2560 | + mov r5, esp | |
| 2561 | + and esp, 0xffffffe0 | |
| 2562 | + push 0x80808080 ;db80h_256 | |
| 2563 | + push 0x80808080 | |
| 2564 | + push 0x80808080 | |
| 2565 | + push 0x80808080 | |
| 2566 | + push 0x80808080 | |
| 2567 | + push 0x80808080 | |
| 2568 | + push 0x80808080 | |
| 2569 | + push 0x80808080 | |
| 2570 | + punpcklbw xmm_tmp2, [esp] | |
| 2571 | + mov esp, r5 | |
| 2572 | + pop r5 | |
| 2573 | +%else | |
| 2375 | 2574 | punpcklbw xmm_tmp2, [db80h_256] |
| 2575 | +%endif | |
| 2376 | 2576 | pshufb xmm_tmp3, xmm_tmp2 |
| 2377 | 2577 | pshufb xmm_tmp4, xmm_tmp2 |
| 2378 | 2578 | SSE2_BilinearFastCalcXYFrac xmm_tmp0, xmm_tmp2, xmm_yfrac0, xmm_yfrac1 |
| @@ -2385,7 +2585,24 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 6 unmodified lines | ||
| 2385 | 2585 | lddqu xmm_tmp3, [p_src_row0 + r_tmp0] |
| 2386 | 2586 | lddqu xmm_tmp4, [p_src_row1 + r_tmp0] |
| 2387 | 2587 | movdqa xmm_tmp2, xmm_xpos_int |
| 2588 | +%ifdef X86_32_PICASM | |
| 2589 | + push r5 | |
| 2590 | + mov r5, esp | |
| 2591 | + and esp, 0xffffffe0 | |
| 2592 | + push 0x80808080 ;db80h_256 | |
| 2593 | + push 0x80808080 | |
| 2594 | + push 0x80808080 | |
| 2595 | + push 0x80808080 | |
| 2596 | + push 0x80808080 | |
| 2597 | + push 0x80808080 | |
| 2598 | + push 0x80808080 | |
| 2599 | + push 0x80808080 | |
| 2600 | + punpckhbw xmm_tmp2, [esp] | |
| 2601 | + mov esp, r5 | |
| 2602 | + pop r5 | |
| 2603 | +%else | |
| 2388 | 2604 | punpckhbw xmm_tmp2, [db80h_256] |
| 2605 | +%endif | |
| 2389 | 2606 | pshufb xmm_tmp3, xmm_tmp2 |
| 2390 | 2607 | pshufb xmm_tmp4, xmm_tmp2 |
| 2391 | 2608 | SSE2_BilinearFastCalcXYFrac xmm_tmp1, xmm_tmp2, xmm_yfrac0, xmm_yfrac1 |
| @@ -2524,13 +2741,43 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 132 unmodified lines | ||
| 2524 | 2741 | |
| 2525 | 2742 | %macro SSE41_BilinearAccurateDownsample4xOrLess_8px 0 |
| 2526 | 2743 | movdqa xmm_tmp0, xmm_xpos_int |
| 2744 | +%ifdef X86_32_PICASM | |
| 2745 | + push r0 | |
| 2746 | + mov r0, esp | |
| 2747 | + and esp, 0xfffffff0 | |
| 2748 | + push 0x08080808 | |
| 2749 | + push 0x08080808 | |
| 2750 | + push 0x00000000 | |
| 2751 | + push 0x00000000 | |
| 2752 | + pshufb xmm_tmp0, [esp] | |
| 2753 | + mov esp, r0 | |
| 2754 | + pop r0 | |
| 2755 | +%else | |
| 2527 | 2756 | pshufb xmm_tmp0, [shufb_0000000088888888] |
| 2757 | +%endif | |
| 2528 | 2758 | psubb xmm_xpos_int, xmm_tmp0 |
| 2529 | 2759 | SSE2_UnpckXFracw xmm_tmp0, xmm_tmp1, xmm_xpos_frac, xmm_7fff |
| 2530 | 2760 | mov r_tmp0, i_xpos |
| 2531 | 2761 | shr r_tmp0, 16 |
| 2532 | 2762 | movdqa xmm_tmp3, xmm_xpos_int |
| 2763 | +%ifdef X86_32_PICASM | |
| 2764 | + push r5 | |
| 2765 | + mov r5, esp | |
| 2766 | + and esp, 0xffffffe0 | |
| 2767 | + push 0x80808080 ;db80h_256 | |
| 2768 | + push 0x80808080 | |
| 2769 | + push 0x80808080 | |
| 2770 | + push 0x80808080 | |
| 2771 | + push 0x80808080 | |
| 2772 | + push 0x80808080 | |
| 2773 | + push 0x80808080 | |
| 2774 | + push 0x80808080 | |
| 2775 | + punpcklbw xmm_tmp3, [esp] | |
| 2776 | + mov esp, r5 | |
| 2777 | + pop r5 | |
| 2778 | +%else | |
| 2533 | 2779 | punpcklbw xmm_tmp3, [db80h_256] |
| 2780 | +%endif | |
| 2534 | 2781 | lddqu xmm_tmp4, [p_src_row0 + r_tmp0] |
| 2535 | 2782 | lddqu xmm_tmp2, [p_src_row1 + r_tmp0] |
| 2536 | 2783 | lea r_tmp0, [i_xpos + 4 * i_scalex] |
| @@ -2542,7 +2789,24 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 5 unmodified lines | ||
| 2542 | 2789 | pmaddwd xmm_tmp2, xmm_tmp0 |
| 2543 | 2790 | SSE41_LinearAccurateInterpolateVerticalDwords xmm_tmp0, xmm_tmp4, xmm_tmp2, xmm_yfrac0, xmm_yfrac1, xmm_tmp3 |
| 2544 | 2791 | movdqa xmm_tmp2, xmm_xpos_int |
| 2792 | +%ifdef X86_32_PICASM | |
| 2793 | + push r5 | |
| 2794 | + mov r5, esp | |
| 2795 | + and esp, 0xffffffe0 | |
| 2796 | + push 0x80808080 ;db80h_256 | |
| 2797 | + push 0x80808080 | |
| 2798 | + push 0x80808080 | |
| 2799 | + push 0x80808080 | |
| 2800 | + push 0x80808080 | |
| 2801 | + push 0x80808080 | |
| 2802 | + push 0x80808080 | |
| 2803 | + push 0x80808080 | |
| 2804 | + punpckhbw xmm_tmp2, [esp] | |
| 2805 | + mov esp, r5 | |
| 2806 | + pop r5 | |
| 2807 | +%else | |
| 2545 | 2808 | punpckhbw xmm_tmp2, [db80h_256] |
| 2809 | +%endif | |
| 2546 | 2810 | lddqu xmm_tmp4, [p_src_row0 + r_tmp0] |
| 2547 | 2811 | lddqu xmm_tmp3, [p_src_row1 + r_tmp0] |
| 2548 | 2812 | pshufb xmm_tmp4, xmm_tmp2 |
| @@ -3321,7 +3585,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 772 unmodified lines | ||
| 3321 | 3585 | %endmacro |
| 3322 | 3586 | |
| 3323 | 3587 | %macro AVX2_BilinearFastDownsample4xOrLess_16px 0 |
| 3588 | +%ifdef X86_32_PICASM | |
| 3589 | + push r0 | |
| 3590 | + mov r0, esp | |
| 3591 | + and esp, 0xfffffff0 | |
| 3592 | + push 0x08080808 | |
| 3593 | + push 0x08080808 | |
| 3594 | + push 0x00000000 | |
| 3595 | + push 0x00000000 | |
| 3596 | + vbroadcasti128 ymm_tmp0, [esp] | |
| 3597 | + mov esp, r0 | |
| 3598 | + pop r0 | |
| 3599 | +%else | |
| 3324 | 3600 | vbroadcasti128 ymm_tmp0, [shufb_0000000088888888] |
| 3601 | +%endif | |
| 3325 | 3602 | vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0 |
| 3326 | 3603 | vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0 |
| 3327 | 3604 | AVX2_UnpckXFrac ymm_tmp0, ymm_tmp1, ymm_xpos_frac, ymm_ffff |
| @@ -3365,7 +3642,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 37 unmodified lines | ||
| 3365 | 3642 | %endmacro |
| 3366 | 3643 | |
| 3367 | 3644 | %macro AVX2_BilinearFastDownsample8xOrLess_16px 0 |
| 3645 | +%ifdef X86_32_PICASM | |
| 3646 | + push r0 | |
| 3647 | + mov r0, esp | |
| 3648 | + and esp, 0xffffffe0 | |
| 3649 | + push 0x0c0c0c0c | |
| 3650 | + push 0x08080808 | |
| 3651 | + push 0x04040404 | |
| 3652 | + push 0x00000000 | |
| 3653 | + vbroadcasti128 ymm_tmp0, [esp] | |
| 3654 | + mov esp, r0 | |
| 3655 | + pop r0 | |
| 3656 | +%else | |
| 3368 | 3657 | vbroadcasti128 ymm_tmp0, [shufb_000044448888CCCC] |
| 3658 | +%endif | |
| 3369 | 3659 | vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0 |
| 3370 | 3660 | vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0 |
| 3371 | 3661 | mov r_tmp0, i_xpos |
| @@ -3604,7 +3894,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 232 unmodified lines | ||
| 3604 | 3894 | %endmacro |
| 3605 | 3895 | |
| 3606 | 3896 | %macro AVX2_BilinearAccurateDownsample4xOrLess_16px 0 |
| 3897 | +%ifdef X86_32_PICASM | |
| 3898 | + push r5 | |
| 3899 | + mov r5, esp | |
| 3900 | + and esp, 0xffffffe0 | |
| 3901 | + push 0x08080808 ;shufb_0000000088888888 | |
| 3902 | + push 0x08080808 | |
| 3903 | + push 0x00000000 | |
| 3904 | + push 0x00000000 | |
| 3905 | + vbroadcasti128 ymm_tmp0, [esp] | |
| 3906 | + mov esp, r5 | |
| 3907 | + pop r5 | |
| 3908 | +%else | |
| 3607 | 3909 | vbroadcasti128 ymm_tmp0, [shufb_0000000088888888] |
| 3910 | +%endif | |
| 3608 | 3911 | vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0 |
| 3609 | 3912 | vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0 |
| 3610 | 3913 | AVX2_UnpckXFrac ymm_tmp0, ymm_tmp1, ymm_xpos_frac, ymm_7fff |
| @@ -3619,7 +3922,24 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 8 unmodified lines | ||
| 3619 | 3922 | lea r_tmp0, [i_xpos + 2 * i_scalex2] |
| 3620 | 3923 | lea i_xpos, [r_tmp0 + 4 * i_scalex2] |
| 3621 | 3924 | shr r_tmp0, 16 |
| 3925 | +%ifdef X86_32_PICASM | |
| 3926 | + push r5 | |
| 3927 | + mov r5, esp | |
| 3928 | + and esp, 0xffffffe0 | |
| 3929 | + push 0x80808080 ;db80h_256 | |
| 3930 | + push 0x80808080 | |
| 3931 | + push 0x80808080 | |
| 3932 | + push 0x80808080 | |
| 3933 | + push 0x80808080 | |
| 3934 | + push 0x80808080 | |
| 3935 | + push 0x80808080 | |
| 3936 | + push 0x80808080 | |
| 3937 | + vpunpcklbw ymm_tmp3, ymm_xpos_int, [esp] | |
| 3938 | + mov esp, r5 | |
| 3939 | + pop r5 | |
| 3940 | +%else | |
| 3622 | 3941 | vpunpcklbw ymm_tmp3, ymm_xpos_int, [db80h_256] |
| 3942 | +%endif | |
| 3623 | 3943 | vpshufb ymm_tmp4, ymm_tmp4, ymm_tmp3 |
| 3624 | 3944 | vpshufb ymm_tmp2, ymm_tmp2, ymm_tmp3 |
| 3625 | 3945 | vpmaddwd ymm_tmp4, ymm_tmp4, ymm_tmp0 |
| @@ -3632,7 +3952,24 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 6 unmodified lines | ||
| 3632 | 3952 | shr r_tmp0, 16 |
| 3633 | 3953 | vinserti128 ymm_tmp4, ymm_tmp4, [p_src_row0 + r_tmp0], 1 |
| 3634 | 3954 | vinserti128 ymm_tmp2, ymm_tmp2, [p_src_row1 + r_tmp0], 1 |
| 3955 | +%ifdef X86_32_PICASM | |
| 3956 | + push r5 | |
| 3957 | + mov r5, esp | |
| 3958 | + and esp, 0xffffffe0 | |
| 3959 | + push 0x80808080 ;db80h_256 | |
| 3960 | + push 0x80808080 | |
| 3961 | + push 0x80808080 | |
| 3962 | + push 0x80808080 | |
| 3963 | + push 0x80808080 | |
| 3964 | + push 0x80808080 | |
| 3965 | + push 0x80808080 | |
| 3966 | + push 0x80808080 | |
| 3967 | + vpunpckhbw ymm_tmp3, ymm_xpos_int, [esp] | |
| 3968 | + mov esp, r5 | |
| 3969 | + pop r5 | |
| 3970 | +%else | |
| 3635 | 3971 | vpunpckhbw ymm_tmp3, ymm_xpos_int, [db80h_256] |
| 3972 | +%endif | |
| 3636 | 3973 | vpshufb ymm_tmp4, ymm_tmp4, ymm_tmp3 |
| 3637 | 3974 | vpshufb ymm_tmp2, ymm_tmp2, ymm_tmp3 |
| 3638 | 3975 | vpmaddwd ymm_tmp4, ymm_tmp4, ymm_tmp1 |
| @@ -3648,7 +3985,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 9 unmodified lines | ||
| 3648 | 3985 | %endmacro |
| 3649 | 3986 | |
| 3650 | 3987 | %macro AVX2_BilinearAccurateDownsample8xOrLess_16px 0 |
| 3988 | +%ifdef X86_32_PICASM | |
| 3989 | + push r5 | |
| 3990 | + mov r5, esp | |
| 3991 | + and esp, 0xffffffe0 | |
| 3992 | + push 0x0c0c0c0c ;shufb_000044448888cccc | |
| 3993 | + push 0x08080808 | |
| 3994 | + push 0x04040404 | |
| 3995 | + push 0x00000000 | |
| 3996 | + vbroadcasti128 ymm_tmp0, [esp] | |
| 3997 | + mov esp, r5 | |
| 3998 | + pop r5 | |
| 3999 | +%else | |
| 3651 | 4000 | vbroadcasti128 ymm_tmp0, [shufb_000044448888CCCC] |
| 4001 | +%endif | |
| 3652 | 4002 | vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0 |
| 3653 | 4003 | vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0 |
| 3654 | 4004 | mov r_tmp0, i_xpos |
| @@ -3669,7 +4019,24 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 14 unmodified lines | ||
| 3669 | 4019 | shr r_tmp0, 16 |
| 3670 | 4020 | vinserti128 ymm_tmp0, ymm_tmp0, [p_src_row0 + r_tmp0], 1 |
| 3671 | 4021 | vinserti128 ymm_tmp1, ymm_tmp1, [p_src_row1 + r_tmp0], 1 |
| 4022 | +%ifdef X86_32_PICASM | |
| 4023 | + push r5 | |
| 4024 | + mov r5, esp | |
| 4025 | + and esp, 0xffffffe0 | |
| 4026 | + push 0x80808080 ;db80h_256 | |
| 4027 | + push 0x80808080 | |
| 4028 | + push 0x80808080 | |
| 4029 | + push 0x80808080 | |
| 4030 | + push 0x80808080 | |
| 4031 | + push 0x80808080 | |
| 4032 | + push 0x80808080 | |
| 4033 | + push 0x80808080 | |
| 4034 | + vpunpcklbw ymm_tmp3, ymm_xpos_int, [esp] | |
| 4035 | + mov esp, r5 | |
| 4036 | + pop r5 | |
| 4037 | +%else | |
| 3672 | 4038 | vpunpcklbw ymm_tmp3, ymm_xpos_int, [db80h_256] |
| 4039 | +%endif | |
| 3673 | 4040 | vpshufb ymm_tmp4, ymm_tmp4, ymm_tmp3 |
| 3674 | 4041 | vpshufb ymm_tmp5, ymm_tmp5, ymm_tmp3 |
| 3675 | 4042 | vpshufb ymm_tmp0, ymm_tmp0, ymm_tmp3 |