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. |
16th August 2019, 21:44 | #481 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
I'll have to try updating all the plugins and stuff, maybe there is something causing it.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
1st September 2019, 21:29 | #485 | Link |
Registered User
Join Date: Jun 2010
Posts: 91
|
Thanks for filling my previous requests. Would you consider porting InpaintDelogo https://forum.doom9.org/showthread.php?t=176860 ? Furthermore, I'm interested to see how it'd perform against logoNR.
Also, please port SmoothD2 to as well. http://avisynth.nl/index.php/SmoothD2 <-- SmoothD2 performs better than other deblocking plugin and scripts (DeblockPP7, deblock_qed, and AutoDeblock). Last edited by fAy01; 27th September 2019 at 19:21. |
2nd October 2019, 05:02 | #486 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
overlay bug ?
Overlay bug? havsfunc r32
A foreground clip smaller in dimensions than the background clip, cuts out with black to fill the height avisynth https://i.postimg.cc/6pNPV4nf/overlay-avs.png vapoursynth https://i.postimg.cc/zX3DmMcc/overlay-vpy.png avs Code:
fg=blankclip(1,1024,640,"RGB24",color=color_darkred) bg=blankclip(1,1280,720,"RGB24",color=color_gray) overlay(bg,fg) Code:
fg = core.std.BlankClip(width=1024, height=640, format=vs.RGB24, fpsnum=24, fpsden=1, length=1, color=[139, 1, 0]) bg = core.std.BlankClip(width=1280, height=720, format=vs.RGB24, fpsnum=24, fpsden=1, length=1, color=[128, 128, 128]) overl = haf.Overlay(bg, fg) overl.set_output() EDIT: also, x=, y= positioning do not seem to work in vpy overlay (e.g. x=20, y=20) - it just returns the bg clip; but works ok in avisynth Last edited by poisondeathray; 2nd October 2019 at 05:13. |
2nd October 2019, 15:47 | #489 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
for overlay you can use this overlay function (based on our discussion on ramping), I just simplified that, no moduls needed only numpy.
avantages: much faster, YUV does not need to be converted to 444, numpy does it on the fly even chroma resolutions, works with any vs format cons: numpy modul needed formats needs to be the same though, also make sure the lengths are same, and there is enough room for pasting pip did not troubleshoot that: Code:
import vapoursynth as vs from vapoursynth import core import numpy as np file1 = r'C:\path\background.mp4' file2 = r'D:\path\pasted_video.avi' X1,Y1 = (100,100) clip = core.ffms2.Source(file1) pip = core.ffms2.Source(file2) #make sure clips have the same format and lenght, then continue def overlay(clip, pip, X1, Y1): pl = clip.format.num_planes if clip.format.name == 'CompatBGR32': Y1 = clip.height - (Y1 + pip.height) #Y is mirrored X2,Y2 = (X1 + pip.width, Y1 + pip.height) #shifting 0,1 or 2 to get chroma coordinates, equivalent of dividing Y plane coordinates by 1,2 or 4 X1CH,Y1CH = (X1 >> clip.format.subsampling_w, Y1 >> clip.format.subsampling_h) X2CH,Y2CH = (X2 >> clip.format.subsampling_w, Y2 >> clip.format.subsampling_h) def pip_func(n,f): fout = f[0].copy() for p in range(pl): plane = np.asarray(f[0].get_read_array (p)) rectangle = np.asarray(f[1].get_read_array (p)) plane_out = np.asarray(fout.get_write_array(p)) if p: plane[Y1CH:Y2CH, X1CH:X2CH] = rectangle #p=1,2 U,V plane else: plane[Y1:Y2, X1:X2] = rectangle #p=0 Y plane np.copyto(plane_out, plane) #writing np.array plane into vapoursynth._memoryviewslice del plane_out return fout return core.std.ModifyFrame(clip, [clip,pip], pip_func) clip = overlay(clip, pip, X1, Y1) clip.set_output() Last edited by _Al_; 2nd October 2019 at 16:45. |
2nd October 2019, 16:04 | #490 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Thanks _Al_ ;
I don't "need" it right now in terms of some pressing engagement ; but there are some functions and scripts that rely MaskedMerge and/or Overlay that are probably broken in R47.x If that method is better in terms of pros/cons , maybe it can be implemented in vapoursynth core, maskedmerge, or havsfunc overlay ? |
2nd October 2019, 16:20 | #491 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
To be fully replaceable, opacity and mask arguments would need to be added. Havsfunc.Overlay offers arguments like that, in a sense if there is no opacity it might not be calledd overlay (as I named that function). It would involve some numpy calculations to achieve that. But MaskedMerge is a vs function, so it is fast, it would be interesting to compare it speed wise.
|
20th October 2019, 20:46 | #492 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Contrasharpen and smdegrain(contrasharp=True) produce a pink border. VS R48 RC1
clip = core.std.BlankClip(format=vs.YUV420P8) clip=haf.SMDegrain(clip, contrasharp=True)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
20th October 2019, 21:07 | #493 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
I can't reproduce it. Using the vsrepo version of everything. Try adding vs.core.std.SetMaxCPU("none") to the start of the script on your end.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 20th October 2019 at 21:14. |
20th October 2019, 22:48 | #494 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
The pink border disappears with SetMaxCPU("none"). My cpu is a ryzen 2600
With SetMaxCPU("avx2") and "sse2" it's still pink. EDIT With BlankClip(format=vs.YUV420P16) (and 420P10) it's the same, except that sse2 produces vertical stripes. EDIT 422, 444 is also affected.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 20th October 2019 at 22:54. |
21st October 2019, 08:11 | #496 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
I still can't reproduce it. What are you using to view the output?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
21st October 2019, 08:46 | #498 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
vsedit r19
Code:
import vapoursynth as vs import mvsfunc as mvf import havsfunc as haf core = vs.core clip = core.std.BlankClip(width=200,height=100, format=vs.YUV420P8) sm=haf.SMDegrain(clip, contrasharp=True) # havsfunc from master clip=core.std.StackHorizontal([clip.text.Text("blank"), sm.text.Text("smdegrain +\ncontrasharp \ncpu default/not set")]) vs.core.std.SetMaxCPU("none") clip2 = core.std.BlankClip(width=200,height=100, format=vs.YUV420P8) sm=haf.SMDegrain(clip2, contrasharp=True) # havsfunc from master clip2=core.std.StackHorizontal([clip2.text.Text("blank"), sm.text.Text("smdegrain +\ncontrasharp cpu none")]) c=core.std.StackVertical([clip, clip2]) vs.core.std.SetMaxCPU("sse2") clip3 = core.std.BlankClip(width=200,height=100, format=vs.YUV420P16) #16! sm=haf.SMDegrain(clip3, contrasharp=True) # havsfunc from master clip3=core.std.StackHorizontal([clip3.text.Text("blank"), sm.text.Text("smdeg + contrasharp \ncpu sse2 16bit")]) c=core.std.StackVertical([c, mvf.Depth(clip3, 8)]) c.set_output()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
21st October 2019, 08:58 | #499 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
Nice, that manages to reproduce the green stripes. Oddly enough the pink border doesn't happen on my system.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
21st October 2019, 09:19 | #500 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
And if it helps. The problem is produced somewhere in contrahsrapening and not smdegrain: https://github.com/HomeOfVapourSynth...sfunc.py#L5406
It's a short script and the pink border still happens if you remove miniblur. When I remove the only Expr line, the stripes disappear but the pink border is still there. Border could be Repair or MakeDiff. Will test later more. EDIT should this produce a pink image? Code:
clip = core.std.BlankClip(width=200,height=100, format=vs.YUV420P8) matrix1 = [1, 2, 1, 2, 4, 2, 1, 2, 1] con = core.std.Convolution(clip, matrix=matrix1) clip=core.std.MakeDiff(clip, con) mode=0 -> green image. So I guess the pink border comes from MakeDiff. EDIT3 This is how it looks in R47
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 21st October 2019 at 09:33. |
Thread Tools | Search this Thread |
Display Modes | |
|
|