Subversion Repositories Kolibri OS

Rev

Rev 291 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 291 Rev 293
Line 88... Line 88...
88
@@:
88
@@:
89
           stdcall final_mix, [output],[mix_input],[mix_input+4],[mix_input+8], [mix_input+12]
89
           stdcall final_mix, [output],[mix_input],[mix_input+4],[mix_input+8], [mix_input+12]
90
.m3:
90
.m3:
91
           add [output],512
91
           add [output],512
Line 92... Line 92...
92
 
92
 
93
           sub [main_count], 1
93
           dec [main_count]
Line 94... Line 94...
94
           jnz .l00
94
           jnz .l00
95
 
95
 
96
           call update_stream
96
           call update_stream
Line 620... Line 620...
620
           shl eax, 9
620
           shl eax, 9
621
           add eax, [mix_buff]
621
           add eax, [mix_buff]
622
           ret
622
           ret
623
endp
623
endp
Line -... Line 624...
-
 
624
 
624
 
625
align 4
Line 625... Line 626...
625
proc m16_s_mmx
626
proc m16_s_mmx
626
 
627
 
627
           movq    mm0, [esi]
628
           movq    mm0, [esi]
Line 775... Line 776...
775
           movq    [edi+56], mm3
776
           movq    [edi+56], mm3
Line 776... Line 777...
776
 
777
 
777
           ret
778
           ret
Line 778... Line -...
778
endp
-
 
779
 
779
endp
780
 
780
 
Line 781... Line 781...
781
align 4
781
align 4
-
 
782
proc mix_2_1 stdcall, output:dword, str0:dword, str1:dword
-
 
783
 
-
 
784
           mov edi, [output]
-
 
785
           mov eax, [str0]
Line 782... Line -...
782
proc mix_2_1 stdcall, output:dword, str0:dword, str1:dword
-
 
783
 
-
 
784
           mov edi, [output]
786
           mov ebx, [str1]
785
 
787
           mov esi, 128
786
           stdcall mix_2_1_mmx, edi, [str0],[str1]
788
           call [mix_2_core]   ;edi, eax, ebx
787
;           stdcall mix_2_1_sse, edi, [str0],[str1]
789
 
788
           add edi, 128
-
 
-
 
790
           add edi, esi
789
           add [str0], 128
791
           add eax, esi
790
           add [str1], 128
792
           add ebx, esi
791
           stdcall mix_2_1_mmx, edi, [str0],[str1]
793
           call [mix_2_core]   ;edi, eax, ebx
792
;           stdcall mix_2_1_sse, edi, [str0],[str1]
794
 
793
           add edi, 128
-
 
-
 
795
           add edi, esi
794
           add [str0], 128
796
           add eax, esi
795
           add [str1], 128
797
           add ebx, esi
796
           stdcall mix_2_1_mmx, edi, [str0],[str1]
798
           call [mix_2_core]   ;edi, eax, ebx
797
;           stdcall mix_2_1_sse, edi, [str0],[str1]
799
 
798
           add edi, 128
-
 
799
           add [str0], 128
-
 
800
           add [str1], 128
800
           add edi, esi
801
           stdcall mix_2_1_mmx, edi, [str0],[str1]
801
           add eax, esi
Line 802... Line -...
802
;           stdcall mix_2_1_sse, edi, [str0],[str1]
-
 
803
 
802
           add ebx, esi
804
           ret
803
           call [mix_2_core]   ;edi, eax, ebx
Line 805... Line 804...
805
endp
804
           ret
-
 
805
endp
-
 
806
 
-
 
807
align 4
-
 
808
proc mix_3_1 stdcall, output:dword, str0:dword, str1:dword, str2:dword
-
 
809
 
Line 806... Line -...
806
 
-
 
807
 
810
           mov edi, [output]
808
align 4
811
           mov eax, [str0]
809
proc mix_3_1 stdcall, output:dword, str0:dword, str1:dword, str2:dword
812
           mov ebx, [str1]
810
 
813
           mov ecx, [str2]
811
           mov edi, [output]
814
           mov esi, 128
-
 
815
           call [mix_3_core]
812
 
816
 
813
           stdcall mix_3_1_mmx, edi, [str0],[str1],[str2]
817
           add edi, esi
814
           add edi, 128
818
           add eax, esi
815
           add [str0], 128
819
           add ebx, esi
816
           add [str1], 128
820
           add ecx, esi
-
 
