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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 28th April 2020, 16:36   #581  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by HolyWu View Post
There is no temporal processing since you specified only one weight with a single clip. To have actual temporal processing with a single clip you need specify at least three weights.
Ahh yes, now I can see what I expected to see
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline  
Old 1st May 2020, 15:49   #582  |  Link
NullNix
Registered User
 
Join Date: Jan 2015
Posts: 14
Quote:
Originally Posted by NullNix View Post
All problems persist even with "none". But this eliminates a bunch of tricksy assembler in the vs core as a possible cause, as well as its corresponding non-assembler variants, which is extremely valuable! Thank you!

(hmm, that's an idea. I'll roll back not only vapoursynth but also all vs plugins containing native code to the versions as of last year and see if the problem persists.)
No effect. What on earth is going on?!

So let's look closer. The clip I've been using starts out with blankness, concealing any funny stuff going on at its start. If you slice that blankness off (and take advantage of that to reduce the clip length to 10s to speed up experiments), it's clear that even with preset="ultra fast", TR=2, funny stuff is definitely still going on: it's just concentrated entirely at the start. It's obvious even without the soundtrack. The first frame is preserved, but the next second of the input appears to be silently erased: http://www.esperi.org.uk/~nix/encoding/slice.orig.vid vs the post-QTGMC http://www.esperi.org.uk/~nix/encoding/slice.qtgmc.y4m.

Small wonder the audio and video are desynchronized after that!

I'm fairly sure QTGMC isn't meant to silently drop frames

Last edited by NullNix; 1st May 2020 at 16:16.
NullNix is offline  
Old 24th June 2020, 16:55   #583  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Quote:
Originally Posted by poisondeathray View Post
"screen" is not in the overlay avs version, but it's one of the more common compositing/photoshop blend modes used
More blend modes are added now. Please give it a try.
HolyWu is offline  
Old 24th June 2020, 18:03   #584  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by HolyWu View Post
More blend modes are added now. Please give it a try.
Thanks,

Something is buggy with the "normal" overlay mode with mask in the 20200624 version.

The overlay is partially transparent (but mask area seems correct; 100% white, 1023 in 10bit), and background colors change.

If I revert back to an older version, say 20200524 , it works ok

Test example
https://www.mediafire.com/file/fgyvk..._tests.7z/file

Code:
v = core.imwri.Read(r'RGB_10bit_grad_1024x480.dpx')
v = core.resize.Point(v, width=1024 , height=480, format=vs.YUV444P10, matrix_s="709", range_s="full")

ovr = core.imwri.Read(r'8bit_overlay.png', alpha=True)

ovr[0] = core.resize.Point(ovr[0], format=vs.YUV444P10, matrix_s="709", range_s="full")
ovr[1] = core.resize.Point(ovr[1], format=vs.YUV444P10, matrix_s="709", range_s="full")

v2 = haf.Overlay(v, ovr[0], mask=ovr[1])

#ovr[0].set_output()
#ovr[1].set_output()
#v.set_output()
v2.set_output()
poisondeathray is offline  
Old 24th June 2020, 21:47   #585  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
hi I have some problem with MCTD, it creates more noise looks like adding noise, it looks like white squares, very visible in the top left but if you look closely they are everywhare :x


Code:
import vapoursynth as vs
import havsfunc as haf

core = vs.get_core()
core.set_max_cache_size(7000)

clip = core.ffms2.Source("/mnt/2TWDPrimary/Babylon 5/Season 1/03. Born to the Purple.mkv")
clip = haf.QTGMC( clip, TFF=True, Preset="Placebo", ShowSettings=False, opencl=False, TR0=2, TR1=2, SourceMatch=0, TR2=0, Lossless=0, Sharpness=0 )
clip = haf.MCTemporalDenoise(clip,  radius=3, limit=2,  twopass=False, limit2=2,  refine=True, useTTmpSm=True,  stabilize=True, maxr=1, TTstr=1,  chroma=False, MVsharp=False, sigma=0, pfMode=-1,search=3, searchparam=4, pel=4, pelsearch=4, bwbh=512, owoh=256, blksize=4, overlap=2, deblock=False, post=0,bt=4,thSAD=2000, thSAD2=2000, thSCD1=1000, thSCD2=200)
clip = haf.LSFmod(clip, defaults="slow",strength=20,Smode=3,Smethod=3,Lmode=0,overshoot=0,preblur="OFF",secure=False,edgemode=0,soft=0,soothe=False,ss_x=1.00,ss_y=1.00)
clip.set_output()
don't affraid the parameters, my system do this with encoding in 48 hours

