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: 81
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: 871
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
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

Last edited by MeteorRain; 12th September 2019 at 01:34. Reason: remove dead links
MeteorRain is offline   Reply With Quote
Old 9th July 2019, 03:28   #3  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 81
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: 871
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.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 9th July 2019, 04:08   #5  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 871
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.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 10th July 2019, 19:46   #6  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 81
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: 871
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.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 10th July 2019, 21:13   #8  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 81
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: 1,318
@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 ;-)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is offline   Reply With Quote
Old 12th July 2019, 16:31   #10  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 871
You got it.

Also your signature links are wrong.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

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: 129
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; 17th July 2019 at 19:46. Reason: Edit:
StvG is offline   Reply With Quote
Old 27th August 2019, 06:55   #12  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 871
*Dead link removed*

Support I420 and also RGBPxx color format. Let me know how it works, and I'll make a tagged release if you are happy.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

Last edited by MeteorRain; 12th September 2019 at 01:35. Reason: remove dead links
MeteorRain is offline   Reply With Quote
Old 27th August 2019, 18:25   #13  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,788
original deen can work with 0-255 why minideen can't?


edit: and in avs 2.6 (test with SEt mt one) minideen(2, 5 , 2, 3, 1, 1)

it's important since I add it in DeHaloHmod https://forum.doom9.org/showthread.p...88#post1883288
__________________
See My Avisynth Stuff

Last edited by real.finder; 5th September 2019 at 10:28.
real.finder is offline   Reply With Quote
Old 5th September 2019, 15:22   #14  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,788
ok, Found this and know why, https://forum.doom9.org/showthread.p...98#post1846298 (but don't know why it's say 2 not 1 maybe because the video is yv12?)

maybe you can make it silently change u and v from 3 to 2 if it 0 (and ignore the Threshold if u and v not 3)

and still we have the avs 2.6 problem https://i.imgur.com/xXtw5f0.png
__________________
See My Avisynth Stuff

Last edited by real.finder; 5th September 2019 at 16:56.
real.finder is offline   Reply With Quote
Old 8th September 2019, 12:54   #15  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 740
Quote:
Originally Posted by real.finder View Post
original deen can work with 0-255 why minideen can't?


edit: and in avs 2.6 (test with SEt mt one) minideen(2, 5 , 2, 3, 1, 1)

it's important since I add it in DeHaloHmod https://forum.doom9.org/showthread.p...88#post1883288
A threshold of 1 would result in an average calculated only from identical pixels, for example (10 + 10 + 10 + 10) / 4 = 10. The result is no change to the image. A threshold of 0 would result in an average calculated only from one single pixel, for example 10 / 1 = 10. Again, the result is no change to the image.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 8th September 2019, 23:56   #16  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 871
Code:
# 5 = Avisynth      2.6.0 (SEt's multi-threaded build)
loadplugin("Release_r2\x86\minideen.dll")
colorbars()
converttoyv12
minideen(2, 5, 2, 3, 1, 1)
info
Gives me pretty correct result. Do you have other precondition to reproduce this behavior?

__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 9th September 2019, 00:18   #17  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,788
Quote:
Originally Posted by MeteorRain View Post
Code:
# 5 = Avisynth      2.6.0 (SEt's multi-threaded build)
loadplugin("Release_r2\x86\minideen.dll")
colorbars()
converttoyv12
minideen(2, 5, 2, 3, 1, 1)
info
Gives me pretty correct result. Do you have other precondition to reproduce this behavior?

Code:
# 5 = Avisynth      2.6.0 (SEt's multi-threaded build)
loadplugin("Release_r2\x86\minideen.dll")
colorbars()
converttoyv12
Spline36Resize(880,496) #or any resizer
minideen(2, 5, 2, 3, 1, 1)
info
or just colorbars(880,496) without any resizer
__________________
See My Avisynth Stuff

Last edited by real.finder; 9th September 2019 at 00:21.
real.finder is offline   Reply With Quote
Old 9th September 2019, 00:27   #18  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,788
Quote:
Originally Posted by jackoneill View Post
A threshold of 1 would result in an average calculated only from identical pixels, for example (10 + 10 + 10 + 10) / 4 = 10. The result is no change to the image. A threshold of 0 would result in an average calculated only from one single pixel, for example 10 / 1 = 10. Again, the result is no change to the image.
thanks for reply

then in this case isn't better to silently change u and v or even Y from 3 to 2 if the threshold is 0 or 1? and ignore the Threshold if u and v or even Y is not 3
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th September 2019, 02:02   #19  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 871
As I expected, memory alignment issue.

I can do threshold 0 1.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

Last edited by MeteorRain; 9th September 2019 at 02:09.
MeteorRain is offline   Reply With Quote
Old 9th September 2019, 02:57   #20  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 871
*Dead link removed* Please test and let me know.

Also r4 that changes SIMD logic a little bit.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median

Last edited by MeteorRain; 12th September 2019 at 01:35. Reason: remove dead links
MeteorRain 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 14:33.


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