VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 53 of 53
  1. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    I dowloaded Masktools 1.5.8 zip from the site that guns1inger mentioned above.

    But when I copied .dll I noticed that .dll itself is also 1.5.1.

    Should it be like that?
    Quote Quote  
  2. Interesting. I just checked my version of 1.5.8, and it also says 1.5.1. Must be OK then.
    Quote Quote  
  3. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Anyway, I replaced the old one with the new one and tried again. No difference.
    Quote Quote  
  4. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Guys,

    I am pretty much sure that it is my wrong actions caused the problem.

    I do realize you have no chance to closely examine what I've done with Avisynth plugings directory or something else and you have hard time to find the way out of the mess.

    Sorry about that. I really appreciate your patience and intention to help. Thank you.
    Quote Quote  
  5. I asked you to say what version of AviSynth you're using. Maybe you said, but I forgot.
    Quote Quote  
  6. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Can you post the code from LSF that you have in your avsi file ?
    Read my blog here.
    Quote Quote  
  7. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi,

    AviSynth 2.5.

    Here is the LSF.avsi:

    function LimitedSharpenFaster( clip clp,
    \ float "ss_x", float "ss_y",
    \ int "dest_x", int "dest_y",
    \ int "Smode" , int "strength", int "radius",
    \ int "Lmode", bool "wide", int "overshoot", int "undershoot",
    \ int "soft", int "edgemode", bool "special",
    \ int "exborder" )
    {
    ox = clp.width
    oy = clp.height

    Smode = default( Smode, 3 )
    ss_x = (Smode==4)
    \ ? default( ss_x, 1.25)
    \ : default( ss_x, 1.5 )
    ss_y = (Smode==4)
    \ ? default( ss_y, 1.25)
    \ : default( ss_y, 1.5 )
    dest_x = default( dest_x, ox )
    dest_y = default( dest_y, oy )
    strength = (Smode==1)
    \ ? default( strength, 160 )
    \ : default( strength, 100 )
    strength = (Smode==2&&strength>100) ? 100 : strength
    radius = default( radius, 2 )
    Lmode = default( Lmode, 1 )
    wide = default( wide, false )
    overshoot = default( overshoot, 1)
    undershoot= default( undershoot, overshoot)
    softdec = default( soft, 0 )
    soft = softdec!=-1 ? softdec : sqrt( (((ss_x+ss_y)/2.0-1.0)*100.0) ) * 10
    soft = soft>100 ? 100 : soft
    edgemode = default( edgemode, 0 )
    special = default( special, false )
    exborder = default( exborder, 0)
    #radius = round( radius*(ss_x+ss_y)/2) # If it's you, Mug Funky - feel free to activate it again
    xxs=round(ox*ss_x/8)*8
    yys=round(oy*ss_y/8)*8
    smx=exborder==0?dest_x:round(dest_x/Exborder/4)*4
    smy=exborder==0?dest_y:round(dest_y/Exborder/4)*4

    clp.isYV12() ? clp : clp.converttoyv12()

    ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last
    tmp = last

    edge = mt_logic( tmp.mt_edge(thY1=0,thY2=255,"8 16 8 0 0 0 -8 -16 -8 4")
    \ ,tmp.mt_edge(thY1=0,thY2=255,"8 0 -8 16 0 -16 8 0 -8 4")
    \ ,"max") .mt_lut("x 128 / 0.86 ^ 255 *") #.levels(0,0.86,128,0,255,false)

    tmpsoft = tmp.removegrain(11,-1)
    dark_limit1 = tmp.mt_inpand()
    bright_limit1 = tmp.mt_expand()
    dark_limit = (wide==false) ? dark_limit1 : dark_limit1 .removegrain(20,-1).mt_inpand()
    bright_limit = (wide==false) ? bright_limit1 : bright_limit1.removegrain(20,-1).mt_expand()
    minmaxavg = special==false
    \ ? SimpleAverage(dark_limit1, bright_limit1)
    \ : mt_merge(dark_limit,bright_limit,tmp.removegrain(1 1,-1),Y=3,U=-128,V=-128)

    Str=string(float(strength)/100.0)
    normsharp = Smode==1 ? unsharpmask(strength,radius,0)
    \ : Smode==2 ? sharpen(float(strength)/100.0)
    \ : Smode==3 ? mt_lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +")
    \ : mt_lutxy(tmp,tmpsoft,"x y == x x x y - abs 16 / 1 2 / ^ 16 * "+Str+
    \ " * x y - 2 ^ x y - 2 ^ "+Str+" 100 * 25 / + / * x y - x y - abs / * + ?")

    OS = string(overshoot)
    US = string(undershoot)
    mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?")
    mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x x y - "+US+" - 1 2 / ^ - "+US+" - ?")

    Lmode==1 ? clamp(normsharp, bright_limit, dark_limit, overshoot, undershoot) : last

    normal = last
    zero = clamp(normsharp, bright_limit, dark_limit, 0,0)

    Lmode==3 ? mt_merge(normal,zero,edge.mt_inflate()) : normal

    edgemode==0 ? last
    \ : edgemode==1 ? mt_merge(tmp,last,edge.mt_inflate().mt_inflate().r emovegrain(11,-1),Y=3,U=1,V=1)
    \ : mt_merge(last,tmp,edge.mt_inflate().mt_inflate().r emovegrain(11,-1),Y=3,U=1,V=1)

    AMNT = string(soft)
    AMNT2 = string(100-soft)
    sharpdiff=mt_lutxy(tmp,last,"x y - 128 +")
    sharpdiff2=mt_lutxy(sharpdiff,sharpdiff.removegrai n(19,-1),
    \ "x 128 - abs y 128 - abs > y "+AMNT+" * x "+AMNT2+" * + 100 / x ?")

    soft==0 ? last : mt_lutxy(tmp,sharpdiff2,"x y 128 - -")

    (ss_x != 1.0 || ss_y != 1.0)
    \ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last

    ex=blankclip(last,width=smx,height=smy,color=$FFFF FF).addborders(2,2,2,2).coloryuv(levels="TV->PC")
    \.blur(1.3).mt_inpand().blur(1.3).bicubicresize(de st_x,dest_y,1.0,.0)
    tmp = clp.lanczosresize(dest_x,dest_y)

    clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last)
    \ : mt_merge(tmp,last,ex,Y=3,U=1,V=1) )
    \ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2())
    \ : tmp.mergeluma( mt_merge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1)
    \ .converttoyuy2()) )

    (edgemode!= -1) ? last : edge.lanczosresize(dest_x,dest_y).greyscale

    return last
    }


    Here is Soothe.avsi:

    function Soothe(clip sharp, clip orig, int "keep")
    {
    keep = default(keep, 24)
    keep = (keep>100) ? 100 : (keep<0) ? 0 : keep
    KP = string(keep)
    diff = yv12lutxy(orig,sharp,"x y - 128 +", U=1,V=1)
    diff2 = diff.temporalsoften(1,255,255,32,2)
    diff3 = yv12lutxy(diff,diff2, "x 128 - y 128 - * 0 < x 128 - 100 / " + KP
    \ + " * 128 + x 128 - abs y 128 - abs > x " + KP
    \ + " * y 100 " + KP + " - * + 100 / x ? ?", U=1,V=1)
    return( yv12lutxy(orig,diff3,"x y 128 - -",U=2,V=2) )
    }
    Quote Quote  
  8. 2.5 isn't good enough. 2.5.what? It's important, as you need one of the later versions (2.5.7 RC1 is (I think) the latest.
    Quote Quote  
  9. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi, manono,

    I browsed everything that I could but could not find any other details. I will try to find the one you avised and install it.

    Thanks.
    Quote Quote  
  10. Hi-

    I'm not saying you have to have 2.5.7, but I think you have to have something more recent than 2.5.5. As I mentioned before, if you're not sure of your version, make a Version.avs, with this inside:

    Version()

    and open that in VDubMod.

    You can get AviSynth here:

    Never mind. You'll have to wait, I think, as the sites seem to be down.
    Quote Quote  
  11. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Manono,

    I did as you advised. It is version 2.5.7.

    I probably should remove everything and start from scratch. Install everything anew.
    Quote Quote  
  12. OK, your AviSynth is good. However, I found some significant differences between the LSF you posted, and what I have. Cut and paste this into your LimitedSharpenFaster.avsi, replacing what's there already:
    # LimitedSharpen() ( a modded version, 29 Oct 2005 )
    #
    # A multi-purpose sharpener by Didée
    #
    #
    # Changes in this mod:
    #
    # - RemoveGrain >= v0.9 IS REQUIRED!!
    # ==================================
    #
    # - Smode=4 / sometimes does the magic ;-)
    # - a separate "undershoot" parameter, to allow for some line darkening in comic or Anime
    # - Lmode=3 / on edges, limited sharpening with zero OS & US. On not-edges, limited sharpening with specified OS + LS
    # - "soft" acts different now: no more boolean true/false, but instead integer 0 - 100 (or -1 -> automatic)
    # instead of blurring before finding minima/maxima, it now softens the "effect-of-sharpening"
    # - edgemode=-1 now shows the edgemask. (scaling still not implemented :p )
    #
    ## - MODIFIED version using MaskTools 2.0

    function LimitedSharpenFaster( clip clp,
    \ float "ss_x", float "ss_y",
    \ int "dest_x", int "dest_y",
    \ int "Smode" , int "strength", int "radius",
    \ int "Lmode", bool "wide", int "overshoot", int "undershoot",
    \ int "soft", int "edgemode", bool "special",
    \ int "exborder" )
    {
    ox = clp.width
    oy = clp.height

    Smode = default( Smode, 3 )
    ss_x = (Smode==4)
    \ ? default( ss_x, 1.25)
    \ : default( ss_x, 1.5 )
    ss_y = (Smode==4)
    \ ? default( ss_y, 1.25)
    \ : default( ss_y, 1.5 )
    dest_x = default( dest_x, ox )
    dest_y = default( dest_y, oy )
    strength = (Smode==1)
    \ ? default( strength, 160 )
    \ : default( strength, 100 )
    strength = (Smode==2&&strength>100) ? 100 : strength
    radius = default( radius, 2 )
    Lmode = default( Lmode, 1 )
    wide = default( wide, false )
    overshoot = default( overshoot, 1)
    undershoot= default( undershoot, overshoot)
    softdec = default( soft, 0 )
    soft = softdec!=-1 ? softdec : sqrt( (((ss_x+ss_y)/2.0-1.0)*100.0) ) * 10
    soft = soft>100 ? 100 : soft
    edgemode = default( edgemode, 0 )
    special = default( special, false )
    exborder = default( exborder, 0)
    #radius = round( radius*(ss_x+ss_y)/2) # If it's you, Mug Funky - feel free to activate it again
    xxs=round(ox*ss_x/8)*8
    yys=round(oy*ss_y/8)*8
    smx=exborder==0?dest_x:round(dest_x/Exborder/4)*4
    smy=exborder==0?dest_y:round(dest_y/Exborder/4)*4

    clp.isYV12() ? clp : clp.converttoyv12()

    ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last
    tmp = last

    edge = mt_logic( tmp.mt_edge(thY1=0,thY2=255,"8 16 8 0 0 0 -8 -16 -8 4")
    \ ,tmp.mt_edge(thY1=0,thY2=255,"8 0 -8 16 0 -16 8 0 -8 4")
    \ ,"max") .mt_lut("x 128 / 0.86 ^ 255 *") #.levels(0,0.86,128,0,255,false)

    tmpsoft = tmp.removegrain(11,-1)
    dark_limit1 = tmp.mt_inpand()
    bright_limit1 = tmp.mt_expand()
    dark_limit = (wide==false) ? dark_limit1 : dark_limit1 .removegrain(20,-1).mt_inpand()
    bright_limit = (wide==false) ? bright_limit1 : bright_limit1.removegrain(20,-1).mt_expand()
    minmaxavg = special==false
    \ ? mt_average(dark_limit1, bright_limit1)
    \ : mt_merge(dark_limit,bright_limit,tmp.removegrain(1 1,-1),Y=3,U=-128,V=-128)

    Str=string(float(strength)/100.0)
    normsharp = Smode==1 ? unsharpmask(strength,radius,0)
    \ : Smode==2 ? sharpen(float(strength)/100.0)
    \ : Smode==3 ? mt_lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +")
    \ : mt_lutxy(tmp,tmpsoft,"x y == x x x y - abs 16 / 1 2 / ^ 16 * "+Str+
    \ " * x y - 2 ^ x y - 2 ^ "+Str+" 100 * 25 / + / * x y - x y - abs / * + ?")

    OS = string(overshoot)
    US = string(undershoot)
    mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?")
    mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x x y - "+US+" - 1 2 / ^ - "+US+" - ?")

    Lmode==1 ? mt_clamp(normsharp, bright_limit, dark_limit, overshoot, undershoot) : last

    normal = last
    zero = mt_clamp(normsharp, bright_limit, dark_limit, 0,0)

    Lmode==3 ? mt_merge(normal,zero,edge.mt_inflate()) : normal

    edgemode==0 ? last
    \ : edgemode==1 ? mt_merge(tmp,last,edge.mt_inflate().mt_inflate().r emovegrain(11,-1),Y=3,U=1,V=1)
    \ : mt_merge(last,tmp,edge.mt_inflate().mt_inflate().r emovegrain(11,-1),Y=3,U=1,V=1)

    AMNT = string(soft)
    AMNT2 = string(100-soft)
    sharpdiff=mt_makediff(tmp,last)
    sharpdiff2=mt_lutxy(sharpdiff,sharpdiff.removegrai n(19,-1),
    \ "x 128 - abs y 128 - abs > y "+AMNT+" * x "+AMNT2+" * + 100 / x ?")

    soft==0 ? last : mt_makediff(tmp,sharpdiff2)

    (ss_x != 1.0 || ss_y != 1.0)
    \ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last

    ex=blankclip(last,width=smx,height=smy,color=$FFFF FF).addborders(2,2,2,2).coloryuv(levels="TV->PC")
    \.blur(1.3).mt_inpand().blur(1.3).bicubicresize(de st_x,dest_y,1.0,.0)
    tmp = clp.lanczosresize(dest_x,dest_y)

    clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last)
    \ : mt_merge(tmp,last,ex,Y=3,U=1,V=1) )
    \ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2())
    \ : tmp.mergeluma( mt_merge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1)
    \ .converttoyuy2()) )

    (edgemode!= -1) ? last : edge.lanczosresize(dest_x,dest_y).greyscale

    return last
    }

    And did you make sure to have RemoveGrain 0.9?

    Anyway, try just:

    LimitedSharpenFaster()

    in your script after loading the DLLs you did before. Good Luck.
    Quote Quote  
  13. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi, manono,

    Actually I had the upper part initially but then removed till "function...

    I have done the changes as advised and downloaded another Removegrain (for sure 0.9).

    Now I have another error either in VirtualDub or in Procoder. Please see it below. Both started crashing when I try to open the file in them with the script:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT_MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
    DirectShowSource("C:\Documents and Settings\Owner\Desktop\Ladykillers-Test.avi")
    LimitedSharpenFaster()

    Quote Quote  
  14. Actually I had the upper part initially but then removed till "function...

    I wasn't talking about the upper part, but the main body of LSF. For example:
    AMNT = string(soft)
    AMNT2 = string(100-soft)
    sharpdiff=mt_lutxy(tmp,last,"x y - 128 +")
    Mine:
    AMNT = string(soft)
    AMNT2 = string(100-soft)
    sharpdiff=mt_makediff(tmp,last)
    If it doesn't open in VDubMod, it either won't open or won't give you anything useable in Procoder. Do all your testing in VDubMod.

    That's all right, though, as you're almost there. We just have to sort out this RemoveGrain problem now. Whichever one you're using, it's the wrong one. Get both Ver. 0.9 and 1.0 pre and substitute them back and forth. One should work. Here, try this one:

    removegrain.dll

    Doing some more searching, it turns out both the top of the function and I were wrong. What's needed isn't RemoveGrain 0.9, but 1.0. That message for 0.9 was left over from the original LimitedSharpen function, and hadn't been updated for LSF. Here's the complete thing. Get it going with just the regular RemoveGrain before messing with the MMX versions:

    http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar
    Quote Quote  
  15. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    manono,

    Thank you for your time. I will doanload removegrain 1.0 and install it right now. Please just give me a sec.
    Quote Quote  
  16. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    manono,

    I have installed/repalced removegrain and

    It works!

    Thank you!
    Quote Quote  
  17. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Please if you would be kind to advise about the following.

    I encoded in Procoder the same avi movie two times ( from avi to 25 fps; then from 25 to 29.97 with pulldown; mux m2v with ac3 with muxman or rejig and burnt on DVD disk). Honestly, I am not sure that the settings were exactly the same.

    The first resulting DVD movie, when played either of my two standalones had black stripes on the top and at the bottom.

    The second resulting movie had top-bottom black stripes at all stages (avi; m2v; pulldown) including VOBs but after I have burnt it on DVD disk and started playing on my standalones, there are no balck stripes at all on either one - Panni or Philips.

    Which way is correct - with balck stripes or without? Did I do something wrong? Thank you!
    Quote Quote  
  18. Finally, eh?

    I encoded in Procoder the same avi movie two times

    Sorry, but I don't use Procoder and can't advise on the settings.

    The first resulting DVD movie, when played either of my two standalones had black stripes on the top and at the bottom.

    If it's a widescreen movie and played on a regular 4:3 TV set, it's supposed to have black bars above and below. The player adds them in to maintain AR. Or they're encoded into the vobs. Or both. If played on a widescreen TV, and if the movie is wider than 1.78:1, then it's supposed to play with black bars above and below. Those black bars are encoded into the vobs. As long as the AR is OK (round things look round, and not like ovals), no problem.

    Which way is correct - with balck stripes or without?

    I have no idea. I'll need the GSpot info (including the resolution), a pic showing the black bars, and the AviSynth script, if I'm to figure it out.
    Quote Quote  
  19. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    If you encoded a 720 x 480 at PAL framerates using the PAL template, ProCoder may have tried to create a PAL resolution frame. This is why you must encode to an mpeg file, not use the preset DVD templates.
    Read my blog here.
    Quote Quote  
  20. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Guys,

    Thank you very much!
    Quote Quote  
  21. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Guys,

    I've found some settings in Procoder > Source that might affect the outcome aspect ratio.

    "Source Video Aspect Ratio" or "Source Pixel Aspect Ratio", which one should I use for aspect ratio or any one?

    Thank you!

    Quote Quote  
  22. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Your source should be 720 x 480 because of your avisynth script. If it is 16:9, just choose 16:9 and encode. If it is 4:3, choose 4:3.
    Read my blog here.
    Quote Quote  
  23. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Thank you!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!