View Single Post
Old 29th August 2016, 21:46   #5  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by FranceBB View Post
@chidragon... exactly.
Interlaced source encoded as progressive, with the chroma expanded between fields. There isn't much you can do to fix it...
this code can (in most frames)

Code:
MPEG2Source("hhws_ep37.d2v")
orig = last
sanimebob()
chroma_rep(10)
getparity(orig) ? interlaced60or50 : interlaced60or50(bff=true)
FrameCache(10)

# next lines from http://forum.doom9.org/showpost.php?...50&postcount=6 with some edit

luma   = AnimeIVTC(1,chroma=false,mchroma=false,o3025cfr=true)
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
mt_merge(luma,chroma.selectevery(1,-1),maskp,luma=true,Y=2,U=3,V=3)

tdecimate(1)
smam(filter=daa3mod())
The result http://www.solidfiles.com/v/RqQ2WmWMLq3Gk
__________________
See My Avisynth Stuff

Last edited by real.finder; 9th April 2019 at 06:31.
real.finder is offline   Reply With Quote