Skip to content

v4l2object: Use default colorimetry if that in caps is unknown

Qi Hou requested to merge (removed):master into master

Some streams have unknown colorimetry in caps. For example (range:matrix:transfer:primaries = 2:4:0:3), where transfer=0 is unknown value. But v4l2object will set default value for it according to primaries with below code and colorimetry changes to 2:4:5:3. It causes mismatch when check colorimetry. So need to keep it consistent when meet unknown value in caps.

     case V4L2_COLORSPACE_470_SYSTEM_BG:
      cinfo->range = GST_VIDEO_COLOR_RANGE_16_235;
      cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT601;
      cinfo->transfer = GST_VIDEO_TRANSFER_BT709;
      cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT470BG;
Edited by Nicolas Dufresne

Merge request reports

Loading