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 > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th June 2019, 20:26   #1  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 65
AVISynth minideen() x64 request

In order to use my preferred derainbowing method, using DFMDerainbow, I need an x64 version of deen(). A version of deen that only involves the "a2d" method used in DFMDerainbow was ported to VapourSynth and called minideen.

https://github.com/dubhater/vapoursynth-minideen

Is it too much to ask that this minideen be ported to AVISynth as a 64-bit filter? I'm sure it would be appreciated by others as well.
SaurusX is offline   Reply With Quote
Old 8th July 2019, 02:55   #2  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 528
https://down.7086.in/MiniDeen_r1.zip

Please try and let me know.

MiniDeen(radius=1, thrY=10, thrUV=12, y=3 or 2 or 1, u=3 or 2 or 1, v=3 or 2 or 1)

Source code: https://github.com/HomeOfAviSynthPlusEvolution/MiniDeen

Last edited by MeteorRain; 10th July 2019 at 22:13. Reason: +src
MeteorRain is offline   Reply With Quote
Old 9th July 2019, 03:28   #3  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 65
This works great! Thanks so much for going through the trouble. It seems to work just slightly better than DFMDerainbow with the original deen() if that makes sense.

I plugged minideen into the DFMDerainbow script by replacing the deen calls with minideen like so:

Code:
fixed_u=org_u.FluxSmoothST(17,14).FluxSmoothT(17).Deen("a2d",4,14,14).Blur(1.0)
fixed_v=org_v.FluxSmoothST(17,14).FluxSmoothT(17).Deen("a2d",4,14,14).Blur(1.0)
Code:
fixed_u=org_u.FluxSmoothST(17,14).FluxSmoothT(17).minideen(4,14,14).Blur(1.0)
fixed_v=org_v.FluxSmoothST(17,14).FluxSmoothT(17).minideen(4,14,14).Blur(1.0)
And now, I use DFMDerainbow with the masked and motion compensated routine from the MVTools guide like so:
Code:
prerb = last
derbmask = last.tedgemask(threshY=7).mt_deflate()
prefiltered = last.FFT3Dfilter(sigma=1.5,bw=16,bh=16,bt=3,ow=8,oh=8,plane=0)
derbsuperfilt = MSuper(prefiltered) # all levels for MAnalyse
derbsuper = MSuper(levels=1) # one level is enough for MCompensate
derbbackward_vectors = MAnalyse(derbsuperfilt, truemotion = true, isb = true, chroma=false)
derbforward_vectors = MAnalyse(derbsuperfilt, truemotion = true, isb = false, chroma=false)
# use not-prefiltered (super) clip for motion compensation
derbforward_compensation = MCompensate(derbsuper, derbforward_vectors)
derbbackward_compensation = MCompensate(derbsuper, derbbackward_vectors)
# create interleaved 3 frames sequences
interleave(derbforward_compensation,last,derbbackward_compensation)
dfmderainbow(maskthresh=8)
selectevery(3,1) # return filtered central (not-compensated) frames only
mt_merge(prerb,last, derbmask,luma=true)
And here are the results:

Routine without DFMDeRainbow and instead using old Derainbow(), notice the hand.


Rotuine with DFMDerainbow and x86 deen()


Routine with DFMDerainbow and new x64 minideen(). The same!


And here's another comparison with a closeup:

Original raw
x86 deen()
x64 minideen()

Last edited by SaurusX; 9th July 2019 at 15:20.
SaurusX is offline   Reply With Quote
Old 9th July 2019, 03:44   #4  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 528
You are very welcome.
The source code was very easy to work with, so it didn't take me long.
I'll organize the source code and put it onto GitHub soon.
MeteorRain is offline   Reply With Quote
Old 9th July 2019, 04:08   #5  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 528
On the other hand, You can use u=1, v=1 to skip processing the UV plane.
Or make use of plane processing and combine some operations, if possible.
MeteorRain is offline   Reply With Quote
Old 10th July 2019, 19:46   #6  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 65
Quote:
Originally Posted by MeteorRain View Post
On the other hand, You can use u=1, v=1 to skip processing the UV plane.
Or make use of plane processing and combine some operations, if possible.
I'm looking at this from the position of derainbowing. Don't we need to process chroma to handle the chroma cross-talk of the rainbows? And I don't know what you mean in your second statement. But anything to make DFMDerainbow more efficient or more effective would be welcome.
SaurusX is offline   Reply With Quote
Old 10th July 2019, 20:48   #7  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 528
fixed_u=org_u.FluxSmoothST(17,14).FluxSmoothT(17).minideen(4,14,14).Blur(1.0)
fixed_v=org_v.FluxSmoothST(17,14).FluxSmoothT(17).minideen(4,14,14).Blur(1.0)

You see, u and v were extracted from origin, so they only have Y channel valid.
By saying minideen(4,14,14) which implies processing all planes (including valid Y, garbage U, garbage V), you are wasting your precious time.

What I was saying, is either adding u=1, v=1 to skip processing the garbage UV plane, or,
maybe check if you can modify the whole DFMDerainbow script to process 3 channels in one shot.

I didn't look deep into it, so just my 2 cents.
MeteorRain is offline   Reply With Quote
Old 10th July 2019, 21:13   #8  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 65
Quote:
Originally Posted by MeteorRain View Post
What I was saying, is either adding u=1, v=1 to skip processing the garbage UV plane, or,
maybe check if you can modify the whole DFMDerainbow script to process 3 channels in one shot.

I didn't look deep into it, so just my 2 cents.
Ah! Reading the DFMDerainbow script I do see that fixed_u and fixed_v only have valid Y planes, so processing all three in minideen() is a waste of time. I'll add the u=1 and v=1 parameters to the call.
SaurusX is offline   Reply With Quote
Old 12th July 2019, 08:35   #9  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 874
@MeteorRain will you also make a release on https://github.com/HomeOfAviSynthPlusEvolution/MiniDeen ?
Delogohd and lsmash can now be installes via avsrepo. Would like to add MiniDeen as well ;-)
ChaosKing is offline   Reply With Quote
Old 12th July 2019, 16:31   #10  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 528
You got it.

Also your signature links are wrong.

Last edited by MeteorRain; 12th July 2019 at 16:33.
MeteorRain is offline   Reply With Quote
Old 16th July 2019, 19:56   #11  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 65
There is error "only 8..16 bit integer clips with constant format are supported." when color space is I420.

Edit: For example:
Code:
ffvideosource(8-bit.video)
minideen()

Last edited by StvG; Yesterday at 19:46. Reason: Edit:
StvG 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 05:00.


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