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. |
20th June 2021, 20:47 | #341 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Format() is AVS+ only I think, don't know from what version.
This is an HBD aware TV<->PC levels conversion function. link And here is an HBD aware Levels function. link They both require ExTools found in the repo. I'm in the middle of a rebase so I'm taking my time and preparing an elaborated post for possible solutions, so if something triggers an error let me know, or use an earlier version of ExTools (v1.6 or v1.7). EDIT: Oh by the way, this all to linearize an image/source right? I'm also in the middle of a refactor for Transforms Pack but the gamma function is very functional at this state. Pick the alpha and gamma value from this list.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 20th June 2021 at 20:51. |
20th June 2021, 22:55 | #343 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Good luck!
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
21st June 2021, 03:15 | #344 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Releasing FrameRateConvert v2.0-Beta, DLL only. Works in both VapourSynth and Avisynth.
- Ported to VapourSynth - Fixed a bug in StripeMask - StripeMask linear gamma correction is now more accurate - StripeMask now accounts for PC vs TV range - StripeMask: added fullRange parameter, set to True if input is in full range For VapourSynth, FMTC dll is required. For Avisynth, you can use the previous AVSI file and the StripeMask will have a few corrections. Note that StripeMask thr parameter default is now 28 instead of 26, and possibly could use further adjustment. |
21st June 2021, 08:31 | #346 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Thx for the port.
I see some warnings / problems in vsedit Code:
clip = core.frc.StripeMask(clip) Quote:
Code:
Error on frame 0 request: Resize error -1: invalid graph state L910: !m_state.has_chroma() || m_state.plan Code:
core.frc.ContinuousMask(clip, 24000, 1000) #crashes the editor Code:
Log shows this msg setVideoInfo: The frame rate specified by ContinuousMask must be a reduced fraction. (Instead, it is 24000/1000.)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
|
21st June 2021, 19:52 | #347 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Fixed most of those bugs.
Quote:
Code:
video = core.resize.Point(video, format=vs.GRAY16) video = core.fmtc.transfer(video, transs="709", transd="linear") video = core.resize.Point(video, format=vs.GRAY8) I released a new beta at the same link.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 21st June 2021 at 19:56. |
|
21st June 2021, 20:24 | #348 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Is 16bit int or 32bit float input supported? Output of ContinuousMask() looks strange with non 8bit input.
The parameter seems to be ConvertFpsLimit(clip, num, den, ratio) but I get this error msg when calling ConvertFpsLimit(clip, 24000, 1000, 1) Code:
vapoursynth.Error: ConvertFpsLimit: Can only set one of the following parameters: num/den (fraction), fps (float), preset (string) or match (clip).
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
21st June 2021, 20:51 | #349 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
ContinuousMask gives strange output on regular clips. It's meant to process masks. I didn't document it either -- don't remember what it did exactly :P Works in the context it's used for though. Gives same output as it did before in Avisynth.
Since I can't register ConvertFpsLimit several times like in Avisynth, the syntax is now Code:
"clip:clip;" "num:int:opt;" "den:int:opt;" "fps:float:opt;" "preset:data:opt;" "match:clip:opt;" "ratio:int:opt;"
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 21st June 2021 at 20:54. |
21st June 2021, 22:48 | #350 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Quote:
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
|
22nd June 2021, 03:47 | #351 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I'll answer like Microsoft. It's by design.
Just finished porting the first function. Only problem: GaussResize doesn't exist in VapourSynth. Also is BoxBlur equivalent to Avisynth Blur? I could use some help here Code:
import vapoursynth as vs core = vs.get_core() def frc_GaussianBlur42(input, var = None, rad = None, vvar = None, vrad = None, p = None): { if not isinstance(input, vs.VideoNode): raise vs.Error('frc_GaussianBlur42: input is not a clip') var = max(0.0, float(var or 1.0))) rad = max(1.0, float(rad or pow(var, 0.5))) var = pow(min(max(0.0, rad), 60.0), 1.9) ## arbitrary max radius = 60 vvar = max(0.0, float(vvar or var))) vrad = max(1.0, float(vrad or pow(vvar, 0.5))) vvar = pow(min(max(0.0, vrad), 60.0), 1.9) p = p or 19 w0 = input.width h0 = input.height w1 = round(w0/rad) h1 = round(h0/vrad) B = input.resize.Bilinear( \ min(max(4, w1 + (w1 % 2)), w0), \ min(max(4, h1 + (h1 % 2)), h0)) B = B.std.BoxBlur(hpasses=2, vpasses=2) if var < 0.01 and vvar < 0.01: return input elif B.Width > 8 and B.Height > 8): return B.std.GaussResize(w0, h0, p=p) ### NOT IN VAPOURSYNTH else: return B.std.Bilinear(w0, h0) }
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 22nd June 2021 at 14:01. |
22nd June 2021, 05:42 | #352 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,156
|
fmtconv have GaussResize
https://github.com/AkarinVS/fmtconv/...onv.html#L1080 |
22nd June 2021, 14:53 | #353 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Thanks. Another issue. I had already ported ConvertFps, but ChangeFps (no blending) doesn't exist in VapourSynth either. What's the best solution? It's actually used several times for masks.
Also to consider: what to do in case of variable framerate input? Finally... MaskTools2 hasn't been ported to VapourSynth??
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 22nd June 2021 at 15:33. |
22nd June 2021, 15:58 | #355 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,156
|
havsfunc have ChangeFPS: https://github.com/HomeOfVapourSynth...sfunc.py#L5353
|
22nd June 2021, 17:25 | #356 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,156
|
I think you need convert masktool2 from avisynth to internal functions of Vapoursynth. Here for example convert:
https://forum.doom9.org/showthread.php?p=1802951 |
22nd June 2021, 20:37 | #358 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
Not sure about mt_circle. Last edited by Reel.Deel; 22nd June 2021 at 20:39. |
|
22nd June 2021, 21:39 | #359 | Link | |
Registered User
Join Date: Jan 2018
Posts: 2,156
|
Quote:
|
|
22nd June 2021, 21:54 | #360 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Umm I guess ... You posted a link to another thread which has a script with all kinds of things that are mostly not relevant to the question that MysteryX asked ... but hey, it's nice to see you actually writing something instead of 'thanks' on every post Last edited by Reel.Deel; 22nd June 2021 at 21:56. |
|
|