After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588535 - Elements need special handling of interlaced planar YUV formats with vertical subsampling
Elements need special handling of interlaced planar YUV formats with vertical...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.1.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 588761 589242
Blocks:
 
 
Reported: 2009-07-14 12:29 UTC by Sebastian Dröge (slomo)
Modified: 2013-09-18 16:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2009-07-14 12:29:24 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.
Comment 1 Sebastian Dröge (slomo) 2009-07-16 14:51:35 UTC
Actually it's not enough to handle it exactly like twice width & half height because of the rowstride
Comment 2 Sebastian Dröge (slomo) 2009-07-21 12:47:58 UTC
This also affects NV12, NV21, YV12, YUV9, YVU9, i.e. all YUV formats with vertical subsampling.
Comment 3 Wim Taymans 2013-02-04 14:07:18 UTC
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
Comment 4 Wim Taymans 2013-02-04 14:51:21 UTC
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
Comment 5 Wim Taymans 2013-02-05 09:54:25 UTC
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
Comment 6 Wim Taymans 2013-04-05 08:26:10 UTC
Should be fixed now for the things you describe but I'm not sure about the special DV 4:1:0 chroma siting yet.
Comment 7 Sebastian Dröge (slomo) 2013-07-17 12:31:13 UTC
So let's close this or keep it open?
Comment 8 Sebastian Dröge (slomo) 2013-09-12 10:40:10 UTC
Let's close it then