libcamera: camera: Add validateColorSpaces to CameraConfiguration class
This function forces raw streams to have the "raw" color space, and also optionally makes all non-raw output streams to share the same color space as some platforms may require this. When sharing color spaces we take the shared value to be the one from the largest of these streams. This choice is ultimately arbitrary, but can be appropriate if smaller output streams are used for image analysis rather than human consumption, when the precise colours may be less important. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
4a56809981
commit
5e5eadabd8
@@ -13,6 +13,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <libcamera/base/class.h>
|
||||
#include <libcamera/base/flags.h>
|
||||
#include <libcamera/base/object.h>
|
||||
#include <libcamera/base/signal.h>
|
||||
|
||||
@@ -69,6 +70,15 @@ public:
|
||||
protected:
|
||||
CameraConfiguration();
|
||||
|
||||
enum class ColorSpaceFlag {
|
||||
None,
|
||||
StreamsShareColorSpace,
|
||||
};
|
||||
|
||||
using ColorSpaceFlags = Flags<ColorSpaceFlag>;
|
||||
|
||||
Status validateColorSpaces(ColorSpaceFlags flags = ColorSpaceFlag::None);
|
||||
|
||||
std::vector<StreamConfiguration> config_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user