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. |
4th August 2022, 11:58 | #4741 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
It's the same for float.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
7th August 2022, 19:16 | #4742 | Link | |
Registered User
Join Date: Sep 2008
Posts: 365
|
Quote:
I tried to understand the code here: https://github.com/AviSynth/AviSynth...ters/color.cpp But can not figure out how the Lut/expression for off_v is built from those functions... I'm just trying to do the avisynth equivalent to "coloryuv(off_v=0.5)"
__________________
(i have a tendency to drunk post) |
|
7th August 2022, 20:22 | #4743 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
Code:
Expr(clip, ["", "", "x 0.5 +"])
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
7th August 2022, 21:29 | #4744 | Link | |
Registered User
Join Date: Sep 2008
Posts: 365
|
Quote:
That only works for 8bit though, I guess ColorYUV scales input values internally... So what is the math to convert 8bit Expr to 16bit? Edit: nevermind, found a helper function for scaling values between bitdepths: https://github.com/Irrational-Encodi...l/info.py#L129
__________________
(i have a tendency to drunk post) Last edited by mastrboy; 7th August 2022 at 23:00. |
|
15th September 2022, 15:19 | #4745 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
R60 is released.
Quote:
Thanks! Cu Selur |
|
18th September 2022, 12:26 | #4747 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
What do you mean by "valid"? If you get an input clip that's variable format it'll always be valid. If a filter returns a frame that doesn't fit the description things will error out.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
29th September 2022, 12:48 | #4749 | Link |
Registered User
Join Date: Aug 2021
Posts: 73
|
In the C headers of API 3, VideoFormat is provided as a pointer in VSVideoInfo, effectively preventing me from creating a var format clip in a filter. Since API 4 it has been changed in the C header, but in python it remains to be None when the clip format is variable. Do you have any plan to also change in python?
|
1st October 2022, 18:29 | #4750 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
24th October 2022, 11:12 | #4751 | Link |
Registered User
Join Date: Nov 2017
Posts: 8
|
Hello there,
As with any new Ubuntu release, I compile VapouSynth and plug-in from scratch. That's a new compiler versions used so it might help (or not). With a newly installed Ubuntu 22.10 and after compiling VapourSynth and plug-ins I get an error every time I try a vpy script: Script evaluation failed: Python exception: attempted relative import with no known parent package Traceback (most recent call last): File "src/cython/vapoursynth.pyx", line 2819, in vapoursynth._vpy_evaluate File "src/cython/vapoursynth.pyx", line 2820, in vapoursynth._vpy_evaluate File "example.mp4.vpy", line 2, in <module> import havsfunc as haf File "/usr/local/lib/python3.10/site-packages/havsfunc.py", line 69, in <module> import mvsfunc as mvf File "/usr/local/lib/python3.10/site-packages/mvsfunc.py", line 59, in <module> from ._metadata import __version__ ImportError: attempted relative import with no known parent package I know, I know. It suck to be me but, can anyone at least point me in the correct direction? Last edited by Txico; 24th October 2022 at 11:21. |
24th October 2022, 14:26 | #4752 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Have you installed mvsfunc like mentioned over at https://github.com/HomeOfVapourSynthEvolution/mvsfunc or did you just copy the mvsfunc.py file?
If you did the latter, it would explain the issue. (since _metadata.py is missing which includes the __version__-variable) Cu Selur |
24th October 2022, 16:05 | #4753 | Link | |
Registered User
Join Date: Nov 2017
Posts: 8
|
Quote:
Perhaps there some reboot needed in between? Any cache that needs to be redone? Any other package that needs to be installed like this that I need to know? Thank you for your quick answer Selur. Txico Last edited by Txico; 24th October 2022 at 16:07. Reason: Just more questioning |
|
24th October 2022, 16:21 | #4754 | Link |
Registered User
Join Date: Nov 2017
Posts: 8
|
Hello again,
After you pointed me to the mvsfunc issue I have uninstalled it again and then searched for any other mvsfunc file in my filesystem, and guess what... I found one where there should be none. After deleting it and looking for it again without results this time, installing mvsfunc using pip again gets everything working. Flabbergasted. Thank you, Cu Selur. That solved the issue. Txico Last edited by Txico; 24th October 2022 at 16:41. Reason: Grammar |
30th October 2022, 07:00 | #4755 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Can someone tell me how to translate:
Code:
clip.Mt_Convolution(Horizontal=" 1 1 1 ", vertical = " 1 ", u=1, v=1) and Code:
MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 " , expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) and Code:
Mt_AddDiff(Blurred, ReconstructedMedian) Thanks! Cu Selur Last edited by Selur; 30th October 2022 at 07:17. |
31st October 2022, 08:32 | #4756 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Okay,
Avisynth: Code:
Mt_AddDiff(Blurred, ReconstructedMedian) Vapoursynth: Code:
core.std.MergeDiff(Blurred, ReconstructedMedian)) Code:
MT_Luts(Diff, Diff, mode="med", pixels = " 0 0 1 0 -1 0 " , expr = " X Y - X Y - X Y - abs 1 + * X Y - abs 1 + "+THR+" 1 >= "+THR+" 0.5 ^ "+THR+" ? + / - 128 +", u=1,v=1) Vapoursynth: Code:
partial_expr = lambda M, N: f" x x[{M},{N}] - x x[{M},{N}] - x x[{M},{N}] - abs 1 + * x x[{M},{N}] - abs 1 + {THR} 1 >= {thr_s} 0.5 pow {THR} ? + / - 128 + " medianDiff = core.akarin.Expr(diff, [partial_expr(0,0) + partial_expr(1,0) + partial_expr(-1,0) + "sort3 drop swap drop", ""]) => But how to convert, Avisynth Code:
Mt_Convolution(Horizontal=" 1 1 0 0 1 0 0 1 1 ", vertical = " 1 ", u=1, v=1) Cu Selur |
31st October 2022, 10:30 | #4757 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
got it,
Code:
clip.std.Convolution(matrix=[ 1, 1, 0, 0, 1, 0, 0, 1, 1 ], mode='v', planes=[0]) Uploaded it to: https://github.com/Selur/Vapoursynth...r/fromDoom9.py Cu Selur Last edited by Selur; 31st October 2022 at 10:51. |
20th November 2022, 18:21 | #4758 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
R61-RC1 is out. Bug fixes only.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
29th November 2022, 19:52 | #4760 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
Tags |
speed, vaporware, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|