RgTools/Repair

From Avisynth wiki
Revision as of 05:39, 28 April 2020 by Pinterf (Talk | contribs)

Jump to: navigation, search

Back to RgTools

Contents

Description

Repairs unwanted artifacts from (but not limited to) RemoveGrain. Repair includes 27 modes: 1-28 except 25

Requirements


Syntax and Parameters

Repair (clip, clip, int "mode", int "modeU", int "modeV", bool "planar")


clip   =
Input clip to be repaired; usually the processed clip.


clip   =
input clip; known as the reference clip and it's usually the original unprocessed clip.


int  mode = 2
int  modeU = mode
int  modeV = modeU
Independently control the processing mode for each plane.
These modes are similar to the RemoveGrain modes but include the center pixel of the reference clip for min/max calculation.
  • -1 : Bypass - input plane is trashed thus faster than mode 1
  • 0 : Copy - input plane is left intact
  • 1 : Clips the source pixel with the Nth minimum and maximum found on the 3×3-pixel square from the reference clip.
  • 2 : Clips the source pixel with the Nth minimum and maximum found on the 3×3-pixel square from the reference clip. [Default]
  • 3 : Clips the source pixel with the Nth minimum and maximum found on the 3×3-pixel square from the reference clip.
  • 4 : Clips the source pixel with the Nth minimum and maximum found on the 3×3-pixel square from the reference clip.
  • 5 : Line-sensitive clipping giving the minimal change.
  • 6 : Line-sensitive clipping, intermediate.
  • 7 : Line-sensitive clipping, intermediate.
  • 8 : Line-sensitive clipping, intermediate.
  • 9 : Line-sensitive clipping on a line where the neighbor pixels are the closest.
  • 10 : Replaces the target pixel with the closest pixel from the 3×3-pixel reference square.
  • 11 : Same as modes 1–4 but uses min(Nth_min, c) and max(Nth_max, c) for the clipping, where c is the value of the center pixel of the reference clip.
  • 12 : Same as modes 1–4 but uses min(Nth_min, c) and max(Nth_max, c) for the clipping, where c is the value of the center pixel of the reference clip.
  • 13 : Same as modes 1–4 but uses min(Nth_min, c) and max(Nth_max, c) for the clipping, where c is the value of the center pixel of the reference clip.
  • 14 : Same as modes 1–4 but uses min(Nth_min, c) and max(Nth_max, c) for the clipping, where c is the value of the center pixel of the reference clip.
  • 15 : Clips the source pixels using a clipping pair from the RemoveGrain modes 5 and 6.
  • 16 : Clips the source pixels using a clipping pair from the RemoveGrain modes 5 and 6.
  • 17 : Clips the source pixels using a clipping pair from the RemoveGrain modes 17 and 18.
  • 18 : Clips the source pixels using a clipping pair from the RemoveGrain modes 17 and 18.
  • 19 :
  • 20 :
  • 21 :
  • 22 :
  • 23 :
  • 24 :
  • 25 : not available
  • 26 : Clips the source pixels using a clipping pair from the RemoveGrain mode 26.
  • 27 : Clips the source pixels using a clipping pair from the RemoveGrain mode 27.
  • 28 : Clips the source pixels using a clipping pair from the RemoveGrain mode 28.
By default if modeU is not set it defaults to the value of mode. If modeV is not set it defaults to the value of modeU


bool  planar = false
Parameter to keep compatibility with the original plugin; it's use is not recommended.
This allows to skip any colorspace checks whatsoever, making the filter always assume that planar input is passed.


Examples

Repair with default values:

Unprocessed = AviSource("Blah.avi")
Processed   = RemoveGrain(Unprocessed, mode=2, modeU=2, modeV=2, planar=false)
Repair(Processed, Unprocessed, mode=2, modeU=2, modeV=2, planar=false)




Back to RgTools

Personal tools