deinterlace: greedyh: Use _plane in _packed, fix planar formats
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Thu, 24 Feb 2022 16:36:40 +0000 (17:36 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 25 Feb 2022 12:06:55 +0000 (12:06 +0000)
commitdc1ae0aaa0e750dd576f33ac93c1faec5580c08e
tree29dbab52bd826519ae50b719901d8d9fae8c5133
parent625cbcf70a77f2022d18f524c78727b63c396638
deinterlace: greedyh: Use _plane in _packed, fix planar formats

This greatly reduces code duplication. It also exposed the cause for
planar formats not being properly deinterlaced:

The planar path was missing the initial offset adjustment that the
packed path did to `L2` and `L2P` in the case of an even field, which
caused it to select the wrong weave lines every other field.

Add those offsets in `_plane`.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1047
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1790>
subprojects/gst-plugins-good/gst/deinterlace/tvtime/greedyh.c