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 > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd November 2005, 03:25   #61  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,455
Quote:
Originally Posted by Socio
Kind of OT:

Well I am thoroughly confused with Mano's new naming structure, there is no function called DEdgeMask. There is a function called " mt_edge" which along with mt_motion and mt_mapped "are the counterpart of EdgeMask,
DEdgeMask, DEdgeMask2 and MotionMask".

I tried changing the calls in LS from DEdgeMask to mt_edge and it did not work, so what function call do you use to replace DEdgeMask in LS?

EDIT: Didee it looks like you may need to completely re-write your DEdgeMask call in LS to make this new version of masktools work.
Just replace with mt_edge(mode="custom matrix",y1=....). The main change is that edgemask and dedgemask were merged, mode replaces both type and matrix. If there's a divisor, it's appended to the end of the custom matrix.

mt_mapped is dedgemask2 equivalent, I guess, replacing the y/c arguments with special clips.
foxyshadis is offline   Reply With Quote
Old 6th November 2005, 19:30   #62  |  Link
Socio
Registered User
 
Join Date: May 2004
Posts: 291
I got it working in LS took a litle more than just subing the names though thx for the help foxyshadis.


I have another question does the "mt" prefix in the new function names stand for multi threading?
Socio is offline   Reply With Quote
Old 6th November 2005, 19:33   #63  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
No, it's a shortcut for MaskTools. Since both version ( v1 and v2 ) had to be usable at the same time, I had to differenciate them.
__________________
Manao is offline   Reply With Quote
Old 7th November 2005, 23:10   #64  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
*Bump*

New build is up : http://manao4.free.fr/masktools-v2.0a8.zip

Changes from alpha 7 to alpha 8 :
Quote:
* fixed : mt_edge in custom mode wasn't working properly
* fixed : mt_edge in custom mode, optimized wasn't working properly either
* fixed : mt_lutxy was slow to load, it's better now
__________________
Manao is offline   Reply With Quote
Old 8th November 2005, 20:51   #65  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 401
@manao

mt_convolution don't work for me

myclip.mt_convolution(horizontal="0 1 0", vertical="-1 2 -1",u=3,v=3) left myclip x untouched.

myclip.yv12convolution(horizontal="0 1 0", vertical="-1 2 -1",u=3,v=3) does the convolution ok.

It's the same for :

myclip.mt_convolution("0 1 0","-1 2 -1",u=3,v=3)

BTW my version is 2.0 a8
AVIL is offline   Reply With Quote
Old 8th November 2005, 21:46   #66  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
AVIL : thanks for the report, it's fixed :

Changed from alpha 8 to alpha 9 :
Quote:
* fixed : mt_lut, mt_lutxy : even faster loading
* fixed : mt_convolution : negative coefficients were offseted by 1
* fixed : mt_convolution : division by zero if the sum of the coefficients was 0.
__________________
Manao is offline   Reply With Quote
Old 8th November 2005, 22:29   #67  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
the link to a9 is broken..it looks like it's not on the server
puffpio is offline   Reply With Quote
Old 9th November 2005, 05:23   #68  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
Fixed
__________________
Manao is offline   Reply With Quote
Old 9th November 2005, 23:57   #69  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 401
@Manao

mt_lutxy and mt_lut (version 2.0a9) dont work :


mt_LUTxy(myclip,myclip,"x y - abs" , "128", "128",u=3,v=3)

gives a pale green clip

yv12LUTxy(myclip,myclip,"x y - abs" , "128", "128",u=3,v=3)
gives a black clip, as spected.

mt_lut(myclip,"x 25 < 255 0 ?" , "128", "128",u=3,v=3)
gives an uniform pale green clip also

yv12lut(myclip,"x 25 < 255 0 ?" , "128", "128",u=3,v=3)
gives a binary clip, as spected.
AVIL is offline   Reply With Quote
Old 10th November 2005, 00:07   #70  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
This time, it's not a bug. Arguments should always be named to avoid all confusion. In this case, you didn't notice that I added a fourth string, "expr", in addition to "yExpr", "uExpr" and "vExpr", whose purpose is to serve as default expression if one is missing. Order is expr, yexpr, uexpr, vexpr, so vexpr is missing, replaced by the first one, and yexpr is "128".
__________________
Manao is offline   Reply With Quote
Old 10th November 2005, 07:06   #71  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 401
@manao

Sorry.

Indeed, I must read the manual BEFORE use (not AFTER how I'm accustomed)
AVIL is offline   Reply With Quote
Old 10th November 2005, 09:40   #72  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Just a note, if anyone is scratching it's head like I was ... the "equal" operator has been changed to "==" in MT 2.x , where it was "=" in MT 1.5.x ...
"x y = 255 0 ?" --> "x y == 255 0 ?"

It's fine that way, but isn't noted anywhere ... lut description refers to the old 1.5.x documentation.
__________________
- 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!)
Didée is offline   Reply With Quote
Old 10th November 2005, 09:53   #73  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
Never use that operator anyway. Numbers are floats during the lut precomputation, and you should never do a =(=) b with floats. Rather use abs(a-b) < epislon instead.

But I'll update the documentation.
__________________
Manao is offline   Reply With Quote
Old 10th November 2005, 10:41   #74  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
When checking the hyperbolic cosecant of a complex power against <value>, sure. /*earnest face*/

