Temporal chroma shift?

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Sereenie
Joined: Sat Jun 28, 2003 8:11 pm
Location: The City Fun Forgot
Org Profile

Temporal chroma shift?

Post by Sereenie » Sun Aug 19, 2007 12:19 pm

I had been working on deblending Utena footage (Software Sculptors, episodes 1-7) for quite a wile when I realised that what I thought was blending actually looked more like chroma shifting, except it happens from one frame to the next instead of within a single frame. In other words, the chroma seems to be one frame ahead from the luma (or the luma, one frame late from the chroma, depending on how you look at it). I first thought in the problem only appeared during high-motion sequences, but I now think it happens pretty much throughout.

Here is a low-action sequence example of what I mean. Keep in mind that those are three back-to-back frames,

Image


Image


Image

Look at the subs. First frame has them, and third frame doesn't. But the second one still has the luma with subs, but its chroma clearly comes from the third frame, without subs!

And it's even worse in action sequences. I made a clip (Huffy, about 24Mb) to show the problem in all its glory. Watch it frame-by-frame to get a better idea.

I tried various filters for deinterlacing and deblending, always ending up with the same result, so I doubt those processes are the cause. I haven't even bothered cleaning up the footage yet either (apart from cpu=6), because I feel it's useless to try it at this point. That will be a whole new can of worms. I'd rather tackle problems one at a time!

Here is my current script. Pretty bare, but as I said, I haven't really gotten into the cleaning up yet. I stuck with Leakkerneldeint for now, since it's so much faster (though I think Sangnom looks better).
MPEG2Source("G:\Utena\01-07\ep01.d2v",cpu=6)
Crop(6, 2, -26, -10)
#SangNom()
LeakKernelDeint(order=1, twoway=true)
Is this a known problem with that DVD? Or is it something I might have done in the ripping and indexing process? I haven't done it any differently than usual, but one never knows...

But most importantly, how do I correct that? I know how to correct chroma shift within a frame, but haven't found aything about doing it between frames...

Has anyone else had that problem? Any help will be appreciated.

Thanks!

S.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sun Aug 19, 2007 12:41 pm

Wow, that looks awful.
My Utena dvds don't ahve that problem, so I assume it's a problem caused by your script. Don't deinterlace utena, do IVTC.

User avatar
Sereenie
Joined: Sat Jun 28, 2003 8:11 pm
Location: The City Fun Forgot
Org Profile

Post by Sereenie » Sun Aug 19, 2007 5:13 pm

I tried that too, but ended up with more or less the same problem...

With script TFM(cthresh=4, slow=2).TDecimate(mode=1):

Image

With script tdeint(mode=1, order=1,type=3,full=false,ap=35,slow=2).mrestore(mlimit=1.6,ani=true,numr=2002,denm=5005,rr=10,dclip=last.crop(16,16,-16,-16)):

Image

With script leakkernelbob(1,4,true,true).mrestore(mlimit=1.6,ani=true,numr=2002,denm=5005,rr=10,dclip=last.crop(16,16,-16,-16)):

Image

And with the same script as in the first post:

Image

So I'm kind of stuck. I decided to deinterlace instead of IVTC when I saw my footage was half-blended in parts. Plus, it avoided that "interlaced chroma" problem you see in some examples above. Also, unlike with those IVTCd examples, the chroma shift is pretty much constant, instead of happeneing for one frame, every couple of frames, which would probably make it easier to solve.

The only thing I can think of is to separate the chroma and the luma in my script, then superimpose them back by starting the chroma one frame late. I'm not even sure it can be done. But if it can, then I think the deinterlacing script will be a better option, since the chroma isn't as messed up and the shift is mostly consistent...

What do you think?

S.

User avatar
Sereenie
Joined: Sat Jun 28, 2003 8:11 pm
Location: The City Fun Forgot
Org Profile

Post by Sereenie » Sun Aug 19, 2007 5:59 pm

Sorry for the double post, but I just noticed something: when I leave only the MPEG2Source line in my script, *all* frames are identified as keyframes, even those which are visibly interlaced. Could that have something to do with my problem?

S.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Sun Aug 19, 2007 7:11 pm

All frames are always keyframes in an avisynth script.

I dunno what to say about your problem though...

User avatar
Sereenie
Joined: Sat Jun 28, 2003 8:11 pm
Location: The City Fun Forgot
Org Profile

Post by Sereenie » Sun Aug 19, 2007 7:23 pm

Oh, good! I'd never noticed that before...

I'm still experimenting with my problem. BTW, do you know why everything blocks at frame #33400? I never noticed that limit before, and it's a bit annoying. It's really a minor problem, but I'd rather avoid splitting each episode in two, as that would have me recreate all my d2v files...

S.

Locked

Return to “AviSynth Help”