av1parse: Correct the meaning of color_range flag.
authorHe Junyan <junyan.he@intel.com>
Sun, 24 Apr 2022 14:54:58 +0000 (22:54 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 26 Apr 2022 02:14:15 +0000 (02:14 +0000)
According to spec:
color range equal to 0 shall be referred to as the studio swing
representation and color range equal to 1 shall be referred to as
the full swing representation.

The current status is just the opposite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2288>

subprojects/gst-plugins-bad/gst/videoparsers/gstav1parse.c

index 20656e6..e009e69 100644 (file)
@@ -1196,9 +1196,9 @@ gst_av1_parse_handle_sequence_obu (GstAV1Parse * self, GstAV1OBU * obu)
 
     if (have_cinfo) {
       if (seq_header.color_config.color_range)
-        cinfo.range = GST_VIDEO_COLOR_RANGE_16_235;
-      else
         cinfo.range = GST_VIDEO_COLOR_RANGE_0_255;
+      else
+        cinfo.range = GST_VIDEO_COLOR_RANGE_16_235;
 
       cinfo.matrix = gst_video_color_matrix_from_iso
           (seq_header.color_config.matrix_coefficients);