NNEDI3 Functions

rvsfunc.NNEDI3.NNEDI3Base

Abstract Base Class for NNEDI3 wrappers.

rvsfunc.NNEDI3.NNEDI3

A wrapper for the nnedi3 plugin, also available as rvsfunc.nnedi3.

rvsfunc.NNEDI3.NNEDI3CL

A wrapper for the NNEDI3CL plugin, also available as rvsfunc.nnedi3cl.

rvsfunc.NNEDI3.ZNEDI3

A wrapper for the znedi3 plugin, also available as rvsfunc.znedi3.

class rvsfunc.NNEDI3.NNEDI3Base(shift=True, **nnedi_kwargs)

Abstract Base Class for NNEDI3 wrappers.

This is currently mainly in use for a modernized and properly functional version of nnedi3_rpow2, which is available as a classmethod for all of the implementing classes.

This is a generalized base class that aims to implement generic functions that can be performed with every NNEDI3 plugin. To define plugin-specific functionality and behavior, the implementing subclasses are used. Documentation in this class applies to all subclasses as well.

Parameters
  • shift (bool) – Whether or not to fix the chroma shift caused by the upsampling of subsampled chroma.

  • nnedi_kwargs (Any) – Additional kwargs to pass on to the NNEDI3 plugin.

abstract nnedi(clip, field, *args, **kwargs)

A simple wrapper function for calling a NNEDI3 implementation.

This abstractmethod and all concrete implementations only make the call to the NNEDI3 implementation a subclass wraps around. Any other logic being applied such as using NNEDI3 for AA must be a different function that calls this method instead of the actual plugin. *args should be blindly passed to the plugin and *kwargs should be used to update a predefined dict of defaults defined in the implementations of this method.

Parameters
  • clip (VideoNode) – The clip to call the NNEDI3 plugin with.

  • field (int) – The field parameter for NNEDI3.

Return type

VideoNode

double_size(clip, chroma=True, iterations=1)

nnedi3_rpow2, except not bad. This does the acual rpow2’ing.

Uses a much simpler API than the original that assumes kwargs were passed during instantiation of the class.

Parameters
  • clip (VideoNode) – The clip to grow by powers of two.

  • chroma (bool) – Whether or not to process chroma.

  • iterations (int) – How often to double frame sizes. This growth is exponential (2x, 4x, 8, …)

Return type

VideoNode

classmethod rpow2(clip, chroma=True, iterations=1, shift=True, **nnedi_kwargs)

nnedi3_rpow2 as a classmethod for easy use.

THIS FUNCTION IS NOT API-COMPATIBLE WITH 4re’s ``nnedi3_rpow2``! Having gotten that out of the way, the function signature is heavily simplified compared to the old one and so is the iterations argument that replaces the old rfactor.

Parameters
  • clip (VideoNode) – The clip to exponentially double in size.

  • chroma (bool) – Whether or not to process chroma.

  • iterations (int) – How often to double the clip’s sizes. This is exponential growth (2x, 4x, 8x, …)

  • shift (bool) – Whether or not to fix the chroma shift caused by upsampling video.

  • nnedi_kwargs (Any) – Additional kwargs to pass to NNEDI3. See the nnedi function for more information.

Return type

VideoNode