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 696737 - videoconvert: non-ideal conversion for interlaced video
videoconvert: non-ideal conversion for interlaced video
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-27 22:27 UTC by David Schleef
Modified: 2018-05-04 08:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (9.36 KB, patch)
2013-03-27 22:27 UTC, David Schleef
none Details | Review

Description David Schleef 2013-03-27 22:27:53 UTC
Created attachment 239996 [details] [review]
patch

Videoconvert allows changes to vertical subsampling for interlaced video.  Although the resampling kernels have improved recently, they are not ideal if the next element is a deinterlacer or ivtc.  Patch adds a flag to disable this conversion if trying to construct a high-quality pipeline.
Comment 1 Sebastian Dröge (slomo) 2013-04-04 09:16:57 UTC
I would make that a GFlags property that also could later have things like disabling colorspace conversion or depth conversion or ...
Comment 2 David Schleef 2013-04-04 19:51:19 UTC
That's what Wim suggested, too.  That seems like a lot of work (and bugs!), but I think it's the right way to go in general.
Comment 3 Sebastian Dröge (slomo) 2013-08-16 09:59:02 UTC
Are you working on that David? Or Wim?
Comment 4 Wim Taymans 2013-08-16 10:46:07 UTC
I think this mostly fixed it:

commit 33a54ba4f3b679952d1be7afa9ed3863d0f4fcd5
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Thu Mar 28 18:13:10 2013 +0100

    videoconvert: be smarter when selecting a conversion
    
    Try to select the conversion that would result in the minimal amount of quality
    loss. Quality loss is calculated rather arbitrarily but it avoids doing
    something really stupid in most cases.
Comment 5 Baby octopus 2015-01-03 06:06:18 UTC
Hi, Can this be closed if it is fixed?
Comment 6 Tim-Philipp Müller 2015-01-03 12:35:33 UTC
The operative word was 'mostly' :)

However, this may be fixed now after all the videoconvert/scale rework.

Wim, anything left to to here?

----

commit e2a693656b1a8513adab5e8f7698758c583c8eed
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Dec 3 10:15:18 2014 +0100

    video-converter: fix chroma resampling check
    
    Decide if we need chroma resampling by checking if we have a progressive
    or interlaced chroma resampler.

commit b9bee1af8c6721902de15410caa4dc382baaf180
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Fri Nov 21 16:06:54 2014 +0100

    video-converter: handle mixed interlaced
    
    When dealing with mixed interlaced, setup a scaler and chroma-resampler
    for both interlaced and progressive frames and switch between them
    depending on the interlace mode of the input frame.

commit f6683b8f145a8f774b642df37e26c979a938d025
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Nov 19 12:41:21 2014 +0100

    video-info: add a note about subsampled formats
    
    Add a note about gst_video_info_set_format() and interlaced formats.

commit 24989b53fc5ec1f4d95eecdde507e455b19d0a14
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Nov 19 12:05:02 2014 +0100

    video-info: handle interlaced size correctly
    
    Refactor GstVideoInfo init, make function to set default colorimetry.
    Call fill_planes after we configure the GstVideoInfo with parameters
    from the caps.
    The size of the chroma planes for interlaced vertically subsampled
    formats needs to be rounded up to 2, we have 2 fields with each
    the same anount of chroma lines.

commit 5c043f3d50436d5c5a38e94ca7f3066a7a9cfdc0
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Nov 19 09:40:05 2014 +0100

    video-format: handle unpack interlaced subsampled formats
    
    For interlaced vertically subsampled formats the check for even lines
    needs to take into account the two fields.

commit 588fdeb8349cf5fbb37e63f403c5559071283c07
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Nov 19 09:39:32 2014 +0100

    video-scaler: fix interlaced shift

commit ac756ba0d9f947ea24f94ffeef61bbf71c91f82f
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Nov 19 09:30:14 2014 +0100

    video-converter: keep a small backlog of lines
    
    Allow lines to jump backwards slightly, usefull for interlaced content.

commit b9114347164684137dc0ca11ee12cd099794cadf
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Wed Nov 19 09:28:52 2014 +0100

    video-chroma: Fix interlaced chroma resampling
    
    Use the interlaced flag to select the right resampler.

commit 7d0cef3bcbb1f2ad913903c44575c6f472a9b48e
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Tue Nov 18 16:35:13 2014 +0100

    video-scaler: fix interlacing some more
    
    Use the right phase.
    Take the right lines from interlaced content.

commit d03bad77618a122305e87049daeba3e4eea7645a
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Tue Nov 18 11:06:20 2014 +0100

    video-scaler: fix interlaced taps setup

commit 67a4702b194c899e65fbabe11825759057538f74
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Tue Nov 4 11:02:49 2014 +0100

    video-scaler: fix taps in interlaced mode

commit 562416bb943cee713de57c8c3c4e98cded5e114b
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Tue Nov 4 11:01:52 2014 +0100

    video-scaler: fix phases in interlaced mode

commit 45462d2ea4a5bbbdec02cd0c4c3a35eb2f0f48c8
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Sat Nov 1 12:58:01 2014 +0100

    video-scaler: handle 4tap interlaced

commit 199fab4b067d12157cc37fc84ebded71b778239f
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Fri Oct 24 15:25:33 2014 +0200

    video-scaler: add video scaler helper object
    
    Add a video scaler object build on top of the resampler. It has
    implementation to deal with interlaced video as well as horizontal and
    vertical scaling functions.

commit 549bdd4ece277289e50b658f3b1833fed26f389f
Author: Wim Taymans <wtaymans@redhat.com>
Date:   Fri Oct 24 12:11:43 2014 +0200

    video-converter: rework the generic converter function
    
    Use a LineCache object to track and process lines between unpack,
    upsample, convert, downsample and pack stages. This simplifies the
    main core processing function a lot and allows for future additions
    easily.
    
    Add support for interlaced formats in chroma up and downsampling.
Comment 7 Edward Hervey 2018-05-04 08:44:07 UTC
this has not received any response in 3 years. Closing. If the issue can be confirmed on master please re-open.