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 766383 - v4l2object: fill colorimetry in gst_v4l2_object_acquire_format
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.8.1
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-13 15:52 UTC by Philipp Zabel
Modified: 2016-06-06 21:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format (2.58 KB, patch)
2016-05-13 15:52 UTC, Philipp Zabel
needs-work Details | Review
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format (2.58 KB, patch)
2016-05-13 16:11 UTC, Philipp Zabel
none Details | Review
v4l2object: refactor gst_v4l2_object_get_colorspace to take a v4l2_format parameter (5.42 KB, patch)
2016-05-18 08:50 UTC, Philipp Zabel
committed Details | Review
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format (1010 bytes, patch)
2016-05-18 08:51 UTC, Philipp Zabel
committed Details | Review

Description Philipp Zabel 2016-05-13 15:52:35 UTC
Created attachment 327801 [details] [review]
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format

Instead of relying on the default colorimetry chosen by gst_video_info_set_format(), set info.colorimetry from the values returned by G_FMT. This allows decoders to propagate their input colorimetry downstream.
Comment 1 Philipp Zabel 2016-05-13 16:11:57 UTC
Created attachment 327806 [details] [review]
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format
Comment 2 Nicolas Dufresne (ndufresne) 2016-05-14 09:23:45 UTC
Review of attachment 327801 [details] [review]:

::: sys/v4l2/gstv4l2object.c
@@ +3714,3 @@
+      if (is_rgb)
+        info.colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_RGB;
+  }

That's a copy paste, don't.
Comment 3 Nicolas Dufresne (ndufresne) 2016-05-14 09:24:26 UTC
Review of attachment 327806 [details] [review]:

::: sys/v4l2/gstv4l2object.c
@@ +3714,3 @@
+      if (is_rgb)
+        info->colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_RGB;
+  }

That's copy paste, don't.
Comment 4 Philipp Zabel 2016-05-17 10:35:25 UTC
As in "don't copy&paste, refactor and reuse instead", or as in "don't set the colorimetry matrix here"?
Comment 5 Nicolas Dufresne (ndufresne) 2016-05-17 16:47:40 UTC
(In reply to Philipp Zabel from comment #4)
> As in "don't copy&paste, refactor and reuse instead", or as in "don't set
> the colorimetry matrix here"?

I mean, this patch should first refactor, and use the newly create helper function.
Comment 6 Philipp Zabel 2016-05-18 08:50:19 UTC
Created attachment 328121 [details] [review]
v4l2object: refactor gst_v4l2_object_get_colorspace to take a v4l2_format parameter

Move the extraction of colorimetry parameters from struct v4l2_format and the
setting of the identity matrix for RGB formats into the function to avoid code
duplication.
Comment 7 Philipp Zabel 2016-05-18 08:51:28 UTC
Created attachment 328122 [details] [review]
v4l2object: fill colorimetry in gst_v4l2_object_acquire_format

Instead of relying on the default colorimetry chosen by gst_video_info_set_format(), set info.colorimetry from the values returned by G_FMT. This allows decoders to propagate their input colorimetry downstream.
Comment 8 Nicolas Dufresne (ndufresne) 2016-05-18 11:32:42 UTC
Thanks, I'll review soon.
Comment 9 Nicolas Dufresne (ndufresne) 2016-06-06 21:39:08 UTC
All looks good now, thanks.
Comment 10 Nicolas Dufresne (ndufresne) 2016-06-06 21:43:22 UTC
I'd like to proof test this one, but it seems a good candidate for 1.8 since
it likely fixex a regression caused by the introductions of colorimetry
(assuming) the driver is correct). Philipp, any opinion on this ?

Attachment 328121 [details] pushed as b5530a1 - v4l2object: refactor gst_v4l2_object_get_colorspace to take a v4l2_format parameter
Attachment 328122 [details] pushed as 616ccbb - v4l2object: fill colorimetry in gst_v4l2_object_acquire_format