History

avoid text-rel on x86-32bits

Guangwei Wang committed 10 years ago

Commit 783e6fb1 parent 7a9f15c18 files · +2583 −4Browse files

Showing the changes to codec/processing/src (2 of 18 files). Show all

Unified · Split

2 files
  1. codec/processing/src/x86/denoisefilter.asm +19 −0
  2. codec/processing/src/x86/downsample_bilinear.asm +367 −0
codec/processing/src/x86/denoisefilter.asm+19−0
@@ -147,7 +147,20 @@ SECTION .text · 146 unmodified lines
147147 movdqa %2, %1
148148 psrldq %2, 2
149149 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
150162 pmullw %2, [sse2_20]
163+%endif
151164 paddw %3, %2
152165
153166 movdqa %2, %1
@@ -184,7 +197,13 @@ WELS_EXTERN BilateralLumaFilter8_sse2 · 30 unmodified lines
184197
185198 movq xmm6, [r0]
186199 punpcklbw xmm6, xmm7
200+%ifdef X86_32_PICASM
201+ pcmpeqw xmm3, xmm3
202+ psrlw xmm3, 15
203+ psllw xmm3, 5
204+%else
187205 movdqa xmm3, [sse2_32]
206+%endif
188207 pxor xmm4, xmm4 ; nTotWeight
189208 pxor xmm5, xmm5 ; nSum
190209
codec/processing/src/x86/downsample_bilinear.asm+367−0
@@ -1253,7 +1253,20 @@ FAST_WIDTH: · 1252 unmodified lines
12531253 pmaddwd xmm2, xmm1
12541254 pshufd xmm1, xmm2, 00000001b
12551255 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
12561268 movdqa xmm1, [add_extra_half]
1269+%endif
12571270 paddd xmm2, xmm1
12581271 psrld xmm2, 15
12591272
@@ -1554,7 +1567,20 @@ FAST_WIDTH: · 294 unmodified lines
15541567 pmaddwd xmm2, xmm1
15551568 pshufd xmm1, xmm2, 00000001b
15561569 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
15571582 movdqa xmm1, [add_extra_half]
1583+%endif
15581584 paddd xmm2, xmm1
15591585 psrld xmm2, 15
15601586
@@ -1671,15 +1697,52 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 110 unmodified lines
16711697 ;1st line
16721698 movdqa xmm0, [r2] ;F * e E * d D * c C * b B * a A
16731699 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
16741731 movdqa xmm5, [shufb_mask_onethird_low_1]
16751732 movdqa xmm6, [shufb_mask_onethird_high_1]
1733+%endif
16761734 pshufb xmm0, xmm5 ;0 0 0 0 0 0 0 0 0 0 F E D C B A -> xmm0
16771735 pshufb xmm1, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e d c b a -> xmm1
16781736
16791737 movdqa xmm2, [r2+16] ;k K * j J * i I * h H * g G * f
16801738 movdqa xmm3, xmm2
1739+%ifdef X86_32_PICASM
1740+ movdqa xmm5, [esp+48]
1741+ movdqa xmm6, [esp+32]
1742+%else
16811743 movdqa xmm5, [shufb_mask_onethird_low_2]
16821744 movdqa xmm6, [shufb_mask_onethird_high_2]
1745+%endif
16831746 pshufb xmm2, xmm5 ;0 0 0 0 0 K J I H G 0 0 0 0 0 0 -> xmm2
16841747 pshufb xmm3, xmm6 ;0 0 0 0 0 k j i h g f 0 0 0 0 0 -> xmm3
16851748
@@ -1688,8 +1751,13 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 2 unmodified lines
16881751
16891752 movdqa xmm2, [r2+32] ;* p P * o O * n N * m M * l L *
16901753 movdqa xmm3, xmm2
1754+%ifdef X86_32_PICASM
1755+ movdqa xmm5, [esp+16]
1756+ movdqa xmm6, [esp]
1757+%else
16911758 movdqa xmm5, [shufb_mask_onethird_low_3]
16921759 movdqa xmm6, [shufb_mask_onethird_high_3]
1760+%endif
16931761 pshufb xmm2, xmm5 ;P O N M L 0 0 0 0 0 0 0 0 0 0 0 -> xmm2
16941762 pshufb xmm3, xmm6 ;p o n m l 0 0 0 0 0 0 0 0 0 0 0 -> xmm3
16951763
@@ -1700,15 +1768,25 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 4 unmodified lines
17001768 ;2nd line
17011769 movdqa xmm2, [r2+r3] ;F' * e' E' * d' D' * c' C' * b' B' * a' A'
17021770 movdqa xmm3, xmm2
1771+%ifdef X86_32_PICASM
1772+ movdqa xmm5, [esp+80]
1773+ movdqa xmm6, [esp+64]
1774+%else
17031775 movdqa xmm5, [shufb_mask_onethird_low_1]
17041776 movdqa xmm6, [shufb_mask_onethird_high_1]
1777+%endif
17051778 pshufb xmm2, xmm5 ;0 0 0 0 0 0 0 0 0 0 F' E' D' C' B' A' -> xmm2
17061779 pshufb xmm3, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e' d' c' b' a' -> xmm3
17071780
17081781 movdqa xmm1, [r2+r3+16] ;k' K' * j' J' * i' I' * h' H' * g' G' * f'
17091782 movdqa xmm4, xmm1
1783+%ifdef X86_32_PICASM
1784+ movdqa xmm5, [esp+48]
1785+ movdqa xmm6, [esp+32]
1786+%else
17101787 movdqa xmm5, [shufb_mask_onethird_low_2]
17111788 movdqa xmm6, [shufb_mask_onethird_high_2]
1789+%endif
17121790 pshufb xmm1, xmm5 ;0 0 0 0 0 K' J' I' H' G' 0 0 0 0 0 0 -> xmm1
17131791 pshufb xmm4, xmm6 ;0 0 0 0 0 k' j' i' h' g' f' 0 0 0 0 0 -> xmm4
17141792
@@ -1717,8 +1795,15 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_ssse3 · 2 unmodified lines
17171795
17181796 movdqa xmm1, [r2+r3+32] ; * p' P' * o' O' * n' N' * m' M' * l' L' *
17191797 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
17201804 movdqa xmm5, [shufb_mask_onethird_low_3]
17211805 movdqa xmm6, [shufb_mask_onethird_high_3]
1806+%endif
17221807 pshufb xmm1, xmm5 ;P' O' N' M' L' 0 0 0 0 0 0 0 0 0 0 0 -> xmm1
17231808 pshufb xmm4, xmm6 ;p' o' n' m' l' 0 0 0 0 0 0 0 0 0 0 0 -> xmm4
17241809
@@ -1821,15 +1906,52 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 96 unmodified lines
18211906 ;1st line
18221907 movntdqa xmm0, [r2] ;F * e E * d D * c C * b B * a A
18231908 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
18241940 movdqa xmm5, [shufb_mask_onethird_low_1]
18251941 movdqa xmm6, [shufb_mask_onethird_high_1]
1942+%endif
18261943 pshufb xmm0, xmm5 ;0 0 0 0 0 0 0 0 0 0 F E D C B A -> xmm0
18271944 pshufb xmm1, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e d c b a -> xmm1
18281945
18291946 movntdqa xmm2, [r2+16] ;k K * j J * i I * h H * g G * f
18301947 movdqa xmm3, xmm2
1948+%ifdef X86_32_PICASM
1949+ movdqa xmm5, [esp+48]
1950+ movdqa xmm6, [esp+32]
1951+%else
18311952 movdqa xmm5, [shufb_mask_onethird_low_2]
18321953 movdqa xmm6, [shufb_mask_onethird_high_2]
1954+%endif
18331955 pshufb xmm2, xmm5 ;0 0 0 0 0 K J I H G 0 0 0 0 0 0 -> xmm2
18341956 pshufb xmm3, xmm6 ;0 0 0 0 0 k j i h g f 0 0 0 0 0 -> xmm3
18351957
@@ -1838,8 +1960,13 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 2 unmodified lines
18381960
18391961 movntdqa xmm2, [r2+32] ;* p P * o O * n N * m M * l L *
18401962 movdqa xmm3, xmm2
1963+%ifdef X86_32_PICASM
1964+ movdqa xmm5, [esp+16]
1965+ movdqa xmm6, [esp]
1966+%else
18411967 movdqa xmm5, [shufb_mask_onethird_low_3]
18421968 movdqa xmm6, [shufb_mask_onethird_high_3]
1969+%endif
18431970 pshufb xmm2, xmm5 ;P O N M L 0 0 0 0 0 0 0 0 0 0 0 -> xmm2
18441971 pshufb xmm3, xmm6 ;p o n m l 0 0 0 0 0 0 0 0 0 0 0 -> xmm3
18451972
@@ -1850,15 +1977,25 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 4 unmodified lines
18501977 ;2nd line
18511978 movntdqa xmm2, [r2+r3] ;F' * e' E' * d' D' * c' C' * b' B' * a' A'
18521979 movdqa xmm3, xmm2
1980+%ifdef X86_32_PICASM
1981+ movdqa xmm5, [esp+80]
1982+ movdqa xmm6, [esp+64]
1983+%else
18531984 movdqa xmm5, [shufb_mask_onethird_low_1]
18541985 movdqa xmm6, [shufb_mask_onethird_high_1]
1986+%endif
18551987 pshufb xmm2, xmm5 ;0 0 0 0 0 0 0 0 0 0 F' E' D' C' B' A' -> xmm2
18561988 pshufb xmm3, xmm6 ;0 0 0 0 0 0 0 0 0 0 0 e' d' c' b' a' -> xmm3
18571989
18581990 movntdqa xmm1, [r2+r3+16] ;k' K' * j' J' * i' I' * h' H' * g' G' * f'
18591991 movdqa xmm4, xmm1
1992+%ifdef X86_32_PICASM
1993+ movdqa xmm5, [esp+48]
1994+ movdqa xmm6, [esp+32]
1995+%else
18601996 movdqa xmm5, [shufb_mask_onethird_low_2]
18611997 movdqa xmm6, [shufb_mask_onethird_high_2]
1998+%endif
18621999 pshufb xmm1, xmm5 ;0 0 0 0 0 K' J' I' H' G' 0 0 0 0 0 0 -> xmm1
18632000 pshufb xmm4, xmm6 ;0 0 0 0 0 k' j' i' h' g' f' 0 0 0 0 0 -> xmm4
18642001
@@ -1867,8 +2004,15 @@ WELS_EXTERN DyadicBilinearOneThirdDownsampler_sse4 · 2 unmodified lines
18672004
18682005 movntdqa xmm1, [r2+r3+32] ; * p' P' * o' O' * n' N' * m' M' * l' L' *
18692006 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
18702013 movdqa xmm5, [shufb_mask_onethird_low_3]
18712014 movdqa xmm6, [shufb_mask_onethird_high_3]
2015+%endif
18722016 pshufb xmm1, xmm5 ;P' O' N' M' L' 0 0 0 0 0 0 0 0 0 0 0 -> xmm1
18732017 pshufb xmm4, xmm6 ;p' o' n' m' l' 0 0 0 0 0 0 0 0 0 0 0 -> xmm4
18742018
@@ -2112,7 +2256,20 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_ssse3 · 237 unmodified lines
21122256 add r6, r0
21132257 movq xmm7, [r6]
21142258
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
21152271 movdqa xmm6, [shufb_mask_quarter]
2272+%endif
21162273 .yloops_quarter_sse3:
21172274 ;mov eax, [esp+40] ; iSrcWidth
21182275 ;sar eax, $02 ; iSrcWidth >> 2
@@ -2221,7 +2378,20 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 102 unmodified lines
22212378 add r6, r0
22222379 movq xmm7, [r6]
22232380
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
22242393 movdqa xmm6, [shufb_mask_quarter] ;mask
2394+%endif
22252395
22262396 .yloops_quarter_sse4:
22272397 %ifdef X86_32
@@ -2364,7 +2534,20 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 136 unmodified lines
23642534
23652535 %macro SSSE3_BilinearFastDownsample4xOrLess_8px 0
23662536 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
23672549 pshufb xmm_tmp0, [shufb_0000000088888888]
2550+%endif
23682551 psubb xmm_xpos_int, xmm_tmp0
23692552 SSE2_UnpckXFracuw xmm_tmp0, xmm_tmp1, xmm_xpos_frac
23702553 mov r_tmp0, i_xpos
@@ -2372,7 +2555,24 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 1 unmodified line
23722555 lddqu xmm_tmp3, [p_src_row0 + r_tmp0]
23732556 lddqu xmm_tmp4, [p_src_row1 + r_tmp0]
23742557 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
23752574 punpcklbw xmm_tmp2, [db80h_256]
2575+%endif
23762576 pshufb xmm_tmp3, xmm_tmp2
23772577 pshufb xmm_tmp4, xmm_tmp2
23782578 SSE2_BilinearFastCalcXYFrac xmm_tmp0, xmm_tmp2, xmm_yfrac0, xmm_yfrac1
@@ -2385,7 +2585,24 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 6 unmodified lines
23852585 lddqu xmm_tmp3, [p_src_row0 + r_tmp0]
23862586 lddqu xmm_tmp4, [p_src_row1 + r_tmp0]
23872587 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
23882604 punpckhbw xmm_tmp2, [db80h_256]
2605+%endif
23892606 pshufb xmm_tmp3, xmm_tmp2
23902607 pshufb xmm_tmp4, xmm_tmp2
23912608 SSE2_BilinearFastCalcXYFrac xmm_tmp1, xmm_tmp2, xmm_yfrac0, xmm_yfrac1
@@ -2524,13 +2741,43 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 132 unmodified lines
25242741
25252742 %macro SSE41_BilinearAccurateDownsample4xOrLess_8px 0
25262743 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
25272756 pshufb xmm_tmp0, [shufb_0000000088888888]
2757+%endif
25282758 psubb xmm_xpos_int, xmm_tmp0
25292759 SSE2_UnpckXFracw xmm_tmp0, xmm_tmp1, xmm_xpos_frac, xmm_7fff
25302760 mov r_tmp0, i_xpos
25312761 shr r_tmp0, 16
25322762 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
25332779 punpcklbw xmm_tmp3, [db80h_256]
2780+%endif
25342781 lddqu xmm_tmp4, [p_src_row0 + r_tmp0]
25352782 lddqu xmm_tmp2, [p_src_row1 + r_tmp0]
25362783 lea r_tmp0, [i_xpos + 4 * i_scalex]
@@ -2542,7 +2789,24 @@ WELS_EXTERN DyadicBilinearQuarterDownsampler_sse4 · 5 unmodified lines
25422789 pmaddwd xmm_tmp2, xmm_tmp0
25432790 SSE41_LinearAccurateInterpolateVerticalDwords xmm_tmp0, xmm_tmp4, xmm_tmp2, xmm_yfrac0, xmm_yfrac1, xmm_tmp3
25442791 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
25452808 punpckhbw xmm_tmp2, [db80h_256]
2809+%endif
25462810 lddqu xmm_tmp4, [p_src_row0 + r_tmp0]
25472811 lddqu xmm_tmp3, [p_src_row1 + r_tmp0]
25482812 pshufb xmm_tmp4, xmm_tmp2
@@ -3321,7 +3585,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 772 unmodified lines
33213585 %endmacro
33223586
33233587 %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
33243600 vbroadcasti128 ymm_tmp0, [shufb_0000000088888888]
3601+%endif
33253602 vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0
33263603 vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0
33273604 AVX2_UnpckXFrac ymm_tmp0, ymm_tmp1, ymm_xpos_frac, ymm_ffff
@@ -3365,7 +3642,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 37 unmodified lines
33653642 %endmacro
33663643
33673644 %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
33683657 vbroadcasti128 ymm_tmp0, [shufb_000044448888CCCC]
3658+%endif
33693659 vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0
33703660 vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0
33713661 mov r_tmp0, i_xpos
@@ -3604,7 +3894,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 232 unmodified lines
36043894 %endmacro
36053895
36063896 %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
36073909 vbroadcasti128 ymm_tmp0, [shufb_0000000088888888]
3910+%endif
36083911 vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0
36093912 vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0
36103913 AVX2_UnpckXFrac ymm_tmp0, ymm_tmp1, ymm_xpos_frac, ymm_7fff
@@ -3619,7 +3922,24 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 8 unmodified lines
36193922 lea r_tmp0, [i_xpos + 2 * i_scalex2]
36203923 lea i_xpos, [r_tmp0 + 4 * i_scalex2]
36213924 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
36223941 vpunpcklbw ymm_tmp3, ymm_xpos_int, [db80h_256]
3942+%endif
36233943 vpshufb ymm_tmp4, ymm_tmp4, ymm_tmp3
36243944 vpshufb ymm_tmp2, ymm_tmp2, ymm_tmp3
36253945 vpmaddwd ymm_tmp4, ymm_tmp4, ymm_tmp0
@@ -3632,7 +3952,24 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 6 unmodified lines
36323952 shr r_tmp0, 16
36333953 vinserti128 ymm_tmp4, ymm_tmp4, [p_src_row0 + r_tmp0], 1
36343954 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
36353971 vpunpckhbw ymm_tmp3, ymm_xpos_int, [db80h_256]
3972+%endif
36363973 vpshufb ymm_tmp4, ymm_tmp4, ymm_tmp3
36373974 vpshufb ymm_tmp2, ymm_tmp2, ymm_tmp3
36383975 vpmaddwd ymm_tmp4, ymm_tmp4, ymm_tmp1
@@ -3648,7 +3985,20 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 9 unmodified lines
36483985 %endmacro
36493986
36503987 %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
36514000 vbroadcasti128 ymm_tmp0, [shufb_000044448888CCCC]
4001+%endif
36524002 vpshufb ymm_tmp0, ymm_xpos_int, ymm_tmp0
36534003 vpsubb ymm_xpos_int, ymm_xpos_int, ymm_tmp0
36544004 mov r_tmp0, i_xpos
@@ -3669,7 +4019,24 @@ WELS_EXTERN GeneralBilinearAccurateDownsampler_sse41 · 14 unmodified lines
36694019 shr r_tmp0, 16
36704020 vinserti128 ymm_tmp0, ymm_tmp0, [p_src_row0 + r_tmp0], 1
36714021 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
36724038 vpunpcklbw ymm_tmp3, ymm_xpos_int, [db80h_256]
4039+%endif
36734040 vpshufb ymm_tmp4, ymm_tmp4, ymm_tmp3
36744041 vpshufb ymm_tmp5, ymm_tmp5, ymm_tmp3
36754042 vpshufb ymm_tmp0, ymm_tmp0, ymm_tmp3

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t