summaryrefslogtreecommitdiff
path: root/src/cam/kms_sink.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-28 02:18:37 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-30 22:00:13 +0300
commit0cd715c4ded3b945e7281421552d185018f96a0c (patch)
treec0be90e5d1646c31c09a7a86925b1cd99ade5c1d /src/cam/kms_sink.h
parent1d54f8d0a268b5053db8d30aebdff0adf6d748a2 (diff)
cam: kms_sink: Add color space support
KMS defines YCbCr encoding and quantization properties for planes. When supported by the device, set them to match the color space of the stream to render colors accurately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Diffstat (limited to 'src/cam/kms_sink.h')
-rw-r--r--src/cam/kms_sink.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cam/kms_sink.h b/src/cam/kms_sink.h
index 76c4e611..e2c618a1 100644
--- a/src/cam/kms_sink.h
+++ b/src/cam/kms_sink.h
@@ -10,6 +10,7 @@
#include <list>
#include <memory>
#include <mutex>
+#include <optional>
#include <string>
#include <utility>
@@ -67,6 +68,8 @@ private:
libcamera::PixelFormat format_;
libcamera::Size size_;
unsigned int stride_;
+ std::optional<unsigned int> colorEncoding_;
+ std::optional<unsigned int> colorRange_;
libcamera::Rectangle src_;
libcamera::Rectangle dst_;