GNOME Bugzilla – Bug 334822
[ffmpegcolorspace] YVU9 support
Last modified: 2006-03-23 09:39:16 UTC
GStreamer should be able to play video of AVI files with fourcc YVU9 (like YUV9 but with U and V swapped: components Cr and Cb are sub-sampled)
Created attachment 61402 [details] [review] Patch for support of YVU9 AVI files
Do you have a sample file for that? (feel free to e-mail it) Also, I must say I'm a bit suspicious about those strides changes. I'd prefer it if they were as minimal as possible and as separate from other formats as possible - those have bitten us quite a bit in the past (we need a better system for this to ensure the same implicit strides are used everywhere, but as long as we don't, surgical changes seem prudent).
Well, the new code is copied'n'pasted from above, so it should be tested enough. And, according to some quick calculations I've made, the new code is equivalent to the old one if x_chroma_shift and y_chroma_shift are 1 (which is the case of PIX_FMT_YVU420P). ROUND_UP_X (height, 1) is the same as GST_ROUND_UP_2 (height) DIV_ROUND_UP_X (height, 1) is the same as GST_ROUND_UP_2 (height) / 2 GST_ROUND_UP_4 (DIV_ROUND_UP_X (width, 1)) should be the same as GST_ROUND_UP_8 (GST_ROUND_UP_4 (width)) / 2 in all cases (at least if my calculations are not wrong) The file is large, 7,8 MB. It compresses well, but even with bz2 it is 3,8 MB. I sent you the file, if it doesn't arrive please tell me
Patch by: Fabrizio Gennari <fabrizio dot ge at tiscali dot it> * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps), (gst_riff_create_video_template_caps): * gst/ffmpegcolorspace/avcodec.h: * gst/ffmpegcolorspace/gstffmpegcodecmap.c: (gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_pixfmt), (gst_ffmpegcsp_avpicture_fill): * gst/ffmpegcolorspace/imgconvert.c: Patch for support of YVU9 AVI files (#334822)