Rev 1931 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1931 | Rev 1979 | ||
---|---|---|---|
Line 737... | Line 737... | ||
737 | 737 | ||
738 | blur_screen: ;blur n times ; blur or fire |
738 | blur_screen: ;blur n times ; blur or fire |
739 | ;in - ecx times count |
739 | ;in - ecx times count |
740 | ;.counter equ dword[esp-4] |
740 | ;.counter equ dword[esp-4] |
- | 741 | .counter1 equ dword[esp-8] |
|
- | 742 | if Ext>=SSE2 |
|
- | 743 | push ebp |
|
- | 744 | mov ebp,esp |
|
- | 745 | push dword 0x01010101 |
|
- | 746 | movss xmm5,[esp] |
|
- | 747 | shufps xmm5,xmm5,0 |
|
- | 748 | .again_blur: |
|
- | 749 | push ecx |
|
- | 750 | mov edi,screen |
|
- | 751 | mov ecx,SIZE_X*3/4 |
|
- | 752 | xor eax,eax |
|
- | 753 | rep stosd |
|
- | 754 | ||
- | 755 | mov ecx,(SIZE_X*(SIZE_Y-3))*3/16 |
|
- | 756 | .blr: |
|
- | 757 | @@: |
|
- | 758 | movups xmm0,[edi+SIZE_X*3] |
|
- | 759 | movups xmm1,[edi-SIZE_X*3] |
|
- | 760 | movups xmm2,[edi-3] |
|
- | 761 | movups xmm3,[edi+3] |
|
- | 762 | ||
- | 763 | pavgb xmm0,xmm1 |
|
- | 764 | pavgb xmm2,xmm3 |
|
- | 765 | pavgb xmm0,xmm2 |
|
- | 766 | ||
- | 767 | psubusb xmm0,xmm5 ; importand if fire |
|
- | 768 | ||
- | 769 | movups [edi],xmm0 |
|
- | 770 | add edi,16 |
|
- | 771 | add esi,16 |
|
- | 772 | ||
- | 773 | loop .blr |
|
- | 774 | ||
- | 775 | xor eax,eax |
|
- | 776 | mov ecx,SIZE_X*3/4 |
|
- | 777 | rep stosd |
|
- | 778 | pop ecx |
|
- | 779 | loop .again_blur |
|
- | 780 | mov esp,ebp |
|
- | 781 | pop ebp |
|
- | 782 | end if |
|
- | 783 | ||
- | 784 | if Ext=SSE |
|
- | 785 | emms |
|
- | 786 | push ebp |
|
- | 787 | mov ebp,esp |
|
- | 788 | push dword 0x01010101 |
|
- | 789 | push dword 0x01010101 |
|
- | 790 | movq mm4,[esp] |
|
- | 791 | .again_blur: |
|
- | 792 | push ecx |
|
- | 793 | mov edi,screen |
|
- | 794 | mov ecx,SIZE_X*3/4 |
|
- | 795 | ; pxor mm5,mm5 |
|
- | 796 | xor eax,eax |
|
- | 797 | rep stosd |
|
- | 798 | ||
- | 799 | mov ecx,(SIZE_X*(SIZE_Y-3))*3/8 |
|
- | 800 | .blr: |
|
- | 801 | @@: |
|
- | 802 | movq mm0,[edi+SIZE_X*3] |
|
- | 803 | movq mm1,[edi-SIZE_X*3] |
|
- | 804 | movq mm2,[edi-3] |
|
- | 805 | movq mm3,[edi+3] |
|
- | 806 | ||
- | 807 | pavgb mm0,mm1 |
|
- | 808 | pavgb mm2,mm3 |
|
- | 809 | pavgb mm0,mm2 |
|
- | 810 | ||
- | 811 | psubusb mm0,mm4 ; importand if fire |
|
- | 812 | ||
- | 813 | movq [edi],mm0 |
|
- | 814 | add edi,8 |
|
- | 815 | add esi,8 |
|
- | 816 | ||
- | 817 | loop .blr |
|
- | 818 | ||
- | 819 | xor eax,eax |
|
- | 820 | mov ecx,SIZE_X*3/4 |
|
- | 821 | rep stosd |
|
- | 822 | pop ecx |
|
- | 823 | loop .again_blur |
|
- | 824 | mov esp,ebp |
|
- | 825 | pop ebp |
|
- | 826 | end if |
|
741 | .counter1 equ dword[esp-8] |
827 | |
742 | if Ext>=MMX |
828 | if Ext=MMX |
743 | emms |
829 | emms |
744 | push ebp |
830 | push ebp |
745 | mov ebp,esp |
831 | mov ebp,esp |
746 | push dword 0x0 |
832 | push dword 0x0 |