Skip to content

HomeOfVapourSynthEvolution/nnedi3_resample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

nnedi3_resample

A VapourSynth script for easy resizing using nnedi3/znedi3/nnedi3cl with center alignment and correct chroma placement.

It can do scaling, color space conversion, etc.

Requirements

Installation

For Windows users, put nnedi3_resample.py into

  • VapourSynth installed for all users: <python folder>\Lib\site-packages
  • VapourSynth installed for current user: %AppData%\Python\Python<version>\site-packages

Tips

  1. Internally, nnedi3_resample always processes in 16-bit integer. The output format can be specified by csp with Format id (default is the same as input).
  2. To speed up the processing, it is recommended to input 16-bit clip to avoid internal depth conversions.
  3. To speed up the processing, it is recommended to input YUV rather than RGB, as processing UV planes are much faster when pscrn>0.

Example

Double the width and height of a clip.

Optional mode='nnedi3cl' to force using NNEDI3CL plugin.

import vapoursynth as vs
from vapoursynth import core
from nnedi3_resample import nnedi3_resample

clip = XXXSource()
clip = nnedi3_resample(clip, clip.width * 2, clip.height * 2, mode='nnedi3cl')

clip.set_output()

ChangeLog

  1. Add new option mode, default value is None, which will automatically choose the available plugin (from top to bottom priority):
    • znedi3, faster CPU implementation
    • nnedi3, original CPU implementation
    • nnedi3cl, OpenCL implementation, with a new option device to specify the desired device (refer to )
  2. Change how to import core because get_core is deprecated.
  3. Remove YCOCG and COMPAT, deprecated in VapourSynth API4.

About

Resizing using nnedi3/znedi3/nnedi3cl with center alignment and correct chroma placement

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages