Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th November 2013, 21:40   #1  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Bifrost 2000: improved derainbowing filter for VapourSynth and Avisynth

Code (and readme.rst): https://github.com/dubhater/vapoursynth-bifrost
DLLs: https://github.com/dubhater/vapoursy...frost/releases

For those who don't know Bifrost: http://check2pic.ru/compare/32560/

The original Bifrost sometimes creates undesirable artefacts:
http://www.abload.de/img/bifrost-off-on1qjzf.png
http://check2pic.ru/compare/32559/
http://imgur.com/a/fUpWO

This version mostly avoids those issues by processing blocks rather than whole frames. Another consequence is that static rainbows can be processed even if there is lots of motion in other parts of the image.

There are some differences:
- the "scenelumathresh" parameter is renamed to "luma_thresh" and its default value is higher
- the "conservativemask" parameter is renamed to "conservative_mask"

Thanks to Myrsloik for sharing the source code.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 16th November 2013, 21:46   #2  |  Link
mandarinka
Registered User
 
mandarinka's Avatar
 
Join Date: Jan 2007
Posts: 739
Yay! Bifrost was one of the better and still useful "old/simple" filters - if it was not for those demonstrated issues.
mandarinka is offline   Reply With Quote
Old 17th November 2013, 00:46   #3  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,207
I approve of the name. This way we can later sell an upgrade to Bifrost 3000.

Apparently the filter has more followers than I thought...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th November 2013, 03:44   #4  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 609
Check2pic links won't load for me. Isn't the imgur link just improperly treated interlaced YV12?

Using blocks seems like a great idea. What about fully pixel-adaptive?
ChiDragon is offline   Reply With Quote
Old 17th November 2013, 09:49   #5  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Quote:
Originally Posted by ChiDragon View Post
Check2pic links won't load for me. Isn't the imgur link just improperly treated interlaced YV12?

Using blocks seems like a great idea. What about fully pixel-adaptive?
check2pic.ru seems to be dead right now. Try later.

What do you mean by "fully pixel-adaptive"?
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 17th November 2013, 20:51   #6  |  Link
mandarinka
Registered User
 
mandarinka's Avatar
 
Join Date: Jan 2007
Posts: 739
Quote:
Originally Posted by ChiDragon View Post
Check2pic links won't load for me. Isn't the imgur link just improperly treated interlaced YV12?
Nope, it really did these things in some scenarios.

/BTW, Shouldn't this be posted in the general avisynth subforum, so that normal encoders notice the filter is out?/
mandarinka is offline   Reply With Quote
Old 17th November 2013, 22:57   #7  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 609
Quote:
Originally Posted by jackoneill View Post
What do you mean by "fully pixel-adaptive"?
Sorry, I've been reading too many docs on commercial comb filters. The original Bifrost must have been.
ChiDragon is offline   Reply With Quote
Old 18th November 2013, 18:46   #8  |  Link
mandarinka
Registered User
 
mandarinka's Avatar
 
Join Date: Jan 2007
Posts: 739
Nope, it made decisions whether to process or not on frame-basis only, according to jackoneill (hence those troubles).
mandarinka is offline   Reply With Quote
Old 18th November 2013, 18:48   #9  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,207
Quote:
Originally Posted by mandarinka View Post
Nope, it made decisions whether to process or not on frame-basis only, according to jackoneill (hence those troubles).
It actually decided per pixel what to process. But it was far too aggressive. It only selected which direction to blend with per frame.

Doing it the same decision per block is a much better idea.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th November 2013, 06:27   #10  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,175
@jackoneill
Thanks for the Bifrost update.

I've updated the Bifrost AviSynth wiki and have a question about the interlaced parameter.
Quote:
If true, SeparateFields, DoubleWeave and SelectEvery will be invoked....
I assume that only applies to VapourSynth, so for AviSynth should it be?
Quote:
If true, SeparateFields and Weave will be invoked....
Reel.Deel is offline   Reply With Quote
Old 19th November 2013, 09:47   #11  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Quote:
Originally Posted by Reel.Deel View Post
@jackoneill
Thanks for the Bifrost update.

I've updated the Bifrost AviSynth wiki and have a question about the interlaced parameter.

I assume that only applies to VapourSynth, so for AviSynth should it be?
That's right.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 1st December 2013, 19:16   #12  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
Thanks for updating this!

I was playing around with the settings and came across a situation where it crashes (for me) without fail! If I use bifrost(blocky=2) it crashes, but if I use bifrost(blockx=2) it works fine. Of course, if I mix blocky=2 in with any other setting it also crashes, so I believe the blocky code part may have a bug.
burfadel is offline   Reply With Quote
Old 1st December 2013, 21:16   #13  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Quote:
Originally Posted by burfadel View Post
Thanks for updating this!

I was playing around with the settings and came across a situation where it crashes (for me) without fail! If I use bifrost(blocky=2) it crashes, but if I use bifrost(blockx=2) it works fine. Of course, if I mix blocky=2 in with any other setting it also crashes, so I believe the blocky code part may have a bug.
Uh, yeah. It's too small. I'll have to add a check for that.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 2nd December 2013, 15:13   #14  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Quote:
Originally Posted by burfadel View Post
Thanks for updating this!

I was playing around with the settings and came across a situation where it crashes (for me) without fail! If I use bifrost(blocky=2) it crashes, but if I use bifrost(blockx=2) it works fine. Of course, if I mix blocky=2 in with any other setting it also crashes, so I believe the blocky code part may have a bug.
Version 2.1 fixes this. It's also a bit faster.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 2nd December 2013, 16:25   #15  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
Thanks Is there an Avisynth version of v2.1? There's only v2.1 for Vapoursynth on the website
burfadel is offline   Reply With Quote
Old 8th December 2013, 16:41   #16  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
So I take it there won't be an updated Avisynth version to v2.1?
burfadel is offline   Reply With Quote
Old 8th December 2013, 18:31   #17  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Maybe if other problems surface. I don't feel like touching the Avisynth part and Visual Studio just for this.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 9th December 2013, 13:42   #18  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
Ah ok! I was thinking of the performance improvements that was mentioned more than the block size. Were they substantial improvements, or just slight?
burfadel is offline   Reply With Quote
Old 10th December 2013, 18:26   #19  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Quote:
Originally Posted by burfadel View Post
Ah ok! I was thinking of the performance improvements that was mentioned more than the block size. Were they substantial improvements, or just slight?
Not very big.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 11th December 2013, 06:07   #20  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
Ah ok Fair enough then . Thanks!
burfadel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.