821
           call [mix_3_core]
817
           add [str2], 128
822
 
818
           stdcall mix_3_1_mmx, edi, [str0],[str1],[str2]
823
           add edi, esi
819
           add edi, 128
824
           add eax, esi
820
           add [str0], 128
825
           add ebx, esi
821
           add [str1], 128
826
           add ecx, esi
822
           add [str2], 128
-
 
823
           stdcall mix_3_1_mmx, edi, [str0],[str1],[str2]
827
           call [mix_3_core]
824
           add edi, 128
828
 
Line 825... Line 829...
825
           add [str0], 128
829
           add edi, esi
826
           add [str1], 128
830
           add eax, esi
Line 837... Line 841...
837
           local output:DWORD
841
           local output:DWORD
Line 838... Line 842...
838
 
842
 
839
           call alloc_mix_buff
843
           call alloc_mix_buff
840
           and eax, eax
844
           and eax, eax
841
           jz .err
-
 
Line 842... Line 845...
842
           mov [output], eax
845
           jz .err
-
 
846
 
-
 
847
           mov edi, eax
-
 
848
           mov eax, [str0]
-
 
849
           mov ebx, [str1]
-
 
850
           mov ecx, [str2]
-
 
851
           mov edx, [str3]
843
 
852
           mov esi, 128
844
           mov edi, eax
-
 
845
 
853
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
846
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
854
 
847
           add edi, 128
855
           add edi, esi
848
           add [str0], 128
856
           add eax, esi
849
           add [str1], 128
857
           add ebx, esi
850
           add [str2], 128
858
           add ecx, esi
-
 
859
           add edx, esi
851
           add [str3], 128
860
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
852
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
861
 
853
           add edi, 128
862
           add edi, esi
854
           add [str0], 128
863
           add eax, esi
855
           add [str1], 128
864
           add ebx, esi
856
           add [str2], 128
865
           add ecx, esi
-
 
866
           add edx, esi
857
           add [str3], 128
867
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
858
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
868
 
859
           add edi, 128
869
           add edi, esi
860
           add [str0], 128
870
           add eax, esi
861
           add [str1], 128
871
           add ebx, esi
862
           add [str2], 128
872
           add ecx, esi
863
           add [str3], 128
873
           add edx, esi
864
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
874
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
865
           mov eax, [output]
875
           mov eax, [output]
866
           ret
876
           ret
867
.err:
877
.err:
Line 874... Line 884...
874
proc final_mix stdcall, output:dword, str0:dword, str1:dword,\
884
proc final_mix stdcall, output:dword, str0:dword, str1:dword,\
875
                        str2:dword, str3:dword
885
                        str2:dword, str3:dword
Line 876... Line 886...
876
 
886
 
Line 877... Line -...
877
           mov edi, [output]
-
 
878
 
-
 
879
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
-
 
880
           add edi, 128
-
 
881
           add [str0], 128
-
 
882
           add [str1], 128
-
 
883
           add [str2], 128
-
 
884
           add [str3], 128
-
 
885
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
-
 
886
           add edi, 128
-
 
887
           add [str0], 128
-
 
888
           add [str1], 128
-
 
889
           add [str2], 128
-
 
890
           add [str3], 128
-
 
891
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
-
 
892
           add edi, 128
-
 
893
           add [str0], 128
-
 
894
           add [str1], 128
-
 
895
           add [str2], 128
-
 
896
           add [str3], 128
-
 
897
           stdcall mix_4_1_mmx, edi, [str0],[str1],[str2],[str3]
-
 
898
 
-
 
899
           ret
-
 
900
endp
-
 
901
 
-
 
902
align 4
-
 
903
proc mix_2_1_mmx stdcall, output:dword, str0:dword, str1:dword
-
 
904
 
-
 
905
           mov edx, [output]
-
 
906
           mov eax, [str0]
-
 
907
           mov ecx, [str1]
-
 
908
 
-
 
909
           movq mm0, [eax]
-
 
910
           paddsw mm0, [ecx]
-
 
911
           movq [edx], mm0
-
 
912
 
-
 
913
           movq mm1, [eax+8]
-
 
914
           paddsw mm1,[ecx+8]
-
 
915
           movq [edx+8], mm1
-
 
916
 
-
 
917
           movq mm2, [eax+16]
-
 
918
           paddsw mm2, [ecx+16]
-
 
919
           movq [edx+16], mm2
-
 
920
 
-
 
