This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Reinterpolation411-style script insertion
#6
Quote: During my workflow I then ran across clips with vertical banding in source files and read a thread about reinterpolate411 and chroma cleanup. The common theme appears to be indoor lighting and maybe static shots inducing this effect.
If you can share said clip, I can take a look at it.

About your function:
Instead of:
# Separate planes
y = core.std.ShufflePlanes(clip, 0, vs.GRAY)
u = core.std.ShufflePlanes(clip, 1, vs.GRAY)
v = core.std.ShufflePlanes(clip, 2, vs.GRAY)

# Reduce to even columns
u_even = core.std.SelectEvery(u, cycle=2, offsets=[0])
v_even = core.std.SelectEvery(v, cycle=2, offsets=[0])

# Resize to full width via horizontal interpolation
u_interp = core.resize.Bicubic(u_even, width=clip.width, height=clip.height, src_left=0.25)
v_interp = core.resize.Bicubic(v_even, width=clip.width, height=clip.height, src_left=0.25)

# Merge back to YUV
return core.std.ShufflePlanes([y, u_interp, v_interp], [0, 0, 0], vs.YUV)
better use:
# colorformat YUV444P8

# Separate planes
[y, u, v] = core.std.SplitPlanes(clip)
# Reduce to even columns
u_even = core.std.SelectEvery(u, cycle=2, offsets=[0])
v_even = core.std.SelectEvery(v, cycle=2, offsets=[0])

# Resize to full width via horizontal interpolation
u_interp = core.resize.Bicubic(u_even, width=clip.width, height=clip.height, src_left=0.25)
v_interp = core.resize.Bicubic(v_even, width=clip.width, height=clip.height, src_left=0.25)

# Merge back to YUV
return core.std.ShufflePlanes([y, u_interp, v_interp], [0, 0, 0], vs.YUV)
But this only makes sense if in your source "the odd chroma pixels are duplicates" otherwise your chroma will be wrong.
Here's an example, where I took a normal 4:1:1 DV file and applied that code:https://imgsli.com/MzkwMjY2

=> You probably should not use this or similar code.

Reading http://avisynth.nl/index.php/ReInterpolate411 again, you might notice that this is not meant to be used on 4:1:1 content, but it is meant to be used on YUY2/YUV4:2:2 content where the 4:1:1 => 4:2:2 conversion was done improperly.
Side note: one could use ReInterpolate411.dll by switching to Avisynth 32bit (requires an addon) in Hybrid and then load and apply that filter in a custom script.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
RE: Reinterpolation411-style script insertion - by Selur - 18.06.2025, 15:34

Forum Jump:


Users browsing this thread: 1 Guest(s)