Colorimetry defaults based on resolution cause visible color differences
The following pipeline is going to select BT709 for the UYVY part of a.jpg
and BT601 for b.jpg
(because a.jpg
has height >= 720
and b.jpg
not). jpegdec
puts the same colorimetry on both. Compositor will then get BT601/BT709 on its two pads and convert that to xRGB, and in the output the colors of both bars are visibly different.
gst-launch-1.0 -v filesrc location=a.jpg ! decodebin ! videoconvert ! video/x-raw,format=UYVY ! imagefreeze ! c. filesrc location=b.jpg ! decodebin ! videoconvert ! video/x-raw,format=UYVY ! imagefreeze ! c. compositor name=c sink_1::xpos=60 ! video/x-raw,format=xRGB ! videoconvert ! xvimagesink
This is either inherent to the BT601/BT709 conversions being lossy or there's a bug in their implementations.