Weird "shadowing" problem- help please?

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Chaobunny12
Joined: Tue Jul 04, 2006 7:41 am
Org Profile

Weird "shadowing" problem- help please?

Post by Chaobunny12 » Wed Jun 02, 2010 9:10 pm

I'm not sure how else to describe it...I'm getting weird "shadowing" images in one of my Avatar DVDs. One frame leaves a few remnant pixels in the next, and I can't figure it out. It's weird, because this hasn't happened with any of the other DVDs o__O All I can think of is that it must be an interlacing thing, but the interlacing is gone and only the "shadowing" from the other frames remain.

Here's an example:

Image
Image

Here are the two scripts I've tried. Both have removed the regular interlacing but NOT the shadowing.

Code: Select all

mpeg2Source("filepath")
Telecide(order=1, guide=1)
Decimate(cycle=5, mode=2)
ConvertToRGB32()

Code: Select all

Loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
mpeg2source("filepath")
TFM(order=-1, field=-1, mode=5, PP=7, slow=2)
tdecimate()
Does anyone have any idea what might have caused this or how to fix it?

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Weird "shadowing" problem- help please?

Post by mirkosp » Thu Jun 03, 2010 3:25 am

Putting aside the obligatory suggestion of dropping vdubmod in favor of plain vdub, and not minding the fact that it looks like you're upscaling for some reason, I'd say that ghosting effect is already part of the sourcen and as such can't be get taken care of by just IVTCing. I suggest the use of a temporal denoiser to get rid of it. TTempSmoothF or a two stage FFT3DFilter could do.
Image

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Scintilla » Thu Jun 03, 2010 6:25 am

I knew those screencaps looked awfully familiar.

I know I suggested FFT3DFilter that time; did it work?
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

User avatar
Chaobunny12
Joined: Tue Jul 04, 2006 7:41 am
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Chaobunny12 » Thu Jun 03, 2010 8:09 am

Yeah, the screencaps are actually old; I was too lazy to make new ones. xD But they illustrate the same problems I'm having right now. I'm currently using Virtualdub, not virtualdubmod, and I'm not upscaling. But the problem remains. The FFT3DFilter filter didn't work the last time- it could be that I just don't know how to use it.

If you want, I can post updated screencaps.

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Mister Hatt » Thu Jun 03, 2010 9:05 am

Please post three sequential frames, one of them being the one with the issue, the others being the frame before it where the 'ghost' is coming from and the final one being the frame after it. Full image links please, not inside vdub. You can select a section in vdub and output as a PNG image sequence if you're unsure how to do this.

User avatar
Chaobunny12
Joined: Tue Jul 04, 2006 7:41 am
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Chaobunny12 » Thu Jun 03, 2010 11:22 am

Image

Image

Image

Image

Image

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Mister Hatt » Thu Jun 03, 2010 11:11 pm

Looks like the high contrast parts of the previous frame's luma field are being ghosted over. If that's part of the source, there isn't much you can do. If it isn't, then mirko's suggestion is pretty solid. Assuming it's in the source, the way to get rid of it is masking the pixels and then interpolating them against the rest of the frame. I would first try IVTCing it in YATTA just to make sure it really is in the source and not just a poor ripping job, and if it is, then using mt_edge() to mask the contrast differences and compare them temporally; if they match lines in the previous frame, then add them to the mask, otherwise discard. Then apply nnedi2 to the entire picture on a single field and take a difference mask with the output and the original, and then just apply the difference against the original mask over your image. That sounds more complicated than I intended it to but it's still quite a bit of annoying masktools2 work.

EDIT: On second thoughts, can you take your source and do a separatefields().selecteven() on it? See if the frames are still bad like that, if so, try selectodd() instead. Assuming that only one of those is bad, it would imply that only a single set of fields are damaged, in which case I have an idea. If not, you're either going to have to freezeframe the shit out of it, photoshop it (yes really, insertsign() with imagesource("somepng", pixel_type="RGB32") is going to be your friend), or otherwise do some extensive work with mt_edge and mt_makediff.

Assuming it is only one bad field though, find out which one it is, and then see how this goes:

Code: Select all

clean = nnedi2(field=whicheveroneisgood)
amask = mt_makediff(clean, original)
mt_adddiff(amask)
Not sure if that is really the best way to do it, possibly differential contrablurring would be better, but I think I'm at the point where I would just lol at how bad the Avatar DVD's were, apparently even the Darkhold legends of old had a lot of issues with it and mostly just gave up on ever fixing it. Avatar is somewhat notoriously badly mastered it seems.

User avatar
Chaobunny12
Joined: Tue Jul 04, 2006 7:41 am
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Chaobunny12 » Fri Jun 04, 2010 12:03 pm

Mister Hatt wrote:Assuming it is only one bad field though, find out which one it is, and then see how this goes:

Code: Select all

clean = nnedi2(field=whicheveroneisgood)
amask = mt_makediff(clean, original)
mt_adddiff(amask)
Okay, just one quick question. I did the field thing and found out that the even fields are the ones with the problem, but when I try and enter that script with (field=odd), Avisynth gives me the error "I don't know what 'odd' means"

Am I entering it the wrong way?

User avatar
Chaobunny12
Joined: Tue Jul 04, 2006 7:41 am
Org Profile

Re: Weird "shadowing" problem- help please?

Post by Chaobunny12 » Fri Jun 04, 2010 12:10 pm

Ok, I figured out that I need to enter numbers for that code line and the next one, but which ones should I enter? The even fields are the problematic ones.

Just entering random numbers is giving me severe color distortion since I don't know what I'm doing. ^^;;

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Weird "shadowing" problem- help please?

Post by mirkosp » Fri Jun 04, 2010 2:07 pm

field -

Controls the mode of operation (double vs same rate) and which field is kept.
Possible settings:

-2 = double rate (alternates each frame), uses avisynth's internal parity value to start
-1 = same rate, uses avisynth's internal parity value
0 = same rate, keep bottom field
1 = same rate, keep top field
2 = double rate (alternates each frame), starts with bottom
3 = double rate (alternates each frame), starts with top

If field is set to -1, then nnedi2 calls child->GetParity(0) during initialization.
If it returns true, then field is set to 1. If it returns false, then field is set to 0.
If field is set to -2, then the same thing happens, but instead of setting field to 1
or 0 it is set to 3 or 2.

Default: -1 (int)
I think the clean ones in your case should be the top ones, but in case you still get garbage, then I guess they were the bottom. :uhoh:
Image

Locked

Return to “AviSynth Help”