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. |
3rd January 2011, 15:03 | #381 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
3rd January 2011, 15:59 | #382 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,867
|
lol, true, true
It's a long term thing, steep learning curve. I find scripting more productive in general, because of the write/test cycle. A compiler can't keep up with the rate I generate ideas - you're inspired for a week, and that's all you got to get something done. Last edited by jmac698; 3rd January 2011 at 16:05. |
3rd January 2011, 18:15 | #383 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
If you want a rand, use mt_lutxy(clip, clip.addgrain).
__________________
|
3rd January 2011, 19:11 | #384 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Maybe you would be interested by my dithering package? See my signature below.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
3rd January 2011, 22:08 | #385 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Remember when dealing with "random" elements in frame data the frame data must be the same every time you generate that frame.
Very early versions of addgrain() just grabbed a new random sequence for every GetFrame(N) call independant of N. This caused strange behaviour when accessing the same frames multiple times and only some were able to be cached. The fix was to remember the random key for each frame N, such that whenever frame N was rendered the exact same results could be returned. Manao's solution, mt_lutxy(clip, clip.addgrain), is a good one because addgrain() is now well behaved and you get different randomness for each frame, but a given frame is always the same. Remember all the mt_lux* are using static Look Up Tables that are created once in the filter constructor (compile time) and reused very fast in the GetFrame calls (run time). So having rand in the expression would still have the same LUT for every frame, which I suspect would be not quite what would be wanted. And as an added bonus for confusion repeated runs of the same script might produce different random results. |
19th January 2011, 03:33 | #386 | Link |
Registered User
Join Date: Jan 2011
Posts: 121
|
Hey, can anyone point me to the documentation for mt_lutspa? It's not in the Readme with masktools-v2.0a48, and it's not at http://manao4.free.fr/MaskTools.htm or http://manao4.free.fr/mt_masktools.html. I've done a search on this forum, but the most I've found is a debate in this thread over placement of the "relative" parameter.
EDIT: I've pretty much figured it out now, but it'd still be nice to see the documentation so I can learn some more of the options. Last edited by Mini-Me; 19th January 2011 at 06:22. Reason: To cut out some of the crap |
19th January 2011, 08:23 | #387 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
There's an up to date mt_masktools.htm bundled in the zip package, in the directory masktools/documentation. I'll take care to place it in the root directory in the next releases.
__________________
|
9th February 2011, 18:57 | #389 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
with mt_edge, how can I shift one pixel without degrading chroma?
I use: Code:
move = " 0 0 0 0 0 0 0 0 1 1" mt_edge(move,0,255,0,255,U=3,V=3) Also there is a possibility that mt_edge would leave black pixels when shifted?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
9th February 2011, 19:33 | #390 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
If you want to do it with mt_edge, do
Code:
move_luma = " 0 0 0 0 0 0 0 0 1 1" move_chroma = " 0 0 0 0 1 1 0 1 1 4" mt_edge(move_luma,0,255,0,255,Y=3,U=2,V=2).mt_edge(move_chroma,0,255,0,255,Y=2,U=3,V=3)
__________________
|
9th February 2011, 19:45 | #391 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
Thanks! it was worth asking as I see. Im mainly doing so to avoid resizing.
Now its aligned but I guess degrading can't be avoided. What about the black border? EDIT: upss! the chroma subsampling, got it.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 9th February 2011 at 20:00. |
13th February 2011, 23:52 | #393 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Code:
blur(1).mt_edge("laplace")
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
16th February 2011, 01:11 | #394 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
trunc, ceil and floor are also missing from the body of the documentation (but are mentioned in the changelog). |
|
16th February 2011, 13:39 | #396 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Does this work? (Can't try it right now...)
Code:
mask1 = whatever # this' the mask with some 255-white pixels in it mask2 = mask1.mt_lut(Y=-255) black = mask1.mt_lut(Y=0) v1=interleave(mask1,black).assumefieldbased.assumetff.weave v2=interleave(mask2,black).assumefieldbased.assumetff.weave mt_hysteresis(v1,v2) separatefields.selecteven.assumeframebased
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
17th February 2011, 07:23 | #397 | Link | |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
Quote:
It is work. I am not find full description mt_hysteresis. Please advice. yup. Last edited by yup; 17th February 2011 at 08:28. |
|
17th February 2011, 12:56 | #398 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Hehe, I never have used mt_hysteresis before. Now, by actually trying it, I get an all-white screen from the above script. Seems that mt_hysteresis forces full expansion for any pixel that's not exactly black. (?)
Code:
thresh = 254 # only pixels brighter than "thresh" will be considered mask1 = whatever # this' the mask with some 255-white pixels in it mask1a = mask1.mt_binarize(thresh) mask2 = mask1.mt_lut(Y=-255) black = mask1.mt_lut(Y=0) v1=interleave(mask1a,black).assumefieldbased.assumetff.weave v2=interleave(mask2,black).assumefieldbased.assumetff.weave mt_hysteresis(v1,v2) separatefields.selecteven.assumeframebased
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
18th February 2011, 17:04 | #400 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
But my test gave correct result.
Wait - colorspace? Scanline masking smells like VHS capture. VHS capture smells like YUY2. My test was with YV12 video, in Avisynth 2.5.8.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
Thread Tools | Search this Thread |
Display Modes | |
|
|