Changeset 480 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Dec 6, 2023, 11:05:10 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r475 r480 719 719 TBuffer = array [0 .. 99999, 0 .. 2] of Integer; 720 720 var 721 Sum, Cnt, dx, dy, nx, ny, ix, iy, ir, X, Y, C, ch: Integer; 721 Sum: Int64; 722 Cnt, dx, dy, nx, ny, ix, iy, ir, X, Y, C, ch: Integer; 722 723 xdivider, ydivider: Integer; 723 724 Resampled: ^TBuffer; 724 725 PixelPtr: TPixelPointer; 726 V: Integer; 725 727 begin 726 728 nx := BigImp.Width div xSizeBig * xSizeSmall; … … 784 786 ((dx <= 0) or (ScaleFromNative(X) mod xSizeSmall < xSizeSmall - 1)) then 785 787 begin 786 Inc(Sum, Resampled[ScaleFromNative(X) + dx + nx * (ScaleFromNative(Y) + dy), ch]); 788 V := Resampled[ScaleFromNative(X) + dx + nx * (ScaleFromNative(Y) + dy), ch]; 789 Inc(Sum, V); 787 790 Inc(Cnt); 788 791 end; 789 Sum := ((Cnt * Sharpen + 800) * Resampled[ScaleFromNative(X) + nx * ScaleFromNative(Y), ch] - Sum * 790 Sharpen) div (800 * xSizeBig * (ySizeBig - 2 * Cut)); 792 V := Resampled[ScaleFromNative(X) + nx * ScaleFromNative(Y), ch]; 793 Sum := ((Cnt * Sharpen + 800) * V - Sum * Sharpen) 794 div (800 * xSizeBig * (ySizeBig - 2 * Cut)); 795 Sum := Round(Sum / ScaleToNative(ScaleToNative(1))); 791 796 if Sum < 0 then Sum := 0; 792 797 if Sum > 255 then Sum := 255;
Note:
See TracChangeset
for help on using the changeset viewer.