Dogway / Avisynth-Scripts

AviSynth+ 3.7.3+ Filters
GNU General Public License v3.0
85 stars 11 forks source link

deep_resize rotates clip when resizing from 720x480 to <902x480 #46

Closed Kogarou-san closed 2 years ago

Kogarou-san commented 2 years ago

This is an odd one, one of the last commits broke deep_resize in an unexpected way.

ColorBarsHD()
BicubicResize(720,480)

Correct output, 720x480

ColorBarsHD()
BicubicResize(720,480)
deep_resize(872,480)

Output flipped by -90º, 480x872

ColorBarsHD()
BicubicResize(720,480)
deep_resize(902,480)

Correct output, 902x480

While fiddling around with width numbers, I found out any target width of 902 and below would get the clip rotated: anything equal or above has normal behavior. I can't pinpoint what commit I was using before this behavior appeared, but I'm almost sure it wasn't happening in https://github.com/Dogway/Avisynth-Scripts/commit/361d4b3609e9da732248e3ec2cb059b308b9e383 .

Additionally, even tho ColorBarsHD creates a YUV444 clip, using

deep_resize(901, 480)

will throw an Expr error:

[avisynth @ 000001d6f98c9640] Expr: All inputs must have the same number of planes and the same dimensions, subsampling included
(C:/Program Files (x86)/AviSynth+/plugins64+/ExTools.avsi, line 94)
(C:/Program Files (x86)/AviSynth+/plugins64+/MasksPack.avsi, line 351)
(C:/Program Files (x86)/AviSynth+/plugins64+/ResizersPack.avsi, line 197)
(C:/Program Files (x86)/AviSynth+/plugins64+/ResizersPack.avsi, line 203)

Using commit https://github.com/Dogway/Avisynth-Scripts/commit/a25c6bb858f663eb1477dbc88c15790d548564ac (latest) with Avisynth+ 3.7.2 test 12 (latest)

Dogway commented 2 years ago

Thanks for the report. Hopefully resolved now in 6e45935efe98bfda61916cf0fde47e3b121b8cc0 You also need updated TransformsPack as I updated default 'mod' there.

Kogarou-san commented 2 years ago

Partially resolved, but seems to have introduced/revealed another bug:

ColorbarsHD
BicubicResize(720,480)
deep_resize(864, 480, edge="nnedi3")

flips the clip 90º, drops the chroma planes and stretches the resolution to 480x1440. This happens when Width<=900 in deep_resize

Dogway commented 2 years ago

Nice, you find good intricate examples. Test the fix: 9502f348ac29a8c0438b0eadf47ae4b2424a9522

Kogarou-san commented 2 years ago

Yep, it's fixed Cheers