jpegdec: be stricter when detecting interlaced video
authorMichael Olbrich <m.olbrich@pengutronix.de>
Mon, 31 Aug 2020 14:38:48 +0000 (16:38 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 26 May 2023 00:04:02 +0000 (01:04 +0100)
commitc83f24b0388ac3272167f2033008f979c0be8e27
tree4b8a696c4381341e821290ca7b0c3fc59ddae35d
parentb4330c730b66d280d5e7403b9be0d651db12f62d
jpegdec: be stricter when detecting interlaced video

There are broken(?) mjpeg videos that are incorrectly detected as
interlaced. This happens because 'info.height > height' (e.g. 1088 > 1080).

In the interlaced case info.height is approximately 'height * 2' but not
exactly because height is a multiple of DCTSIZE. Make the check more
restrictive but take the rounding effect into account.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4717>
subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c