View Single Post
Old 22nd November 2017, 15:36   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Oops, sorry, you meant result of the client script.
That script was just in question to Feisty2, top right is amplified difference between the two results both with and without Precise=True.
Set Amp=False for non amp'd diff.

EDIT: Top Left=Source, BotLeft=Precise=False, BotRight=Precise=True.

EDIT: A=MCDegrainSharp(2,bsrch=BSRCH,Precise=False)
Above has Frames=2 for both function calls, I usually use 1, but sometimes up to 3.

EDIT: The Amp'ed difference just to make obvious where there are differences, so you can examine those areas more closely.
You could change eg Frames=1 in A and Frames=2 in B and set Precise = False/true *same for both)
to view difference due to only Frames arg. (Below untested)
Code:
BSRCH=true
PRECISE1=True
PRECISE2=True
FRAMES1=1
FRAMES2=2
AMP=True
#AviSourcE("E:\V\FlashTest.avi")
ColorBars.convertToYV12.BilinearResize(320,240) # just to test

O=Last
A=MCDegrainSharp(Frames=FRAMES1,bsrch=BSRCH,Precise=PRECISE1)
B=MCDegrainSharp(Frames=FRAMES2,bsrch=BSRCH,Precise=PRECISE2)
D=ClipDelta(A,B,Amp=AMP)
O=Sub(O,"Source")
D=Sub(D,"D) Difference : Amp="+String(AMP))
A=Sub(A,String(FRAMES1,"A) MCDS : Frames=%.0f : Precise=")+String(PRECISE1))
B=Sub(B,String(FRAMES2,"B) MCDS : Frames=%.0f : Precise=")+String(PRECISE2))
Return StackVertical(StackHorizontal(O,D),StackHorizontal(A,B))

# Return Clip Difference of input clips (amp==true = Amplified, show==true = show background)
Function ClipDelta(clip clip1,clip clip2,bool "amp",bool "show") {
    amp=Default(amp,false)
    show=Default(show,false)
    c2=clip1.levels(128-32,1.0,128+32,128-32,128+32).greyscale()
    c1=clip1.subtract(clip2)
    c1=(amp)?c1.levels(127,1.0,129,0,255):c1
    return (show)?c1.Merge(c2):c1
}

Function Sub(clip c,string Tit,Bool "ShowFrameNo",int "first_frame", int "last_frame",string "font",float "size",int "text_color",
    \ int "halo_color",int "align",int "spc",float "font_width",float "font_angle",Int "BackColor") {
    /*
        Stack Overhead Subtitle Text, with optional FrameNumber shown
        http://forum.doom9.org/showthread.php?p=1813402#post1813402
        Title bar is Round(size+2) pixels hi (default 20).
        Dont use align=4,5,6, better use 1,2,3,7,8,or 9.
    */
    ShowFrameNo=Default(ShowFrameNo,False)      first_frame=Default(first_frame,0)          last_frame=Default(last_frame,c.FrameCount-1)
    font=default(font,"Ariel")                  size=Default(size,18.0)                     text_color=Default(text_color,$00FFFF00)
    halo_color=Default(halo_color,$00000000)    align=default(align,7)                      spc=Default(spc,0)
    font_width=Default(font_width,0)            font_angle=Default(font_angle,0.0)          BackColor=Default(BackColor,$00000000)
    c.BlankClip(height=round(size+2.0),Color=BackColor)
    (ShowFrameNo)
        \ ? ScriptClip("""Subtitle(String(current_frame,"%.0f] ")+"""+Chr(34)+Tit+Chr(34)+String(first_frame,",first_frame=%.0f")+
        \       String(last_frame,",last_frame=%.0f,font=")+Chr(34)+font+Chr(34)+String(size,",size=%.3f")+String(text_color,",text_color=%.0f")+
        \       String(halo_color,",halo_color=%.0f")+String(align,",align=%.0f")+String(spc,",spc=%.0f")+String(font_width,",font_width=%.3f")+
        \       String(font_angle,",font_angle=%.3f)"))
        \ : Subtitle(Tit,first_frame=first_frame,last_frame=last_frame,font=font,size=size,text_color=text_color,halo_color=halo_color,align=align,
        \       spc=spc,font_width=font_width,font_angle=font_angle)
    Return StackVertical(c).AudioDubEx(c)
}
EDIT: Above updated, tested for non crash.
EDIT: Oops, fixed bug.

__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd November 2017 at 16:37.
StainlessS is offline   Reply With Quote