GNOME Bugzilla – Bug 588535
Elements need special handling of interlaced planar YUV formats with vertical subsampling
Last modified: 2013-09-18 16:47:10 UTC
Hi, currently most/all elements handle interlaced I420 the same way as progressive I420. This is wrong as it would imply that only the luma plane is interlaced and the chroma planes are not. Also mpeg2dec outputs something different. The layout of interlaced I420 is like the following (a1 is first line of first field, b1 is first line of second field): luma: chroma r: chroma b: a1a1a1a1a1a1 a1a1a1 a1a1a1 b1b1b1b1b1b1 b1b1b1 b1b1b1 a2a2a2a2a2a2 b1b1b1b1b1b1 ffmpegcolorspace and videoscale just need to handle interlaced I420 as if it's I420 with twice the width and half the height, other elements might need something else.
Actually it's not enough to handle it exactly like twice width & half height because of the rowstride
This also affects NV12, NV21, YV12, YUV9, YVU9, i.e. all YUV formats with vertical subsampling.
First start: commit c1a25d2ce76bff3e7828c984c103b6411c6d4add Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Mon Feb 4 15:01:10 2013 +0100 video-format: fix interlaced 4:2:0 and 4:1:0 pack/unpack For interlaced vertically subsampled images we need to combine alternating chroma lines with alternating luma lines. That is line 0 and 2 are combined with the first line of chroma samples and line 1 and 3 with the second line of chroma samples. See also: https://bugzilla.gnome.org/show_bug.cgi?id=588535
commit 599880ff8d5d5f1535666622c7d5983c3c5510aa Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Mon Feb 4 15:40:02 2013 +0100 videoconvert: make fast path interlaced aware Make sure that we also handle interlacing when choosing the fast path. See https://bugzilla.gnome.org/show_bug.cgi?id=588535
commit 0085a77919875cc34efe990fc0a0d6dfa3157689 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Tue Feb 5 10:46:50 2013 +0100 videoscale: scale each field in interlace mode When we are dealing with interlaced content, scale each field intependently so that we don't destroy the interlacing. See https://bugzilla.gnome.org/show_bug.cgi?id=588535
Should be fixed now for the things you describe but I'm not sure about the special DV 4:1:0 chroma siting yet.
So let's close this or keep it open?
Let's close it then