PDA

View Full Version : Morgan MJPEG captures truly in YV12?


Boulder
25th September 2003, 10:40
I've been suspecting that the latest Morgan MJPEG beta codec doesn't capture in YV12 after all. I did a test in VDubMod, capturing a 60 second sample clip in both YUY2 and YV12 formats. However, when I checked the resulting video file sizes, they were almost identical. Shouldn't YV12 yield smaller files or is there something wrong with my setup?

Also when I opened the clips with AVISource, the colorspace was YV12 in both cases. Therefore I'm suspecting that the codec captures in YUY2 and simply converts to YV12, making YV12 captures pretty much useless.

I'll post this to the Morgan Multimedia board too, not that I expect them to answer but anyway.

sprit
25th September 2003, 18:21
Which subsampling are you using in Morgan?

Using VD in fast recompress I tried compressing avisynth 2.52's version() in YUY2 and YV12 with Morgan 3.11 (force q=90):


Colorspace Subsampling Size [bytes]
YUY2 4:2:2 3 930 112
YUY2 4:1:1 3 774 464
YV12 4:2:2 3 903 488
YV12 4:1:1 3 774 464

My guesses from this:

1. When using 4:1:1 the YUY2 is subsampled to 4:1:1 on compression, i.e. converted to YV12, thus the same size.
2. When using 4:2:2 the YV12 is supsampled(upsampled?) to 4:2:2 on compression. As this results in (practically) a somewhat smoothed version of the YUY2 clip, the sizes differs a small amount (using YV12+4:2:2 actually compresses more data in the MJPEG than the codec is fed).


As to why both clips are is YV12, my understanding of windows, avi, avisynth, ... is that avisynth asks for YV12 first and as Morgan knows that colorspace, that's what the clips are delivered as.
I tried getting my clips "native" colorspace, but neither VD's info dialog nor GSpot nor ffdshow shows the prefered input colorspace (i.e. codec output cs).

Boulder
25th September 2003, 19:59
An interesting point, I'll have to experiment with this myself. I don't remember which subsampling I used, but most likely it was 4:1:1.

Funny thing is that I tried MarcFD's VBLE codec (lossless YV12 codec) and multiplying the datarate with compression rate gave me ~20000kB/s instead of ~16000kB/s as VDubMod told it would require as uncompressed YV12 data. The value I got is the amount that YUY2 data would require:confused: