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
#3
A.I. is saying the script hybrid generates has errors so I would appreciate help inserting the script properly (or confirming).
Care to elaborate? Without you showing the complete code Hybrid uses, I guess your code generator messed up.

Looking at your code:
(I assume this should do some strange 4:1:1 to 4:4:4 upsampling.)
def beforeDeinterlace(clip):
  # Separate planes; Personally I would use https://www.vapoursynth.com/doc/functions/video/splitplanes.html here
  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; No clue why this is used (https://www.vapoursynth.com/doc/functions/video/selectevery.html). It does not make sense to me. I assume the intention was to do something like a SeparateFields ?
  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; That seems fine. https://www.vapoursynth.com/doc/functions/video/resize.html
  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;  That seems fine
  return core.std.ShufflePlanes([y, u_interp, v_interp], [0, 0, 0], vs.YUV)
(Side note: Indentions are important in Python, so best use 'code'-tags when posting code.)
Assuming the syntax is correct, you need to let Hybrid know that after it the output is YUV444P8, by adding:
# colorformat YUV444P8
to the code, otherwise Hybrid wouldn't know that the color format changed to YUV444P8.
=> the whole code seems wrong to me

Cu Selur

Ps.: Machine learning models are not that good atm. with code generation of anything slightly complex. Especially when not provided with all the necessary information. If you can share a sample of the unprocessed source you feed Hybrid and properly explain what you aim to do, I probably could add a suggestion on what to do.
----
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 - Yesterday, 05:31

Forum Jump:


Users browsing this thread: 1 Guest(s)