921
           movq mm3, [eax+24]
-
 
922
           paddsw mm3, [ecx+24]
-
 
923
           movq [edx+24], mm3
-
 
924
 
-
 
925
           movq mm0, [eax+32]
-
 
926
           paddsw mm0, [ecx+32]
-
 
927
           movq [edx+32], mm0
-
 
928
 
-
 
929
           movq mm1, [eax+40]
-
 
930
           paddsw mm1, [ecx+40]
-
 
931
           movq [edx+40], mm1
-
 
932
 
-
 
933
           movq mm2, [eax+48]
-
 
934
           paddsw mm2, [ecx+48]
-
 
935
           movq [edx+48], mm2
-
 
936
 
-
 
937
           movq mm3, [eax+56]
-
 
938
           paddsw mm3, [ecx+56]
-
 
939
           movq [edx+56], mm3
-
 
940
 
-
 
941
           movq mm0, [eax+64]
-
 
942
           paddsw mm0, [ecx+64]
-
 
943
           movq [edx+64], mm0
-
 
944
 
-
 
945
           movq mm1, [eax+72]
-
 
946
           paddsw mm1, [ecx+72]
-
 
947
           movq [edx+72], mm1
-
 
948
 
-
 
949
           movq mm2, [eax+80]
-
 
950
           paddsw mm2, [ecx+80]
-
 
951
           movq [edx+80], mm2
-
 
952
 
-
 
953
           movq mm3, [eax+88]
-
 
954
           paddsw mm3, [ecx+88]
-
 
955
           movq [edx+88], mm3
-
 
956
 
-
 
957
           movq mm0, [eax+96]
-
 
958
           paddsw mm0, [ecx+96]
-
 
959
           movq [edx+96], mm0
-
 
960
 
-
 
961
           movq mm1, [eax+104]
-
 
962
           paddsw mm1, [ecx+104]
-
 
963
           movq [edx+104], mm1
-
 
964
 
-
 
965
           movq mm2, [eax+112]
-
 
966
           paddsw mm2, [ecx+112]
-
 
967
           movq [edx+112], mm2
-
 
968
 
-
 
969
           movq mm3, [eax+120]
-
 
970
           paddsw mm3, [ecx+120]
-
 
971
           movq [edx+120], mm3
-
 
972
 
-
 
973
           ret
-
 
974
endp
-
 
975
 
-
 
976
 
-
 
977
 
-
 
978
align 4
-
 
979
proc mix_3_1_mmx stdcall, output:dword, str0:dword, str1:dword, str2:dword
-
 
980
 
887
           mov edi, [output]
981
           mov edx, [output]
888
 
982
           mov eax, [str0]
889
           mov eax, [str0]
983
           mov ebx, [str1]
-
 
984
           mov ecx, [str2]
890
           mov ebx, [str1]
985
 
-
 
986
           movq mm0, [eax]
-
 
987
           paddsw mm0, [ebx]
891
           mov ecx, [str2]
988
           paddsw mm0, [ecx]
-
 
989
           movq [edx], mm0
-
 
990
 
-
 
991
           movq mm1, [eax+8]
-
 
992
           paddsw mm1,[ebx+8]
-
 
993
           paddsw mm1,[ecx+8]
-
 
994
           movq [edx+8], mm1
-
 
995
 
-
 
996
           movq mm2, [eax+16]
-
 
997
           paddsw mm2, [ebx+16]
-
 
998
           paddsw mm2, [ecx+16]
-
 
999
           movq [edx+16], mm2
-
 
1000
 
-
 
1001
           movq mm3, [eax+24]
-
 
1002
           paddsw mm3, [ebx+24]
-
 
1003
           paddsw mm3, [ecx+24]
-
 
1004
           movq [edx+24], mm3
-
 
1005
 
-
 
1006
           movq mm0, [eax+32]
-
 
1007
           paddsw mm0, [ebx+32]
-
 
1008
           paddsw mm0, [ecx+32]
-
 
1009
           movq [edx+32], mm0
-
 
1010
 
-
 
1011
           movq mm1, [eax+40]
-
 
1012
           paddsw mm1, [ebx+40]
-
 
1013
           paddsw mm1, [ecx+40]
-
 
1014
           movq [edx+40], mm1
-
 
1015
 
-
 
1016
           movq mm2, [eax+48]
-
 
1017
           paddsw mm2, [ebx+48]
-
 
1018
           paddsw mm2, [ecx+48]
-
 
