Board index » delphi » MMX how to???
x
Delphi Developer |
MMX how to???2005-10-03 08:37:42 PM delphi131 Hi there, I tried to convert these routines using MMX instructions, but I cannot do it. My knowledge is not good enough. Can somebody help me??? The should run as many times as possible in one secound... PByteArray = ^TByteArray; TByteArray = array[0..100000] of Byte; procedure A(P1, P2, P3: PByteArray; Count: Integer); var I: Integer; begiun for I := 0 to Count do P1[I] := Max(P2[I], P3[I]); end; procedure B(P1, P2, P3: PByteArray; Count: Integer); function Correct(A, B: Byte): ShortInt; begin Result := A - B; if Result>0 then begin if Result>3 then Result := 3; end else if Result < -3 then Result := -3; end; var I: Integer; begin for I := 0 to Count do P1[I] := P2[I] + Correct(P2[I], P3[I]); end; Best regards, Brian Andersen |