Log in

View Full Version : Need a DV-Decoder which does NO chroma upsampling. I need plain YUV420.


scharfis_brain
23rd September 2004, 19:06
all DV-Codecs I've tried so far, are either limited to RGB24 or to YUY2 & RGB24, but no DV-Decoder did output the Chroma as-it-is.

but fortunately they do their upsampling in a very stupid way, so I can extract the YUV420 mostly lossless (I hope so).

but I saw another weirdness:
the chroma sometimes crosstalks between two fields (not much noticeable during playback, but annoying at freezed frames)
maybe this is caused of the codec internal chroma upsampling.

so I repeat my question:
Is there a DV-Decoder, that does NOT thouch the YUV420 chroma?

communist
23rd September 2004, 19:17
Not sure but have you tried ffdshows DV decoder?
According to Info() (after DirectShowSource("blah.avi",25) )it outputs YV12.

scharfis_brain
23rd September 2004, 21:30
tried that.
it returns yuy2 here. :(

erratic
23rd September 2004, 22:18
Is YV12 output enabled in the ffdshow configuration?

Here it returns YV12 both with DirectShowSource (ffdshow DirectShow configuration) and AviSource (ffdshow VFW Configuration). If YV12 output is disabled it returns YUY2.

scharfis_brain
24th September 2004, 05:37
thanks! it does work now!

I have to use AVISource for previewving and directshowsource for processing (better chroma upsampling & deinterlacing for deshaking), cause directshowsource is very slow, when seeking through the file.

oo_void
5th October 2004, 18:09
Question, which version of ffdshow are you using?

Based on this thread, I thought I give it a try getting YV12 out of my DV source files. For the most part it works, save that the chroma appears to lag one field behind the luma in high action shots (think laser beams from the Star Wars movies). Am I missing something buried in the gazzilion or so options in ffdshow, or is the version I'm using, ffdshow-20041003, completely borked? Anyways ...

------
oo_void

Wilbert
6th October 2004, 11:56
Is there a DV-Decoder, that does NOT thouch the YUV420 chroma?
Question, how do you propose to upsample this? Cause, if you use ConvertToYUY2, I think you will get messed up chroma (perhaps that's the problem oo_void sees).

communist
6th October 2004, 12:02
Originally posted by oo_void
is the version I'm using, ffdshow-20041003, completely borked?
Works fine here with that version. Make sure you have YV12 as output colorspace selected as mentioned above.

Mug Funky
6th October 2004, 14:35
oo_void: that's how YV12 sampling works unfortunately. the problem is there when you have interlaced YV12 and go "converttoyuy2()", but if you go "converttoyuy2(interlaced=true)" you'll find the problem is gone (unless something really is b0rked). it's not a problem so long as all your YV12 filters are interlace-aware, so they know how to handle the chroma.

it's because chroma is only sampled every other line, not every line, whereas interlace patterns occur every line.

oo_void
6th October 2004, 17:57
Maybe I'm missing something more fundamental here... I'm using AviSynth, importing a DirectShow source that reports itself as being YV12 though info() (so at least we know that is working). I first noticed the issue when attempting to IVTC some footage with Telecide. But, even if I remove all filters from the AviSynth chain, leaving me with just the import statment, I'm still seeing problems with the Chroma being off a field. I'll try posting some examples tonight if the conversation continues ...

I can try toying around with a ConvertToYUY2() but doesn't that defeat the purpose of importing YV12 footage in the first place. Especially when I have to switch back to YV12 later on down the line for any Mask Tools work.

I'm *AM* previewing the footage in VirtualDubMod 1.50.x (Fast Recompress mode), and not the newer 1.60 version with true YV12 support, so is that the culprit? Or, is this just a case of me scrolling through footage at a field level and seeing things that normally wouldn't be an issue as during full speed playback?

With either case though, and should it be concluded that the source is not the issue, Telecide definately has problems with the source. Any recommendations on an IVTC plugin better suited for handling such input or is my input truely broken. Anyways ...

------
oo_void

Wilbert
6th October 2004, 20:03
@Mug Funky,

DV YV12 and MPEG2 YV12 are sampled differently:

http://forum.doom9.org/showthread.php?s=&threadid=82787

I'm not saying that this is related to oo_void's problem ...

oo_void
7th October 2004, 18:49
Here's a good example of what I've been referring to ...

http://www.badassgeek.com/7798.png

It's a raw, telecined frame served used ffdshow (fourcc DVSD). You'll noticed what appears to be the chroma channels
falling one field behind the luma. I won't embed them directly due to size, but here are some links to the four frame sequence.

Frame 7797 (http://www.badassgeek.com/7797.png)
Frame 7798 (http://www.badassgeek.com/7798.png)
Frame 7799 (http://www.badassgeek.com/7799.png)
Frame 7800 (http://www.badassgeek.com/7800.png)

The problem persists throughout the source, not just with this small segment ... This is just a good example because is offset is clearly evident. Because of the (perceived?) offset, there seems to be no way to move forward in IVTC'ing the source. I'm still new to this video mastering stuff, so If I'm just being stupid, don't be afraid to point that out ;). Additionally, I should probably stop being such a quality freak and move back to the YUY2 world.

------
oo_void

scharfis_brain
7th October 2004, 18:52
either your capping device (Cam, external Box) is doing this crap, or your decoder does.

could you provide those frames as non-altered DV-AVI file?

oo_void
7th October 2004, 19:45
4 frame sample DV file can be found here (http://www.badassgeek.com/sample.avi) ...

------
oo_void

scharfis_brain
7th October 2004, 19:52
It is decoded properly here.

both in Vdub and avisynth.

no chroma-delay.

change your DV-Decoder.

Mine is mainconcept canopus

oo_void
7th October 2004, 20:00
So, is the conclusion that ffdshow is b0rked then? The frame caps were taken using the ffdshow YV12 decoder (libavcodec)... Switching over to Canopus works fine for me also, but alas, it only returns YUY2 content (which is still better than RGB). I guess there's still no YV12 decoder ready for prime time yet.

------
oo_void

scharfis_brain
7th October 2004, 20:05
uhm? NTSC 4:1:1 as direct YV12?

this must happen like this!

YV12 is assumed as 2x2 Pixels (like PAL-DV and DVD)

but NTSC-DV is 1x4 Pixels, which causes confusion, when trying to display YUV411

oo_void
7th October 2004, 20:21
Doh, that makes sense... I said don't be afraid to point that out if I'm just being stupid :D

------
oo_void