Giter Club home page Giter Club logo

vapoursynth-ccd's Introduction

VapourSynth-CCD

Unoptimized port of CCD for VapourSynth

CCD - Camcorder Color Denoise - is an amazing VirtualDub filter made by Sergey Stolyarevsky (according to this Doom9 thread). It's a chroma denoiser that works great on old sources such as VHSes and DVDs.

This VS function tries to replicate what the original CCD plugin does.

Usage

ccd(clip,threshold=5,shownoise=False)

  • clip: The video is meant to be bt601 YUV format
  • threshold: [>=0] just use something between 3 and 15 and you will get reasonable results.
  • shownoise: if True, returns the removed chroma noise on a black luma clip instead of the filtered video.
  • output: bt601 YUV420P8 format

Vapoursynth Developers, please re-write this efficiently

Looking at the original CCD's source code, one can notice that the filter basically does a conditional convolution with 16 pixels (+ the center one) in a 25x25 matrix, like so:

conv matrix illustration

The condition is given by the threshold. If the Euclidian distance between the RGB values of the center pixel and a given pixel in the convolution matrix is less than the threshold, then this pixel is considered in the convolution/average. After the convolution, the videonode is converted back to YUV, and only the chroma channels are replaced by the convoluted clip, thus preserving luma information.

Even though this filter is very much usable, my programming skills are lacking to make this work as fast as the original one. I don't know how to do conditional convolutions in VS using its tools and I also don't know how to use Vapoursynth's C, C++ or Rust API to make an optimized version of this.

vapoursynth-ccd's People

Contributors

dombito avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vapoursynth-ccd's Issues

Vapoursynth C++ port

Just letting you know that I have now ported this function to a Vapoursynth plugin here. Your description of how the filter worked was especially useful in helping my understanding, thanks very much! I would like to add that description to the new repo, if that's okay with you? Cheers :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.