this problem only exist in my new linux compiled vapoursynth system, I build all from source include the plugins, the python the vs iteself, the problem don't exist on windows, I tested without the QTGMC and without the LFSMOD to see that it's the MCTD the problem, funny there are no error messages, it just running and adding this noise, I try everything: remove and invert many of the MCTD parameters, nothing have effect, the processor is phenom 2 1090T, linux is devuan jessi.

edited: core.std.SetMaxCPU("none") fixed the problem ..... what's going on ?

Last edited by monohouse; 24th June 2020 at 21:52.
monohouse is offline  
Old 25th June 2020, 00:09   #586  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Could be a bug in the sse code path.

But does sigma=0 make sense?

You can also use presets and override them
Code:
 settings : Global MCTemporalDenoise settings [default="low"] |
             - "very low"                                     |
             - "low"                                          |
             - "medium"                                       |
             - "high"                                         |
             - "very high
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database

Last edited by ChaosKing; 25th June 2020 at 00:11.
ChaosKing is offline  
Old 25th June 2020, 00:33   #587  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
yhe I tested sigma many times, it was a littel too strong at the time.... but at the time I was doing radius=2 limit=1, now with radius=3 limit=2 it possible that sigma might beter the true is I don't realy know the real diffrence between radius+limit and sigma, my guess is that sigma is design for speed and radius+limit design for quality.

you know I realy like this system, almost all if not all plugins vectorized, many have vectorization written manually some have AVX2, even many latest games don't use AVX2 and use at most AVX1 if you lucky
I can't wait to build my faildozer system to see diffrence from phenom 2 becuase he have AVX1
the 4790K system runs some laps around the phenom 2, 3 times faster, all cpu no openCL, for some reason I don't get that mutch from OpenCL, mybe 0.04 fps faster out of 0.90
x264 also don't get almost nothing from OpenCL and I using latest version v160-3000, the card is almost not used at all like highest I ever see was 5%
someone with modern system that have AVX512 probably run many laps around the 4790K xD

Last edited by monohouse; 25th June 2020 at 01:17.
monohouse is offline  
Old 25th June 2020, 04:53   #588  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Quote:
Originally Posted by poisondeathray View Post
The overlay is partially transparent (but mask area seems correct; 100% white, 1023 in 10bit), and background colors change.
When you manually convert a clip of Gray format to YUV format, the pixel values of chroma planes are set to 512 rather than 0, hence you get 50% transparency in the chroma planes during masking. Preferably the users should just leave the mask as Gray format when the mask is already of Gray format. Anyway I just added a mask_first_plane parameter to let the users decide whether only the first plane of the mask is used for masking.
HolyWu is offline  
Old 25th June 2020, 05:07   #589  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by HolyWu View Post
When you manually convert a clip of Gray format to YUV format, the pixel values of chroma planes are set to 512 rather than 0, hence you get 50% transparency in the chroma planes during masking. Preferably the users should just leave the mask as Gray format when the mask is already of Gray format. Anyway I just added a mask_first_plane parameter to let the users decide whether only the first plane of the mask is used for masking.
Right,

The problem in this case is the base clip is 10bit, but the overlay is 8bit, so you have to either scale on or the other to match.

So use Gray10 instead of YUV . And since there is no Gray10, you have to register it. I think you mentioned this already earlier...

Code:
ovr[1] = core.resize.Point(ovr[1], format=core.register_format(vs.GRAY, vs.INTEGER, 10, 0, 0).id, matrix_s="709", range_s="full")
Thanks for adding that parameter; I think many people are used to using a YUV clip with the "Y" plane as the mask
poisondeathray is offline  
Old 25th June 2020, 05:08   #590  |  Link
HolyWu
Registered User
 
