summaryrefslogtreecommitdiff
path: root/test/media_device/media_device_test.cpp
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2022-08-30 13:17:23 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2022-09-01 16:49:59 +0530
commit4aa71c2cd26e672d04ea1c696de45f1c630062c3 (patch)
treebbab2c8f187ab806a25ad9357a8ca86db7da011c /test/media_device/media_device_test.cpp
parentd09c2bb127d5f96f4f397bd3ca11839840888b46 (diff)
libcamera: color_space: Move color space adjustment to ColorSpace class
The CameraConfiguration::validateColorSpaces() function performs color space validation on a camera configuration, by validating the color space of each stream individually, and optionally ensuring that all streams share the same color space. The individual validation is very basic, limited to ensuring that raw formats use a raw color space. Color spaces are more constrained than that: - The Y'CbCr encoding and quantization range for RGB formats must be YcbcrEncoding::None and Range::Full respectively. - The Y'CbCr encoding for YUV formats must not be YcbcrEncoding::None. Instead of open-coding these constraints in the validateColorSpaces() function, create a new ColorSpace::adjust() function to centralize color space validation and adjustment, and use it in validateColorSpaces(). Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'test/media_device/media_device_test.cpp')
0 files changed, 0 insertions, 0 deletions