summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-02-02 11:02:02 +0100
committerStéphane Cerveau <scerveau@collabora.com>2021-06-14 11:05:45 +0200
commita71ec17cf0f966335fe6904399202722460c182d (patch)
tree1c1d411a4768481d6b4490c8f24448d5664b809d /gst
parenta63539b213f340aea82bc496641f1d5e553eb64e (diff)
downloadgstreamer-plugins-bad-a71ec17cf0f966335fe6904399202722460c182d.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2321>
Diffstat (limited to 'gst')
-rw-r--r--gst/videoparsers/gstjpeg2000parse.c9
1 files changed, 7 insertions, 2 deletions
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;