Skip to content

Commit 68376a9

Browse files
committed
Refined the tile counting to algorithm.
+ Now chooses the closer one in log-scale of zooming ratios.
1 parent 2613f89 commit 68376a9

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

@Basic_S.anm2

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- under development for v2.03 (for beta43b) r1
1+
-- under development for v2.03 (for beta43b) r2
22
--[[
33
MIT License
44
Copyright (c) 2025-2026 sigma-axis
@@ -2708,9 +2708,12 @@ local function adjust_margin(m1, m2, sz, len, unit, loop, piv)
27082708
p0 = m1 - ((m1 - p0) % mid); -- make sure p0 <= m1.
27092709
else
27102710
p1 = len / mid;
2711-
p1 = pad > 0 and
2712-
0.5 + math.floor(p1) or
2713-
math.max(math.floor(0.5 + p1), 1);
2711+
local f, c;
2712+
if pad > 0 then
2713+
f, c = 0.5 + math.max(math.floor(p1 - 0.5), 0),
2714+
0.5 + math.ceil(p1 - 0.5);
2715+
else f, c = math.max(math.floor(p1), 1), math.ceil(p1) end
2716+
p1 = p1 * p1 < f * c and f or c; -- i.e. p1 / f < c / p1.
27142717
p1 = p1 * mid / len;
27152718
end
27162719
end

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ AviUtl (無印) にあった「動画ファイル合成」と同等のことが
517517
- **v2.03 (for beta43b)** (2026-05-??)
518518

519519
- 「画像中間ループ」フィルタ効果で,サイズ指定が「境界不連続」のとき,タイル位置の基準を変更.初期値の 0 で中央タイルが中央をキープし続けるように.
520+
- 「画像中間ループ」フィルタ効果で,サイズ指定が「拡縮あり」のとき,タイル枚数の決定方法を変更.拡大率の対数基準で最も近いものを選ぶように.
520521

521522
- **v2.02 (for beta43b)** (2026-05-01)
522523

0 commit comments

Comments
 (0)