For direct checking of pixel values, "=" has proven to be quite handy.

"x 128 = [this] [that] ?" (a)

is readable. When instead writing

"x 128 - abs 0.00001 < [this] [that] ?" (b)

then, while we're at it anyways, why not make it completely unreadable like

"x 128 - 128 x - * 1 2.0 / ^ 1 10000 / < [this] [that] ?" (c)


Somehow I prefer variant (a), dunno ...
__________________
- 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!)
Didée is offline   Reply With Quote
Old 10th November 2005, 10:51   #75  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
Then, I could change =(=) operator to act like x y - abs epsilon <, what do you think of that ?. Because I persist in thinking that =, as such, on float, is a bad idea. If you need, I can even export the epislon parameter ( though 0.001 should be OK for most purposes ).
__________________
Manao is offline   Reply With Quote
Old 16th November 2005, 21:24   #76  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 401
@Manao

I've found that mt_convolution lacks of parameters "total", "automatic" and "saturate".

Although I can emulate "total" parameter with a posterior mt_lut step, I don't know how to mimic saturate.

Is possible to implement this parameters in mt_convolution or i must
use yv12convolution? (or ¿they are an easy method to emulate them?)

BTW, I agree with the idea of the epsilon for the == operator. I think also that checking pixel identity is a must for the LUT tools.

Thanks.
AVIL is offline   Reply With Quote
Old 20th November 2005, 17:09   #77  |  Link
cwolf
Registered User
 
Join Date: Oct 2003
Location: Porto Alegre, Brazil
Posts: 13
parameter offy in mt_lutxy

It seems that the parameter "offy" is being disregarded in mt_lutxy. It is assuming "offx" as "offy" because no matter what I put in "offy" it is considering the value in "offx", so the "home" point is always a square. Could you confirm this? I'm using the 2.0a9 version dated nov 8th 21:41.
Cecilia
[edit]forgot to post the script:
mt_LUTxy (last,levels(0,1,255,255,255), yexpr="y", uexpr="y", vexpr="y",offx=64,offy=344,w=120,h=64)
levels is being used here for debugging purposes only.
__________________
Athlon XP2400;a7v333;768mb PC2100;Seagate 80Gb;AIW8500;DVD
musica do mundo - my favourite radio program, check it!

Last edited by cwolf; 20th November 2005 at 17:20.
cwolf is offline   Reply With Quote
Old 20th November 2005, 17:19   #78  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
cwolf : well spotted, fixed, I'll soon release a new version.

AVIL : sorry for having taken so long to answer : I'll add them ( automatic will be useless though ).
__________________
Manao is offline   Reply With Quote
Old 20th November 2005, 18:47   #79  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
*bump*

Changed from alpha 9 to alpha 10 :
Code:
 * fixed : offY was always set to offX
 * fixed : offset quirk
 * fixed : mt_convolution was crashing with floats
 * changed : luts' equal operator is now equivalent to abs(x-y) < 0.000001
 * added : bool saturate(true) parameter to mt_convolution
 * added : float total(1.0) parameter to mt_convolution
__________________
Manao is offline   Reply With Quote
Old 10th December 2005, 19:14   #80  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
mt_convolution still has bugs. You can create weird output and access violations with

Code:
a =  last
b =  mt_convolution("1","1 4 6 4 1",U=2,V=2)
c =  mt_convolution("1 4 6 4 1","1",U=2,V=2)
d =  mt_convolution("1","1 4 6 4 1",U=2,V=2)
 \  .mt_convolution("1 4 6 4 1","1",U=2,V=2)
 
e = stackvertical(stackhorizontal(a,b),stackhorizontal(c,d)) 
f = stackvertical(stackhorizontal(a,c),stackhorizontal(b,d)) 

#a
#b
#c
#d
#e
#f

return( last )
so it seems mt_convolution goes crazy when it gets input that was already processed by mt_convolution.
Interesting: on its own, the single-processed clips "b" and "c" are OK. In the stacked() output of "e", the "c" clip is distorted, too. And "f" just crashes with access violation.


Then, a question about shape-strings and expand & Co:

a) inflate/deflate

The readme of mt_masktools states: "compute a local average by taking into account only the neighbourgh whose value is higher than the pixel.

The html of v1.5.x states: Inflate will compute the mean of the surrounding pixels, and will replace the value of the pixel by it only if this mean is superior to the original value of the pixel.

This is definetly not the same operation. Has the behaviour changed, or is one of the two descriptions just not correct?


b) shape strings

I don't get the right grip to them. I.e. according to the readme of mt_masktools, the string "0 0 -1 0 1 0" is equivalent to "horizontal" for inpand/expand.
How does this work? the string has 6 numbers, but expand is working on 3x3 pixels ... so I'd rather expect a string with 9 numbers. Or is this similar to the "vector" format of mt_convolution, with both strings packed into one?

Then, radii bigger than 1 are supposed to work, yes? However when producing accordingly long strings, the respective filters do ~something~, but for me it's not predictable. In the same breath, the strings produced by the helpers mt_circle, mt_square etc. I just do not understand. Perhaps the string creation is buggy, perhaps the way the strings get interpreted from other filters is buggy. Perhaps I am buggy.
__________________
- 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!)
Didée is offline   Reply With Quote
Reply

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:22.


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