1019
           movq [edx+48], mm2
-
 
1020
 
-
 
1021
           movq mm3, [eax+56]
-
 
1022
           paddsw mm3, [ebx+56]
-
 
1023
           paddsw mm3, [ecx+56]
-
 
1024
           movq [edx+56], mm3
-
 
1025
 
-
 
1026
           movq mm0, [eax+64]
-
 
1027
           paddsw mm0, [ebx+64]
-
 
1028
           paddsw mm0, [ecx+64]
-
 
1029
           movq [edx+64], mm0
-
 
1030
 
-
 
1031
           movq mm1, [eax+72]
-
 
1032
           paddsw mm1, [ebx+72]
-
 
1033
           paddsw mm1, [ecx+72]
-
 
1034
           movq [edx+72], mm1
-
 
1035
 
-
 
1036
           movq mm2, [eax+80]
-
 
1037
           paddsw mm2, [ebx+80]
-
 
1038
           paddsw mm2, [ecx+80]
-
 
1039
           movq [edx+80], mm2
-
 
1040
 
-
 
1041
           movq mm3, [eax+88]
-
 
1042
           paddsw mm3, [ebx+88]
-
 
1043
           paddsw mm3, [ecx+88]
-
 
1044
           movq [edx+88], mm3
-
 
1045
 
-
 
1046
           movq mm0, [eax+96]
-
 
1047
           paddsw mm0, [ebx+96]
-
 
1048
           paddsw mm0, [ecx+96]
-
 
1049
           movq [edx+96], mm0
-
 
1050
 
-
 
1051
           movq mm1, [eax+104]
-
 
1052
           paddsw mm1, [ebx+104]
-
 
1053
           paddsw mm1, [ecx+104]
-
 
1054
           movq [edx+104], mm1
-
 
1055
 
-
 
1056
           movq mm2, [eax+112]
-
 
1057
           paddsw mm2, [ebx+112]
-
 
1058
           paddsw mm2, [ecx+112]
-
 
1059
           movq [edx+112], mm2
-
 
1060
 
-
 
1061
           movq mm3, [eax+120]
-
 
1062
           paddsw mm3, [ebx+120]
-
 
1063
           paddsw mm3, [ecx+120]
-
 
1064
           movq [edx+120], mm3
-
 
1065
 
-
 
1066
           ret
-
 
1067
endp
-
 
1068
 
-
 
1069
align 4
892
           mov edx, [str3]
1070
proc mix_4_1_mmx stdcall, output:dword, str0:dword, str1:dword,\
893
           mov esi, 128
1071
                          str2:dword, str3:dword
-
 
1072
 
894
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
1073
           mov edx, [output]
895
 
1074
           mov esi, [str0]
896
           add edi, esi
1075
           mov eax, [str1]
897
           add eax, esi
1076
           mov ebx, [str2]
-
 
1077
           mov ecx, [str3]
898
           add ebx, esi
1078
 
-
 
1079
           movq mm0, [esi]
-
 
1080
           movq mm1, [eax]
-
 
1081
           paddsw mm0, [ebx]
-
 
1082
           paddsw mm1, [ecx]
-
 
1083
           paddsw mm0, mm1
-
 
1084
           movq [edx], mm0
-
 
1085
 
-
 
1086
           movq mm2, [esi+8]
-
 
1087
           movq mm3, [eax+8]
-
 
1088
           paddsw mm2, [ebx+8]
-
 
1089
           paddsw mm3, [ecx+8]
-
 
1090
           paddsw mm2, mm3
-
 
1091
           movq [edx+8], mm2
-
 
1092
 
-
 
1093
           movq mm0, [esi+16]
-
 
1094
           movq mm1, [eax+16]
-
 
1095
           paddsw mm0, [ebx+16]
-
 
1096
           paddsw mm1, [ecx+16]
-
 
1097
           paddsw mm0, mm1
-
 
1098
           movq [edx+16], mm0
-
 
1099
 
-
 
1100
           movq mm2, [esi+24]
-
 
1101
           movq mm3, [eax+24]
899
           add ecx, esi
1102
           paddsw mm2, [ebx+24]
-
 
1103
           paddsw mm3, [ecx+24]
-
 
1104
           paddsw mm2, mm3
900
           add edx, esi
1105
           movq [edx+24], mm2
-
 
1106
 
-
 
1107
           movq mm0, [esi+32]
-
 
1108
           movq mm1, [eax+32]
