Skip to content

Commit 0a2b0b4

Browse files
authored
Fix multisegment SD resizing (#25)
Fix SD multisegment resizing where PointResize() was used all the time, rendering Lanczos4Resize() useless and certain video segments too sharp when resized.
1 parent d079895 commit 0a2b0b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

programs/functions.avsi

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ function AppendSegment(
1616
if (hd) {
1717
Eval(resizer + """Resize(sample.width, sample.height)""")
1818
} else {
19-
scaler = float(sample.height) / float(last.height)
20-
temp_width = float(last.width) * scaler
21-
PointResize(int(temp_width), sample.height)
19+
scaler = int(float(sample.height) / float(last.height))
20+
scaler = scaler < 1 ? 1 : scaler
21+
PointResize(last.width * scaler, last.height * scaler)
2222
Lanczos4Resize(sample.width, sample.height)
2323
}
2424

0 commit comments

Comments
 (0)