From a71ec17cf0f966335fe6904399202722460c182d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 2 Feb 2021 11:02:02 +0100 Subject: jpeg2000parse, openjpeg: add support for YCrCb 4:1:1 sampling Add YCrCb 4:1:1 support in openjpeg elements and fix in jpeg2000parse the YCrCb 4:1:0 support Part-of: --- gst/videoparsers/gstjpeg2000parse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gst/videoparsers') diff --git a/gst/videoparsers/gstjpeg2000parse.c b/gst/videoparsers/gstjpeg2000parse.c index 3ba035831..bf3f3810a 100644 --- a/gst/videoparsers/gstjpeg2000parse.c +++ b/gst/videoparsers/gstjpeg2000parse.c @@ -69,9 +69,12 @@ gst_jpeg2000_parse_get_subsampling (guint16 compno, } else if (sampling == GST_JPEG2000_SAMPLING_YBR420) { *dx = 2; *dy = 2; + } else if (sampling == GST_JPEG2000_SAMPLING_YBR411) { + *dx = 4; + *dy = 1; } else if (sampling == GST_JPEG2000_SAMPLING_YBR410) { *dx = 4; - *dy = 2; + *dy = 4; } } } @@ -648,7 +651,9 @@ gst_jpeg2000_parse_handle_frame (GstBaseParse * parse, parsed_sampling = GST_JPEG2000_SAMPLING_YBR444; } else if (dx[1] == 2 && dy[1] == 2) { parsed_sampling = GST_JPEG2000_SAMPLING_YBR420; - } else if (dx[1] == 4 && dy[1] == 2) { + } else if (dx[1] == 4 && dy[1] == 1) { + parsed_sampling = GST_JPEG2000_SAMPLING_YBR411; + } else if (dx[1] == 4 && dy[1] == 4) { parsed_sampling = GST_JPEG2000_SAMPLING_YBR410; } else if (dx[1] == 2 && dy[1] == 1) { parsed_sampling = GST_JPEG2000_SAMPLING_YBR422; -- cgit v1.2.1