Join Date: Aug 2006
Location: Taiwan
Posts: 392
Quote:
Originally Posted by monohouse View Post
this problem only exist in my new linux compiled vapoursynth system, I build all from source include the plugins, the python the vs iteself, the problem don't exist on windows, ..., the processor is phenom 2 1090T, linux is devuan jessi.

edited: core.std.SetMaxCPU("none") fixed the problem ..... what's going on ?
Interestingly, you are using the same CPU as the one at https://github.com/vapoursynth/vapoursynth/issues/531, um...or you two are the same person?

If core.std.SetMaxCPU("none") fixed your problem, then there must be undiscovered bugs lying around, most probably Expr. Could you reproduce it with using only one function? Using three complex functions at once is difficult to hunt down the culprit.
HolyWu is offline  
Old 25th June 2020, 17:28   #591  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
here it says that I runned 3 but the problem happen when only MCTD running, MCTD is the problem

I am testing now this
Code:
import vapoursynth as vs
import havsfunc as haf

core = vs.get_core()
core.set_max_cache_size(7000)

clip = core.ffms2.Source("/mnt/2TWDPrimary/Babylon 5/Season 1/03. Born to the Purple.mkv")
core.std.SetMaxCPU("sse2")
clip = haf.QTGMC( clip, TFF=True, Preset="Placebo", ShowSettings=False, opencl=False, TR0=2, TR1=2, SourceMatch=0, TR2=0, Lossless=0, Sharpness=0 )
core.std.SetMaxCPU("none")
clip = haf.MCTemporalDenoise(clip,  radius=3, limit=2,  twopass=False, limit2=2,  refine=True, useTTmpSm=True,  stabilize=True, maxr=1, TTstr=1,  chroma=False, MVsharp=False, sigma=0, pfMode=-1,search=3, searchparam=4, pel=4, pelsearch=4, bwbh=512, owoh=256, blksize=4, overlap=2, deblock=False, post=0,bt=4,thSAD=2000, thSAD2=2000, thSCD1=1000, thSCD2=200)
core.std.SetMaxCPU("sse2")
clip = haf.LSFmod(clip, defaults="slow",strength=20,Smode=3,Smethod=3,Lmode=0,overshoot=0,preblur="OFF",secure=False,edgemode=0,soft=0,soothe=False,ss_x=1.00,ss_y=1.00)
clip.set_output()
but I have a new problem, probably nonsence but I don't know what it is :x

Code:
  File "src/cython/vapoursynth.pyx", line 1956, in vapoursynth.vpy_evaluateScript
  File "src/cython/vapoursynth.pyx", line 1957, in vapoursynth.vpy_evaluateScript
  File "/mnt/b5/01. 3.vpy", line 23, in <module>
    clip = haf.LSFmod(clip, defaults="slow",strength=20,Smode=3,Smethod=3,Lmode=0,overshoot=0,preblur=0,secure=False,edgemode=0,soft=0,soothe=False,ss_x=1.00,ss_y=1.00)
  File "/mnt/apps/python-3.6.9/lib/python3.6/site-packages/havsfunc.py", line 4913, in LSFmod
    normsharp = pre.cas.CAS(sharpness=min(Str, 1))
  File "src/cython/vapoursynth.pyx", line 1233, in vapoursynth.VideoNode.__getattr__
AttributeError: There is no attribute or namespace named cas
this could be it ? https://github.com/HomeOfVapourSynth...apourSynth-CAS

Last edited by monohouse; 25th June 2020 at 19:07.
monohouse is offline  
Old 25th June 2020, 17:45   #592  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by monohouse View Post
correct
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline  
Old 25th June 2020, 18:10   #593  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
should I change the parameters like strenth or the new CAS method look the same in term of amount ?

I wanne ask you something else: phenom 2, have SSE3 (not suplemental) and SSE4A, some other call 3dnow and some mmx, whay all this is not used with manually written asembly in any of the plugins ?
they are not used in vs iteself too

I am testing now this
Code:
import vapoursynth as vs
import havsfunc as haf

core = vs.get_core()
core.set_max_cache_size(7000)

