procedure Draw32BitToBitmapPreMMX(
const BitOben: TBitmap; BitUnten: TBitmap);
const
Magic: UInt16 = $8081;
var
W, x, y: Integer;
Stride, ORes: Integer;
RowO, RowU,
RGBA_Oben, RGBA_Unten: ^TRGBQuad;
begin
RowU := BitUnten.ScanLine[0];
RowO := BitOben.ScanLine[0];
W := BitUnten.Width;
Stride := 4 * W;
for y := 0
to BitUnten.Height - 1
do
begin
RGBA_Unten := RowU;
RGBA_Oben := RowO;
for x := 0
to W - 1
do
begin
ORes := RGBA_Oben^.rgbReserved;
with RGBA_Unten^
do
begin
rgbBlue := (ORes * (RGBA_Oben^.rgbBlue - rgbBlue)) *
Magic
div (1
shl 23) + rgbBlue;
rgbGreen := (ORes * (RGBA_Oben^.rgbGreen - rgbGreen)) *
Magic
div (1
shl 23) + rgbGreen;
rgbRed := (ORes * (RGBA_Oben^.rgbRed - rgbRed)) *
Magic
div (1
shl 23) + rgbRed;
rgbReserved := 255;
end;
Inc(RGBA_Unten); Inc(RGBA_Oben);
end;
Dec(Cardinal(RowU), Stride);
Dec(Cardinal(RowO), Stride);
end;
end;