VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. Member
    Join Date
    Jan 2003
    Location
    India
    Search Comp PM
    First the function-should work with 2.0 series as well as 2.5 series

    Function clean( clip clip, float c , float d ) {
    vid =converttorgb32(clip)
    vid1 =sharpen (vid,c)
    vid1 = sharpen (vid1,c)
    vid1 = layer (vid1,vid,"subtract",127)
    vid= layer (vid,vid1,"subtract",127)
    vid2 =blur (vid,d)
    vid2 = layer (vid,vid2,"subtract",127)
    vid= layer (vid,vid2,"subtract",127)
    convertbacktoyuy2(vid)
    return vid
    }

    usage

    clean (clip,float clean,float unsharpen)


    It can reduce
    1.blockiness
    2.jagged edges
    3.leftover lines after deinterlacing
    4.color blotches


    Have tried it with VCD files with blockiness and jagged edges, TV captures with blotches and some amount of mosquito type noise, DVD rips which had some interlace lines left over after trying deinterlace filters available with me (Greedy,virtualdub blend and field bob). Manages to reduce most of these defects considerably and is also fairly fast.

    Recommended values
    float clean 0.5 to 1
    float unsharpen 0.05 to 0.5

    Tweaking the function
    1. Change the return vid line in the function to
    return vid1-and load the avs in Virtualdub-if you see anything very sharp-the clean value is too high.Very blocky VCD videos might need the value 1, DVD rips should be OK with 0.5.
    2. The unsharpen value gives a kind of smoothing-0.25 is good standard choice.

    Anyway, Pl. try it out and let me have your suggestions for improving it.
    Quote Quote  
  2. Member
    Join Date
    Jan 2003
    Location
    India
    Search Comp PM
    I tried it with some more vids-in certain cases it fades colors-following modified function solves the problem- i have corrected my typo in the converbackto line.

    The following is a better clean function in the sense that loss of saturation is avoided

    Function clean( clip clip, float c , float d ,int e, int f) {
    vid =converttorgb32(clip)
    vid1 =sharpen (vid,c)
    vid1 = sharpen (vid1,c)
    vid1 = layer (vid1,vid,"subtract",128)
    vid= layer (vid,vid1,"subtract",e)
    vid2 =blur (vid,d)
    vid2 = layer (vid,vid2,"subtract",128)
    vid= layer (vid,vid2,"subtract",f)
    vid=convertbacktoyuy2(vid)
    return vid
    }

    usage-clean (clip , float clean, float unsharpen,int clean strength, int unsharpen strength)

    e.g.
    clean(0.5,0.5,64,64)

    range for values
    float clean 0 to 1
    float unsharpen 0 to 1
    int clean strength between 0 to 255- use 127 max-recommended 32-64
    int unsharpen strength between 0 to 255- use 127 max-recommended 32-64
    __________________
    Quote Quote  



Similar Threads

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