clip = core.ffms2.Source("/mnt/2TWDPrimary/Babylon 5/Season 1/03. Born to the Purple.mkv")
core.std.SetMaxCPU("sse2")
clip = haf.QTGMC( clip, TFF=True, Preset="Placebo", ShowSettings=False, opencl=False, TR0=2, TR1=2, SourceMatch=0, TR2=0, Lossless=0, Sharpness=0 )
core.std.SetMaxCPU("none")
clip = haf.MCTemporalDenoise(clip,  radius=3, limit=2,  twopass=False, limit2=2,  refine=True, useTTmpSm=True,  stabilize=True, maxr=1, TTstr=1,  chroma=False, MVsharp=False, sigma=0, pfMode=-1,search=3, searchparam=4, pel=4, pelsearch=4, bwbh=512, owoh=256, blksize=4, overlap=2, deblock=False, post=0,bt=4,thSAD=2000, thSAD2=2000, thSCD1=1000, thSCD2=200)
core.std.SetMaxCPU("sse2")
clip = haf.LSFmod(clip, defaults="slow",strength=20,Smode=3,Smethod=3,Lmode=0,overshoot=0,preblur="OFF",secure=False,edgemode=0,soft=0,soothe=False,ss_x=1.00,ss_y=1.00)
clip.set_output()
edited: this is working correctly

Last edited by monohouse; 25th June 2020 at 19:10.
monohouse is offline  
Old 26th June 2020, 05:14   #594  |  Link
cwk
Registered User
 
Join Date: Jan 2004
Location: earth, barely
Posts: 96
Quote:
Originally Posted by HolyWu View Post
Interestingly, you are using the same CPU as the one at https://github.com/vapoursynth/vapoursynth/issues/531, um...or you two are the same person?
No, that was me . And I'm only using the Phenom II until my Ryzen 3950 arrives...

I should note that I have not experience the expr issue with R49 or R50 of Vapoursynth. The expr bug has been fixed. @monohouse, be sure you are using current Vapoursynth if you are still experiencing this issue.
cwk is offline  
Old 27th June 2020, 00:15   #595  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
is there a vs plugin that allow to adjust contrast ?
monohouse is offline  
Old 27th June 2020, 00:24   #596  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by monohouse View Post
is there a vs plugin that allow to adjust contrast ?


It depends on what you mean by "contrast".

adjust.py has "contrast" from avisynth's tweak ; or you can use smoothlevels or levels, or curve to adjust levels, and thus contrast
poisondeathray is offline  
Old 27th June 2020, 01:07   #597  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
thank adjust is nice whare do you think best to put it in this script ?
I used cont but he is not doing contrast, he is just putting everything down :x
contrast I meen: bright is a littel brighter, dark is a littel darker

I tryed this: haf.SmoothLevels(clip, input_low=8, output_low=0, input_high=247, output_high=255, gamma=1)
but what he is doing is cutting everything below 8 and throw it, I dont wanne cut it off and throw, I wanne reduce it, a littel and increase a littel

Last edited by monohouse; 27th June 2020 at 01:34.
monohouse is offline  
Old 27th June 2020, 01:31   #598  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by monohouse View Post
contrast I meen: bright is a littel brighter, dark is a littel darker
You can use levels, smoothlevels, or curve
poisondeathray is offline  
Old 27th June 2020, 04:41   #599  |  Link
monohouse
Registered User
 
Join Date: Jul 2007
Posts: 106
LSFmod Smode=2 broked with git version
Code:
clip = haf.LSFmod(clip, defaults="slow",strength=20,Smode=2,Smethod=3,Lmode=0,overshoot=0,preblur=-1,secure=False,edgemode=0,soft=0,soothe=False,ss_x=1.00,ss_y=1.00)
monohouse is offline  
Old 27th June 2020, 04:49   #600  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by monohouse View Post
LSFmod Smode=2 broked with git version
Code:
clip = haf.LSFmod(clip, defaults="slow",strength=20,Smode=2,Smethod=3,Lmode=0,overshoot=0,preblur=-1,secure=False,edgemode=0,soft=0,soothe=False,ss_x=1.00,ss_y=1.00)
<snip>
Works for me as expected without those errors

What pixel type? what source filter?

Maybe it's related to one of the CPU instruction bugs ?
poisondeathray is offline  
Closed Thread

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 09:02.


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