View Full Version : chroma blend?
Alcohor
2nd November 2008, 23:55
I all! :)
I'm trying to script an anime but the source has this problem
http://xs232.xs.to/xs232/08430/merda2190.png
this is obtained with a simple separatefields()... can i fix this?
here there's a sample http://www.mediafire.com/?x5wpi0x0duv
Thanks in advance!
neuron2
3rd November 2008, 00:09
Did you rip it from a DVD? If so, which DVD (title and region)? How did you rip it?
If not, what is the source and where did you get it?
Alcohor
3rd November 2008, 11:51
Did you rip it from a DVD? If so, which DVD (title and region)? How did you rip it?
This is the dvd NTSC R2j of Hokuto no Ken : Raoh Den Jun-ai no Shō Director's Cut.
For now I only do the IVTC with Yatta+Decomb, but I don't know the best way to remove this "blend".
It seems included in the source.
thetoof
3rd November 2008, 17:46
You have the same problem as RsVolcom and fleon in the AnimeIVTC thread. More info here (http://forum.doom9.org/showthread.php?p=1206130#post1206130).
To see the issue, check frame 482 & 483 after separatefields() and you'll notice that one contains the chroma of the other and vice-versa.
Unless someone else write a script to correct it, you'll have to wait for MOmonster to do it.
Alcohor
3rd November 2008, 18:36
Yes, you're right.
I'm trying freezeframe() for every bad frame but it's too boring :p
martino
3rd November 2008, 22:52
GreyScale()
Wait... was that bad as a joke? >_>
mikeytown2
4th November 2008, 00:06
Using this, it's quite easy to see where it messes up.
FFmpegSource("sample.demuxed.m2v")
norm = last.ChangeFPS(FrameRate*2)
TDeint(1)
bobed=last
dummyUV = BlankClip(last,width=width/2,height=height/2,color=$808080)
dummyY = BlankClip(last,color=$808080)
gray= YToUV(dummyUV,dummyUV,last)
v= YToUV(dummyUV,last.VToY(),dummyY)
u= YToUV(last.UToY(),dummyUV,dummyY)
uv= YToUV(last.UToY(),last.VToY(),dummyY)
full= YToUV(last.UToY(),last.VToY(),last)
i=32
UVchan=uv.levels(128-i,1,128+i,0,255)
StackVertical(StackHorizontal(UVchan,full),StackHorizontal(gray,norm))
Maybe if you do a detect scene change via Y/U/VDifferenceFromPrevious (http://avisynth.org/mediawiki/Internal_functions/Runtime_functions) you can easily detect when the Y and UV channels differ, and correct for it.
Alcohor
6th November 2008, 23:36
Maybe if you do a detect scene change via Y/U/VDifferenceFromPrevious (http://avisynth.org/mediawiki/Internal_functions/Runtime_functions) you can easily detect when the Y and UV channels differ, and correct for it.
This is very hard, for me :p
The regular edition has not this trouble... it's a good source : pulldown soft, no blocking and less expensive :devil:
mikeytown2
7th November 2008, 01:31
What to do once you have a bad change is up to you, but this code will allow you to see how the Runtime Functions works
FFmpegSource("sample.demuxed.m2v")
orginal = last
norm = last.ChangeFPS(FrameRate*2).BilinearResize(width/2,height/2)
Bob().BilinearResize(width/2,height/2)
bobed=last
dummyUV = BlankClip(last,width=width/2,height=height/2,color=$808080)
dummyY = BlankClip(last,color=$808080)
gray= YToUV(dummyUV,dummyUV,last).ScriptClip("""Subtitle("Y=" + String(YDifferenceFromPrevious), align=7)""")
v= YToUV(dummyUV,last.VToY(),dummyY)
u= YToUV(last.UToY(),dummyUV,dummyY)
uv= YToUV(last.UToY(),last.VToY(),dummyY).ScriptClip("""Subtitle("U=" + String(UDifferenceFromPrevious), align=4)
Subtitle("V=" + String(UDifferenceFromPrevious), align=1)""")
full= YToUV(last.UToY(),last.VToY(),last)
i=32
UVchan=uv.levels(128-i,1,128+i,0,255)
StackVertical(StackHorizontal(UVchan,full),StackHorizontal(gray,norm))
bobed=orginal.bob()
x = ScriptClip(bobed, """y = YDifferenceFromPrevious
u = UDifferenceFromPrevious
v = VDifferenceFromPrevious
(y > 30 && (u + v)/2.0 > 3) ? Subtitle("Scene Change OK") : (y > 30 && (u + v)/2.0 <= 3) ? Subtitle("Scene Change BAD") : bobed""")
StackHorizontal(last,x)
http://avisynth.org/mediawiki/ScriptClip
thetoof
7th November 2008, 02:12
The thing is... this problem is not necessarily present only in scene changes. Another option you have is to wait for the next release of AnimeIVTC now that MOmonster has posted a function to solve your issue (probably tomorrow night or saturday at last).
Alcohor
7th November 2008, 13:14
I'm trying the MOmonster's function, but there are still many bad frame. It's a good starting point.:)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.