-
 
1109
           paddsw mm0, [ebx+32]
901
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
1110
           paddsw mm1, [ecx+32]
-
 
1111
           paddsw mm0, mm1
-
 
1112
           movq [edx+32], mm0
-
 
1113
 
-
 
1114
           movq mm2, [esi+40]
-
 
1115
           movq mm3, [eax+40]
-
 
1116
           paddsw mm2, [ebx+40]
902
 
1117
           paddsw mm3, [ecx+40]
-
 
1118
           paddsw mm2, mm3
-
 
1119
           movq [edx+40], mm2
-
 
1120
 
-
 
1121
           movq mm0, [esi+48]
-
 
1122
           movq mm1, [eax+48]
-
 
1123
           paddsw mm0, [ebx+48]
903
           add edi, esi
1124
           paddsw mm1, [ecx+48]
-
 
1125
           paddsw mm0, mm1
-
 
1126
           movq [edx+48], mm0
-
 
1127
 
-
 
1128
           movq mm2, [esi+56]
-
 
1129
           movq mm3, [eax+56]
-
 
1130
           paddsw mm2, [ebx+56]
904
           add eax, esi
1131
           paddsw mm3, [ecx+56]
-
 
1132
           paddsw mm2, mm3
-
 
1133
           movq [edx+56], mm2
-
 
1134
 
-
 
1135
           movq mm0, [esi+64]
-
 
1136
           movq mm1, [eax+64]
-
 
1137
           paddsw mm0, [ebx+64]
905
           add ebx, esi
1138
           paddsw mm1, [ecx+64]
-
 
1139
           paddsw mm0, mm1
-
 
1140
           movq [edx+64], mm0
-
 
1141
 
-
 
1142
           movq mm2, [esi+72]
-
 
1143
           movq mm3, [eax+72]
906
           add ecx, esi
1144
           paddsw mm2, [ebx+72]
-
 
1145
           paddsw mm3, [ecx+72]
-
 
1146
           paddsw mm2, mm3
907
           add edx, esi
1147
           movq [edx+72], mm2
-
 
1148
 
-
 
1149
           movq mm2, [esi+80]
-
 
1150
           movq mm3, [eax+80]
-
 
1151
           paddsw mm2, [ebx+80]
908
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
1152
           paddsw mm3, [ecx+80]
-
 
1153
           paddsw mm2, mm3
-
 
1154
           movq [edx+80], mm2
-
 
1155
 
-
 
1156
           movq mm2, [esi+88]
-
 
1157
           movq mm3, [eax+88]
-
 
1158
           paddsw mm2, [ebx+88]
909
 
1159
           paddsw mm3, [ecx+88]
-
 
1160
           paddsw mm2, mm3
-
 
1161
           movq [edx+88], mm2
-
 
1162
 
-
 
1163
           movq mm2, [esi+96]
-
 
1164
           movq mm3, [eax+96]
-
 
1165
           paddsw mm2, [ebx+96]
910
           add edi, esi
1166
           paddsw mm3, [ecx+96]
-
 
1167
           paddsw mm2, mm3
-
 
1168
           movq [edx+96], mm2
-
 
1169
 
-
 
1170
           movq mm2, [esi+104]
-
 
1171
           movq mm3, [eax+104]
-
 
1172
           paddsw mm2, [ebx+104]
911
           add eax, esi
1173
           paddsw mm3, [ecx+104]
-
 
1174
           paddsw mm2, mm3
-
 
1175
           movq [edx+104], mm2
-
 
1176
 
-
 
1177
           movq mm2, [esi+112]
-
 
1178
           movq mm3, [eax+112]
-
 
1179
           paddsw mm2, [ebx+112]
912
           add ebx, esi
1180
           paddsw mm3, [ecx+112]
-
 
1181
           paddsw mm2, mm3
-
 
1182
           movq [edx+112], mm2
-
 
1183
 
-
 
1184
           movq mm2, [esi+120]
-
 
1185
           movq mm3, [eax+120]
913
           add ecx, esi
1186
           paddsw mm2, [ebx+120]
-
 
1187
           paddsw mm3, [ecx+120]
-
 
1188
           paddsw mm2, mm3
-
 
1189
           movq [edx+120], mm2
914
           add edx, esi
1190
 
915
           call [mix_4_core]  ;edi, eax, ebx, ecx, edx
Line 1191... Line 916...
1191
           ret
916
           ret
1192
endp
917
endp