Bifrost

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m
m (Types of Rainbows)
Line 47: Line 47:
 
When dealing with telecined material you must determine if the rainbows were added before or after the telecine process. Find a scene with clearly visible rainbows and use the following:
 
When dealing with telecined material you must determine if the rainbows were added before or after the telecine process. Find a scene with clearly visible rainbows and use the following:
 
<br>
 
<br>
   MPEG2Source("YourSource.d2v")
+
   [[DGDecode|MPEG2Source]]("YourSource.d2v")
 
   SeparateFields()
 
   SeparateFields()
 
   SelectEven()
 
   SelectEven()
Line 55: Line 55:
 
====Rainbows added before telecine====
 
====Rainbows added before telecine====
 
First you must fix the telecine, then use Bifrost in progressive mode:
 
First you must fix the telecine, then use Bifrost in progressive mode:
  MPEG2Source("rainbows1.d2v")
+
  [[DGDecode|MPEG2Source]]("rainbows1.d2v")
 
  TFM(order=1)
 
  TFM(order=1)
 
  TDecimate()
 
  TDecimate()
Line 62: Line 62:
 
====Rainbows added after telecine====
 
====Rainbows added after telecine====
 
In this case, Bifrost should be used in interlaced mode, right after the source filter:
 
In this case, Bifrost should be used in interlaced mode, right after the source filter:
  MPEG2Source("rainbows2.d2v")
+
  [[DGDecode|MPEG2Source]]("rainbows2.d2v")
 
  Bifrost(interlaced=true)
 
  Bifrost(interlaced=true)
 
  # IVTC here
 
  # IVTC here
 
<br>
 
<br>
 +
 
== Changelog ==
 
== Changelog ==
 
   Version 2.0
 
   Version 2.0

Revision as of 18:38, 28 November 2013

Abstract
Author Myrsloik, dubhater [v2.0]
Version v2.0
Download Bifrost
Category Rainbow & Dot Crawl Removal
Requirements
  • YV12
License
Discussion


Contents

Description

Bifrost is a temporal derainbowing filter created by Fredrik Mellbin. The original Bifrost v1.1 worked on the whole frame or not at all.
This version now works on blocks, making it possible to process static rainbows even if there is lots of motion in other parts of the image.

Requirements:

- AviSynth 2.5.8 or later
- Supported color formats: YV12


Syntax and Parameters

Bifrost (clip, clip "altclip", float "luma_thresh", int "variation", bool "conservative_mask", bool "interlaced", int "blockx", int "blocky")


altclip clip =
Bifrost will copy from this clip the chroma of the blocks it can't process. This allows moving blocks to be processed with some other filter.
altclip must have the same format, dimensions, and length as the input clip.


luma_thresh float = 10.0
Blocks where the luma changes less than this are considered static and may be processed.


variation int = 5
Controls how big a chroma change must be in order to be considered a rainbow. Increasing this can reduce false positives.


conservative_mask bool = false
If true, only pixels detected as rainbows will be processed. Otherwise, pixels that have rainbows above and below them will also be processed.


interlaced bool = true
If true, SeparateFields and Weave will be invoked in order to process the top and bottom fields separately.


blockx int = 4
blocky int = 4
The dimensions of the blocks. Smaller is probably better. The default 4×4 should be good enough.
Note: If the dimensions of the image aren't divisible by blockx and blocky, the right and/or bottom edges won't be processed. Pad or crop the input clip before using Bifrost.


Types of Rainbows

When dealing with telecined material you must determine if the rainbows were added before or after the telecine process. Find a scene with clearly visible rainbows and use the following:

 MPEG2Source("YourSource.d2v")
 SeparateFields()
 SelectEven()

If the rainbows change every frame, they were added after telecine. If there is a duplicate every five frames, they were added before.

Rainbows added before telecine

First you must fix the telecine, then use Bifrost in progressive mode:

MPEG2Source("rainbows1.d2v")
TFM(order=1)
TDecimate()
Bifrost(interlaced=false)


Rainbows added after telecine

In this case, Bifrost should be used in interlaced mode, right after the source filter:

MPEG2Source("rainbows2.d2v")
Bifrost(interlaced=true)
# IVTC here


Changelog

  Version 2.0
     - This version now works by processing blocks rather than whole frames. Static rainbows can now be processed even if there is lots of motion in other parts of the image.
     - The "scenelumathresh" parameter was renamed to "luma_thresh" and it's default value is now 10.0
     - The "conservativemask" parameter was renamed to "conservative_mask".
Version 1.1 - Corrected several bad assumptions about pitch and no longer requests frames out of range which makes it compatible with avisynth 2.5.7. - Uses the whole image and not just the upper half to determine if there is too much motion, this reduces artifacts greatly in certain clips but the scenelumathresh argument now has to be twice as big as in previous versions for the same effect. - Processes the image borders properly instead of just ignoring them. - Can look two frames in either direction instead of just one frame in both. This makes it possible to remove rainbows in frames right before and after scenechanges.


Links


Bifrost v1.1

Bifrost v1.1 documentation.



Back to External Filters


Personal tools