• 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 美元短线拉升 随后回吐涨幅 2019-03-07
  • 朔州市人大常委会任免名单 2019-03-05
  • “创新从来都是九死一生”(人民论坛) 2019-02-14
  • 端午假期广州铁路运客640.5万人次 创历史新高 2019-02-14
  • 19次生态输水让塔河下游生机勃勃 2018-11-22
  • 男篮再胜伊朗迎热身赛两连胜 任骏飞19+11陶汉林18分 2018-11-22
  • 小卒子,你南街村的代言人啊?扮豬不咋像呢!你滴,大大滴,明白? 2018-11-22
  • 女性之声——全国妇联 2018-11-21
  • 新华网评:凝聚打赢脱贫攻坚战的强大合力 2018-11-21
  • 栗战书:执法检查要直面问题不搞评功摆好 让法律制度成为不可触碰的高压线 2018-11-21
  • Welcome to

    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 8th March 2019, 23:44   #1  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    how to filter video in 16bit and dither?

    hi there folks , i am having a problem with dark scene in video , i tried GradFun3 / Fag3kdb / mf3kdb / f3kdb i don't know much filtering in Vapoursynth so if someone would be kind enough to help me out with improving my script for the correct result would be so much appreciated .

    Vapoursynth current script:
    Code:
    import vapoursynth as vs
    import muvsfunc as muf
    import havsfunc as hvf
    core = vs.core
    
    clip = core.d2v.Source(r'C:\Users\Kalik\Videos\vids\VTS_02_1.VOB.d2v')
    
    clip = core.vivtc.VFM(clip,mode=5,order=1).vivtc.VDecimate()
    
    clip = core.std.Trim(clip,29341,31200)
    
    res  = core.fmtc.resample (clip, w=720, h=480)
    
    deg = hvf.SMDegrain(res,tr=3,blksize=8,overlap=4,prefilter=4,RefineMotion=True,chroma=True)
    
    dbd = core.f3kdb.Deband(deg,preset='veryhigh', dither_algo=3, output_depth=16)
    
    sse = muf.SeeSaw(res,dbd)
    
    clip = core.fmtc.bitdepth (clip=sse, bits=10)
    
    clip.set_output ()
    any help would be helpful ans much appreciated.

    Last edited by gugglu; 16th March 2019 at 17:01. Reason: removed unnecessary avs script
    gugglu is offline   Reply With Quote
    Old 9th March 2019, 00:40   #2  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    You could put a clip = mvf.Depth(clip, 16) after your trim so everything after this will be filtered in 16bit.
    Don't forget a import mvsfunc as mvf
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 9th March 2019, 11:50   #3  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    You could put a clip = mvf.Depth(clip, 16) after your trim so everything after this will be filtered in 16bit.
    Don't forget a import mvsfunc as mvf
    Hi C.K thanks for showing up mate. i am going to do some test today and will be back soon after i doing some practice and test. tho i am newbie nob in Vapoursynth but i will try my best to learn. thanks again C.K,good day sarge.
    gugglu is offline   Reply With Quote
    Old 9th March 2019, 11:57   #4  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    How about like this?
    Code:
    import vapoursynth as vs
    import muvsfunc as muf
    import havsfunc as hvf
    import mvsfunc as mvf
    core = vs.core
    
    clip = core.d2v.Source(r'C:\Users\Kalik\Videos\vids\VTS_02_1.VOB.d2v')
    
    clip = core.vivtc.VFM(clip,mode=5,order=1).vivtc.VDecimate()
    clip = core.std.Trim(clip,29341,31200)
    clip = mvf.Depth(clip, 16) # we want to filter in 16 bit
    
    
    deg = hvf.SMDegrain(clip,tr=3,blksize=8,overlap=4,prefilter=4,RefineMotion=True,chroma=True)
    sse = muf.SeeSaw(res,deg )
    clip  = core.fmtc.resample (sse , w=720, h=480)# I would resize after denoising etc.
    clip = core.f3kdb.Deband(clip ,preset='veryhigh', dither_algo=3, output_depth=10) # final output in 10bit
    
    clip.set_output()
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 9th March 2019, 13:21   #5  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    How about like this?
    Code:
    import vapoursynth as vs
    import muvsfunc as muf
    import havsfunc as hvf
    import mvsfunc as mvf
    core = vs.core
    
    clip = core.d2v.Source(r'C:\Users\Kalik\Videos\vids\VTS_02_1.VOB.d2v')
    
    clip = core.vivtc.VFM(clip,mode=5,order=1).vivtc.VDecimate()
    clip = core.std.Trim(clip,29341,31200)
    clip = mvf.Depth(clip, 16) # we want to filter in 16 bit
    
    
    deg = hvf.SMDegrain(clip,tr=3,blksize=8,overlap=4,prefilter=4,RefineMotion=True,chroma=True)
    sse = muf.SeeSaw(res,deg )
    clip  = core.fmtc.resample (sse , w=720, h=480)# I would resize after denoising etc.
    clip = core.f3kdb.Deband(clip ,preset='veryhigh', dither_algo=3, output_depth=10) # final output in 10bit
    
    clip.set_output()
    hi C.K thanks for your time man, example script is looking good ,going to test it will be back in a short while.
    gugglu is offline   Reply With Quote
    Old 10th March 2019, 04:11   #6  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Hello C.K, after doing some practicing i found the script is working as i except but had to seesaw to lower it effect. here is a encoded clip, i am leaving a link please have a look pls, thank you for the help , very much appreciated C.K.

    used x265-10bit crf 18 for testing some small BD_1080p clip
    https://mega.nz/#!zyoFECqL!WfkbhGCVJ...j83FRyadOABJGw

    sorry man can you help me start this function so i can try it and see it effect, i was getting an error
    Code:
    kagefunc.adaptive_grain(clip,strength=0.30)
    
    Traceback (most recent call last):
    File "src\cython\vapoursynth.pyx", line 1927, in vapoursynth.vpy_evaluateScript
    File "src\cython\vapoursynth.pyx", line 1928, in vapoursynth.vpy_evaluateScript
    File "", line 19, in 
    File "C:\Users\Kalik\Pictures\VapourSynth64Portable\Scripts\kagefunc.py", line 173, in adaptive_grain
    for y in np.arange(0, 1, 0.001):
    AttributeError: module 'numpy' has no attribute 'arange'
    gugglu is offline   Reply With Quote
    Old 10th March 2019, 11:26   #7  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    Is numpy installed? And how did you install it?
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 10th March 2019, 11:52   #8  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    Is numpy installed? And how did you install it?
    Hi C.K,
    Sorry mate, numpy is not installed [i just got your Vapoursynth FATPACK]. how to install it any clue? do i have to install python before installing numpy?
    gugglu is offline   Reply With Quote
    Old 10th March 2019, 12:52   #9  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    Is numpy installed? And how did you install it?
    just installed numpy scipy matplotlib and copied those numpy folder from "C:\Users\kalki\AppData\Roaming\Python\Python37\site-packages" to your Vapoursynth FATPACK location "C:\Users\Kalik\Desktop\VapourSynth64Portable\VapourSynth64\Lib\site-packages"

    and it is working flawlessly now. Btw how was that encoded video good or bad ?
    gugglu is offline   Reply With Quote
    Old 10th March 2019, 14:49   #10  |  Link
    Registered User
     
    Join Date: May 2015
    Posts: 11
    Quote:
    Originally Posted by ChaosKing View Post
    Is numpy installed? And how did you install it?
    where to get numpy scripts? iam getting errors cause of it
    bin.n2f is offline   Reply With Quote
    Old 10th March 2019, 15:54   #11  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    You can install it via pip: python.exe -m pip install numpy
    (make sure you are in the correct dir)

    Or wait a bit. I will release propably today a new version of the vs portable fatpack with numpy.

    @gugglu the encode looks good to me.
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 10th March 2019, 16:35   #12  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    You can install it via pip: python.exe -m pip install numpy
    (make sure you are in the correct dir)

    Or wait a bit. I will release propably today a new version of the vs portable fatpack with numpy.

    @gugglu the encode looks good to me.
    thank you C.K, i think i can encode that video really thank you very much for correcting the script and special thanks for the Vapoursynth FATPACK wonderful work man. Awesome idea that would be great if u add numpy to it so no need to install it when it comes with your [/b]Vapoursynth FATPACK[/b].
    actually i installed numpy using pip on my laptop and it worked . here is what i did cmd

    Code:
    C:\Users\Kalik\AppData\Local\Programs\Python\Python37\Scripts>cmd
    Microsoft Windows [Version 10.0.17763.316]
    (c) 2018 Microsoft Corporation. All rights reserved.
    
    C:\Users\Kalik\AppData\Local\Programs\Python\Python37\Scripts>pip install numpy
    Requirement already satisfied: numpy in c:\users\kalik\appdata\roaming\python\python37\site-packages (1.16.2)
    You are using pip version 10.0.1, however version 19.0.3 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
    C:\Users\Kalik\AppData\Local\Programs\Python\Python37\Scripts>pip install scipy
    Requirement already satisfied: scipy in c:\users\kalik\appdata\roaming\python\python37\site-packages (1.2.1)
    Requirement already satisfied: numpy>=1.8.2 in c:\users\kalik\appdata\roaming\python\python37\site-packages (from scipy) (1.16.2)
    You are using pip version 10.0.1, however version 19.0.3 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
    C:\Users\Kalik\AppData\Local\Programs\Python\Python37\Scripts>pip install matplotlib
    Requirement already satisfied: matplotlib in c:\users\kalik\appdata\roaming\python\python37\site-packages (3.0.3)
    Requirement already satisfied: numpy>=1.10.0 in c:\users\kalik\appdata\roaming\python\python37\site-packages (from matplotlib) (1.16.2)
    Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\kalik\appdata\roaming\python\python37\site-packages (from matplotlib) (1.0.1)
    Requirement already satisfied: cycler>=0.10 in c:\users\kalik\appdata\roaming\python\python37\site-packages (from matplotlib) (0.10.0)
    Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\kalik\appdata\roaming\python\python37\site-packages (from matplotlib) (2.3.1)
    Requirement already satisfied: python-dateutil>=2.1 in c:\users\kalik\appdata\roaming\python\python37\site-packages (from matplotlib) (2.8.0)
    Requirement already satisfied: setuptools in c:\users\kalik\appdata\local\programs\python\python37\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.0.1)
    Requirement already satisfied: six in c:\users\kalik\appdata\roaming\python\python37\site-packages (from cycler>=0.10->matplotlib) (1.12.0)
    You are using pip version 10.0.1, however version 19.0.3 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
    Blue = installing cmd
    Red = folder i copied to VS.FATPACK
    green = i didn't copied them VS.FATPACK


    but hold on when i tried same way on my desktop pc it didn't worked i have had to copy the vapoursynth FATPACK and the C:\Users\Kalik\AppData\Roaming\Python and paste it to same location on desktop, then it worked, but i am not that good i can caught the pulse which got rid of the error but it was so much confusing man i never used python before, just today after reading your post when you said have you installed numpy encouraged me to read about numpy i was thinking u were talking muvsfunc_numpy but when i googled it made me laugh when i found it is not a script it is kind a package need to be install via python then i started digging deep into.

    and one last thing if you can i would like to use SMDegrain(clip,mfilter=?) i tried writing one in avisynth but i never had someone to help me with the code now as we got the same option in VapourSynth can you pls type me something which will be suitable for mfilter in SMDegrain
    gugglu is offline   Reply With Quote
    Old 10th March 2019, 18:27   #13  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    I never used mfilter but here's an example //www.zs-x.com/showthread.p...53#post1727653
    (search for mfilter) //avisynth.nl/index.php/SMDegra...to-run_Samples
    Quote:
    Motion Filter, an optional user-supplied clip that will be passed through those areas where SMDegrain() couldn't find a matching block, normally high motion areas. One use for it would be to to use spatial filters, like deblockers or blurring filters that mimic motion blur.
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 15th March 2019, 13:32   #14  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    I never used mfilter but here's an example //www.zs-x.com/showthread.p...53#post1727653
    (search for mfilter) //avisynth.nl/index.php/SMDegra...to-run_Samples
    Hi C.K ,thanks for pointing that out my friend i will look into it.
    btw result with your are better than what i was doing earlier, but banding problem still exist i don't know what is happening in Vapoursynth hood. i used your script but banding is not going away and i am not happy with the result i get(maybe this don't sound good to users but i m having a weird problem i want to solve), i like to improve the script for removing noise & color banding.

    like this thread >//www.zs-x.com/showthread.p...59#post1386559


    here is a script from u i used to encode
    Code:
    import vapoursynth as vs
    
    import muvsfunc as muf
    import havsfunc as hvf
    import mvsfunc as mvf
    
           core = vs.core
    
    clip = core.lsmas.LWLibavSource(r'C:\Users\Kalik\Videos\BluRay_DVD.d2v')
    clip = core.std.Crop(clip, 0,0,136,136)
    bit  = mvf.Depth(clip, 16) # we want to filter in 16 bit
    deg  = hvf.SMDegrain(bit, tr=3,blksize=16,overlap=8,prefilter=4,RefineMotion=True,chroma=True,Str=1.06,Amp=0.0625)
    sse  = muf.SeeSaw(bit,deg, Sstr=1.35,ssx=1.25,ssy=1.25 )
    res  = core.fmtc.resample(sse, w=1920, h=808)# I would resize after denoising etc.
    deb  = core.f3kdb.Deband(res, keep_tv_range=True, preset='veryhigh', dither_algo=3, output_depth=10) # final output in 10bit
    
           deb.set_output()
    here is encoded sample:
    https://mega.nz/#!i6wS3AjA!L-NxgJ0XY...4g1NtoUG7NSn1M
    https://mega.nz/#!TzogEYBb!HJusUBu1k...uGY4ioTeAfmML8
    https://mega.nz/#!3rhU0KAA!hAdx56PSF...8oJEVcoLXdj7e0

    here is scrn.shot of problem below

    https://lookimg.com/image/jMlEr
    https://lookimg.com/image/jMXxW
    https://lookimg.com/image/jMjMh
    https://lookimg.com/image/jMCPj
    https://lookimg.com/image/jMWho

    please if you can help C.K,here are some sample from untouched BluRay
    https://mega.nz/#!vmoSUI6L!GKGlD2fEa...qYYfRgNeCWQsWE
    https://mega.nz/#!nroGSSrD!R8dOl0C_5...XHSXnQ_iEmjczw
    https://mega.nz/#!77p0hIYI!ic_t32z5T...9oHt7B6NaMyD5U

    for the new VapourSynth FATPACK, wonderful work C.K

    Last edited by gugglu; 15th March 2019 at 13:37. Reason: forgot to mentioned C.K a thx 4 de new VS.FATPACK
    gugglu is offline   Reply With Quote
    Old 16th March 2019, 22:08   #15  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    The banding seems to appear mostly after the encode.
    You have a couple of options:
    - dither_algo=2 seems to help a bit.
    - higher --aq-strength and/or psy-rd values (I tried this --crf 18 --preset medium --tune grain --aq-mode 3 --aq-strength 1.8 --output-depth 10 --no-strong-intra-smoothing --no-sao)
    - Higher grain/debanding for specific scenes: example for the Sun opening

    Code:
    import fvsfunc as fvf
    deb_strong  = core.f3kdb.Deband(res, keep_tv_range=True, range=20,  y=110, cb=150, cr=150, grainy=110, preset='veryhigh', dither_algo=3, output_depth=10)
    deb  = core.f3kdb.Deband(res, keep_tv_range=True, preset='veryhigh', dither_algo=3, output_depth=10) # final output in 10bit
    deb = fvf.ReplaceFrames(deb, deb_strong, mappings="[0 380]")  # mappings="[startframe1 endframe1][start2 end2][etc...]"
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 17th March 2019, 15:44   #16  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    The banding seems to appear mostly after the encode.
    You have a couple of options:
    - dither_algo=2 seems to help a bit.
    - higher --aq-strength and/or psy-rd values (I tried this --crf 18 --preset medium --tune grain --aq-mode 3 --aq-strength 1.8 --output-depth 10 --no-strong-intra-smoothing --no-sao)
    - Higher grain/debanding for specific scenes: example for the Sun opening

    Code:
    import fvsfunc as fvf
    deb_strong  = core.f3kdb.Deband(res, keep_tv_range=True, range=20,  y=110, cb=150, cr=150, grainy=110, preset='veryhigh', dither_algo=3, output_depth=10)
    deb  = core.f3kdb.Deband(res, keep_tv_range=True, preset='veryhigh', dither_algo=3, output_depth=10) # final output in 10bit
    deb = fvf.ReplaceFrames(deb, deb_strong, mappings="[0 380]")  # mappings="[startframe1 endframe1][start2 end2][etc...]"
    Hi C.K thanks for the idea will give it a go , but i think the problem is related to BitDepth Conversation in my script thats needs to be correcting as well i think i may have to remove minblur and masktools diff stuff from the script, here is another approach tried lowering the banding i've putt on to the scrn.shot comparison and i have modified the script as well but still not sure am i dithering it correctly or not but it does look slightly better then before take a look here C.K //screenshotcomparison.com/comparison/132267


    Code:
    import vapoursynth as vs
    
    import Dither   as dif
    import fvsfunc  as fvf
    import mvsfunc  as mvf
    import muvsfunc as muf
    import havsfunc as hvf
    import kagefunc as kgf
    
    core = vs.core
    core.max_cache_size=15360
    
    clip = core.lsmas.LWLibavSource(r'C:\Users\Kalik\Videos\BluRay_DVD.mkv.lwi)
    clip = core.std.Crop(clip, 0,0,136,136)
    
    bit  = fvf.Depth(clip, 16) # we want to filter in 16 bit
    mb   = hvf.Minblur(bit)
    mt   = core.avs.mt_adddiff(bit,core.avs.makediff(mb,core.rgvs.RemoveGrain(4)))
    
    deg  = hvf.SMDegrain(mt, blksize=16, overlap=8, prefilter=4, chroma=True)
    sse  = muf.SeeSaw(bit,deg,ssx=1.25,ssy=1.25 )
    deb  = GradFun3(sse,mode=3)
    
    dit  = mvf.Depth(deb,dither=3)#replaced from top to middle
    dif  = dif.limit_dif16(bit,dit,thr=1.00,elast=2.00)
     
    ref  = dif
    
    deb2 = dif.f3kdb.Deband(preset='veryhigh', keep_tv_range=True, range=18, grainy=0, grainc=0, dither_algo=2, output_depth=16)
    mask = kgf.retinex_edgemask(ref).std.Inflate()
    merg = core.std.MaskedMerge(out,ref,mask)
    adgr = kgf.adaptive_grain(merg,0.20)
    
    final = fvf.Depth(adgr,10)#Down to 10bit and Dither
    
    final.set_output()
    C.K pls check the script and see if it needs any sort a correction,i m still kind a learner.
    gugglu is offline   Reply With Quote
    Old 17th March 2019, 16:11   #17  |  Link
    Registered User
     
    Join Date: Dec 2005
    Location: Germany
    Posts: 686
    The encoding settings are also important. Psy and aq can also have a big effect on gradients and dark scenes.
    __________________
    Search and denoise
    ChaosKing is offline   Reply With Quote
    Old 19th March 2019, 04:48   #18  |  Link
    Pig on the wing
     
    Boulder's Avatar
     
    Join Date: Mar 2002
    Location: Hollola, Finland
    Posts: 4,513
    It would be better to feed the encoder with 16-bit data and let it dither down to the final bitdepth. From what I remember, x265 will internally work in 16 bits anyway.
    __________________
    And if the band you're in starts playing different tunes
    I'll see you on the dark side of the Moon...
    Boulder is offline   Reply With Quote
    Old 21st March 2019, 15:14   #19  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by ChaosKing View Post
    The encoding settings are also important. Psy and aq can also have a big effect on gradients and dark scenes.
    Thanks C.K this does improve things, much appreciate that. i don't use much of the cli option except these --level-idc 4.1 --me 3 --subme 3 --rd 3 --b-intra --weightb --aq-motion --no-strong-intra-smoothing --ref 4 --bframes 5 --rc-lookahead 80result looks nice to my eyes . Reason i used Uniformed --aq-mode 1 because there is a F3kdb in the script that does kind a same favor as aq-mode 3 Auto variance with bias to dark area also i used knlmeansCL as a prefilter in SMDegrain which also do the good job in dark area, result are nicer than before.


    Quote:
    Originally Posted by Boulder View Post
    It would be better to feed the encoder with 16-bit data and let it dither down to the final bitdepth. From what I remember, x265 will internally work in 16 bits anyway.
    Hi Boulder,
    thanks for the tip this also helped i removed a dither = fvf.Depth(final,10) and added this line to F3kdb output_depth
    input.format.bits_per_sample
    , as you said , i just fed the 16bit -data to x265 does the trick improved the dark areas scene.


    i need bit more help i don't know much of the Vapoursynth but i need help on syntax as you can see from my experience above (lol) i m not able to do it.

    Can someone please convert this lut formula for noise into Vapoursynth Format, bunch of thanks C.K 'and' Boulder
    Code:
    Code1:
    s_str     = 1.2
    s_reverse = s_str + 0.25
    s_divisor = 1.5
    s_indexR  = 1.281
    sstring   = "x 128 - abs "+String(s_divisor)+" / 1 "+String(s_indexR)+" / ^ "+String(s_str)+" * x 128 - x 128 - abs 0.001 + / * x 128 - 2 ^ x 128 - 2 ^ "+String(s_reverse)+" + / * 128 +"
    mt_lut(sstring, U=1, V=1)
    
    code 2:
    mt_lutxy(clip1, clip2, "x 128 - abs y 128 - abs < x y ?", U=1, V=1)
    
    code 3:
    mt_lutxy(clip1, clip2, "x y != 255 0 ?", U=1, V=1)
    .
    gugglu is offline   Reply With Quote
    Old 21st March 2019, 16:28   #20  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Nottingham
    Posts: 25
    Quote:
    Originally Posted by gugglu
    Can someone please convert this lut formula for noise into Vapoursynth Format, bunch of thanks C.K 'and' Boulder
    Code1:
    s_str = 1.2
    s_reverse = s_str + 0.25
    s_divisor = 1.5
    s_indexR = 1.281
    sstring = "x 128 - abs "+String(s_divisor)+" / 1 "+String(s_indexR)+" / ^ "+String(s_str)+" * x 128 - x 128 - abs 0.001 + / * x 128 - 2 ^ x 128 - 2 ^ "+String(s_reverse)+" + / * 128 +"
    mt_lut(sstring, U=1, V=1).
    Hi i tried myself a making things works so for i got below code to work in Vapoursynth but not sure tho is it correct or not please check and correct if needs to be.

    Code:
    s_str     = 1.2
    s_reverse = s_str + 0.25
    s_divisor = 1.5
    s_indexr  = 1.281
    sstring   = 'x 128 - abs '+'{s_divisor}'+' / 1 '+'{s_indexr}'+' / ^ '+'{s_str}'+' * x 128 - x 128 - abs 0.001 + / * x 128 - 2 ^ x 128 - 2 ^ '+'{s_reverse}'+' + / * 128 +'
    
    mt_lut(sstring, U=1, V=1)
    gugglu is offline   Reply With Quote
    Reply


    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 00:16.


    Powered by vBulletin® Version 3.8.11
    Copyright ©2000 - 2019, vBulletin Solutions Inc.
  • 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 美元短线拉升 随后回吐涨幅 2019-03-07
  • 朔州市人大常委会任免名单 2019-03-05
  • “创新从来都是九死一生”(人民论坛) 2019-02-14
  • 端午假期广州铁路运客640.5万人次 创历史新高 2019-02-14
  • 19次生态输水让塔河下游生机勃勃 2018-11-22
  • 男篮再胜伊朗迎热身赛两连胜 任骏飞19+11陶汉林18分 2018-11-22
  • 小卒子,你南街村的代言人啊?扮豬不咋像呢!你滴,大大滴,明白? 2018-11-22
  • 女性之声——全国妇联 2018-11-21
  • 新华网评:凝聚打赢脱贫攻坚战的强大合力 2018-11-21
  • 栗战书:执法检查要直面问题不搞评功摆好 让法律制度成为不可触碰的高压线 2018-11-21