lvsfunc.recon

Chroma reconstruction functions and wrappers.

lvsfunc.recon.chroma_reconstruct(clip[, ...])

A function to demangle messed-up chroma, like for example chroma that was downscaled using Nearest Neighbour, or the chroma found on DVDs.

lvsfunc.recon.reconstruct_multi(c, r[, radius])

Tries to reconstruct regressed clips using a base video clip.

lvsfunc.recon.regress(x, *ys[, radius, eps])

Fit a line for every neighborhood of values of a given size in a clip with corresponding neighborhoods in one or more other clips.

lvsfunc.recon.chroma_reconstruct(clip, radius=2, i444=False)

A function to demangle messed-up chroma, like for example chroma that was downscaled using Nearest Neighbour, or the chroma found on DVDs. This function should be used with care, and not blindly applied to anything.

This function can also return a 4:4:4 clip. This is not recommended except for very specific cases, like for example where you’re dealing with a razor-sharp 1080p source with a lot of bright colours. Otherwise, have it return the 4:2:0 clip instead.

Original function by shane, modified by Ichunjo and LightArrowsEXE.

Aliases for this function are lvsfunc.demangle and lvsfunc.crecon.

Parameters
  • clip (VideoNode) – Input clip

  • radius (int) – Boxblur radius

  • i444 (bool) – Return a 4:4:4 clip

Return type

VideoNode

Returns

Clip with demangled chroma in either 4:2:0 or 4:4:4

lvsfunc.recon.reconstruct_multi(c, r, radius=2)

Tries to reconstruct regressed clips using a base video clip.

Parameters
  • c (VideoNode) – Original clip.

  • r (RegressClips) – Regressed clips.

  • radius (int) – Internal boxblur radii.

Return type

VideoNode

Returns

Fixed regressed clips.

lvsfunc.recon.regress(x, *ys, radius=2, eps=1e-07)

Fit a line for every neighborhood of values of a given size in a clip with corresponding neighborhoods in one or more other clips.

For more info see this Wikipedia article.

Return type

List[RegressClips]