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 25th March 2019, 01:47   #21  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
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.
Thats good to know


Quote:
Originally Posted by gugglu View Post
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)
Sorry can't help you with Expr()
But maybe this can help: https://github.com/darealshinji/vapo...o_alpha.py#L33
https://github.com/darealshinji/vapo...edarken.py#L19
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 25th March 2019, 03:15   #22  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
Quote:
Originally Posted by gugglu View Post
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)
.
Code:
Code1:
s_str     = 1.2
s_reverse = s_str + 0.25
s_divisor = 1.5
s_indexR  = 1.281
sstring   = f"x 128 - abs {s_divisor} / {1 / s_indexR} pow {s_str} * x 128 - dup abs 0.001 + / * x 128 - 2 pow dup {s_reverse} + / * 128 +"
last = core.std.Expr(last, sstring if last.format.color_family == vs.GRAY else [sstring, ""])

code 2:
sstring = "x 128 - abs y 128 - abs < x y ?"
last = core.std.Expr([clip1, clip2], sstring if clip1.format.color_family == vs.GRAY else [sstring, ""])

code 3:
sstring = "x y = 0 255 ?"
last = core.std.Expr([clip1, clip2], sstring if clip1.format.color_family == vs.GRAY else [sstring, ""])
WolframRhodium is offline   Reply With Quote
Old 26th March 2019, 12:42   #23  |  Link
gugglu
Registered User
 
Join Date: Jul 2012
Location: Nottingham
Posts: 44
Quote:
Originally Posted by ChaosKing View Post
Hi C.K thats alright sarge thanks anyway, tho I really appreciated all your help from the beginning. :respect:


Quote:
Originally Posted by WolframRhodium View Post
Code:
Code1:
s_str     = 1.2
s_reverse = s_str + 0.25
s_divisor = 1.5
s_indexR  = 1.281
sstring   = f"x 128 - abs {s_divisor} / {1 / s_indexR} pow {s_str} * x 128 - dup abs 0.001 + / * x 128 - 2 pow dup {s_reverse} + / * 128 +"
last = core.std.Expr(last, sstring if last.format.color_family == vs.GRAY else [sstring, ""])

code 2:
sstring = "x 128 - abs y 128 - abs < x y ?"
last = core.std.Expr([clip1, clip2], sstring if clip1.format.color_family == vs.GRAY else [sstring, ""])

code 3:
sstring = "x y = 0 255 ?"
last = core.std.Expr([clip1, clip2], sstring if clip1.format.color_family == vs.GRAY else [sstring, ""])
Awesome WolframRhodium, thanks for your visit. that formula looks great will give it go soon as i get some time to get on my computer, really Doom9 is full of great intelligent guys and i am glad to be part of it .
gugglu 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:49.


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