VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Hi, I have recently acquired an anime Blu-Ray which is interlaced. When using standard deinterlacing I get blended frames such as this.

    Image
    [Attachment 83343 - Click to enlarge]


    Digging deeper and looking at the individual interlace fields I can see that the chroma bleed/ghosting is present in each field.

    Image
    [Attachment 83344 - Click to enlarge]


    Is there a script/tool/plugin which can detect these "bad" frames and replace them with good ones?
    I already tried multiple filters in Vapoursynth/Avisynth but didn't get any good results.
    Thank you in advance for your help!

    Sample file:
    https://www.mediafire.com/file/ax9y1mgp2ymt1ej/sample.mkv/file
    Quote Quote  
  2. see this post from feisty2

    http://forum.doom9.org/showthread.php?p=1692414#post1692414

    Code:
    DGSource("sample.dgi")
    
    luma = tfm(pp=0, slow=2)
    chroma = vinverse().Srestore(omode="PP3", cache=10)
    #manual sync: figure out which frame (previous,current aka p,c) of 'chroma' clip is most similar to current frame of 'luma' clip
    
    # 46*log(|x-y|+1) uses the full [0,255]-range and scales little differences better than |x-y|*2
    diffp = mt_lutxy(luma,chroma.selectevery(1,-1),"x y - abs 1 + log 46 *")
    diffc = mt_lutxy(luma,chroma, "x y - abs 1 + log 46 *")
    
    # average difference between compared frames
    mp = mt_lutf(diffp,diffp,"avg",expr="x")
    mc = mt_lutf(diffc,diffc,"avg",expr="x")
    
    # build conditional masks based on the caculated comparisons
    maskp = mt_lutxy(mp,mc,"x y < 255 0 ?")
    
    # finally merge the luma of the tfm with the chroma of the srestore clip accordingly to the binary mask
    MergeChroma(luma,chroma).mt_merge(chroma.selectevery(1,-1),maskp,luma=true,Y=2,U=3,V=3)  
    
    TDecimate()
    Image Attached Files
    Quote Quote  
  3. Originally Posted by poisondeathray View Post
    see this post from feisty2

    http://forum.doom9.org/showthread.php?p=1692414#post1692414

    Code:
    DGSource("sample.dgi")
    
    luma = tfm(pp=0, slow=2)
    chroma = vinverse().Srestore(omode="PP3", cache=10)
    #manual sync: figure out which frame (previous,current aka p,c) of 'chroma' clip is most similar to current frame of 'luma' clip
    
    # 46*log(|x-y|+1) uses the full [0,255]-range and scales little differences better than |x-y|*2
    diffp = mt_lutxy(luma,chroma.selectevery(1,-1),"x y - abs 1 + log 46 *")
    diffc = mt_lutxy(luma,chroma, "x y - abs 1 + log 46 *")
    
    # average difference between compared frames
    mp = mt_lutf(diffp,diffp,"avg",expr="x")
    mc = mt_lutf(diffc,diffc,"avg",expr="x")
    
    # build conditional masks based on the caculated comparisons
    maskp = mt_lutxy(mp,mc,"x y < 255 0 ?")
    
    # finally merge the luma of the tfm with the chroma of the srestore clip accordingly to the binary mask
    MergeChroma(luma,chroma).mt_merge(chroma.selectevery(1,-1),maskp,luma=true,Y=2,U=3,V=3)  
    
    TDecimate()
    Thank you for sharing your code. The video you sent looks perfect!
    I got hung up on Srestore error: "I don't know what AvsPlusVersionNumber means."
    I downloaded this Universal Pack which thankfully worked flawlessly and fixed the issue!
    Thank you once again!
    Last edited by Maguku1738; 6th Nov 2024 at 08:50. Reason: Found solution for problem I was having.
    Quote Quote  



Similar Threads

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