[libcamera-devel] [PATCH v7 10/13] py: add support for the ColorSpace

Tomi Valkeinen tomi.valkeinen at ideasonboard.com
Fri May 6 15:02:08 CEST 2022


On 05/05/2022 21:01, Laurent Pinchart wrote:
> Hi Tomi and David,
> 
> Thank you for the patch.
> 
> On Thu, May 05, 2022 at 01:41:01PM +0300, Tomi Valkeinen wrote:
>> From: David Plowman <david.plowman at raspberrypi.com>
>>
>> Add binding for ColorSpace.
>>
>> Original version by David Plowman <david.plowman at raspberrypi.com>.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
>> ---
>>   src/py/libcamera/pymain.cpp | 52 ++++++++++++++++++++++++++++++++++++-
>>   1 file changed, 51 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/py/libcamera/pymain.cpp b/src/py/libcamera/pymain.cpp
>> index 3d2393ab..c442ad50 100644
>> --- a/src/py/libcamera/pymain.cpp
>> +++ b/src/py/libcamera/pymain.cpp
>> @@ -153,6 +153,11 @@ PYBIND11_MODULE(_libcamera, m)
>>   	auto pyRequest = py::class_<Request>(m, "Request");
>>   	auto pyFrameMetadata = py::class_<FrameMetadata>(m, "FrameMetadata");
>>   	auto pyTransform = py::class_<Transform>(m, "Transform");
>> +	auto pyColorSpace = py::class_<ColorSpace>(m, "ColorSpace");
>> +	auto pyColorSpacePrimaries = py::enum_<ColorSpace::Primaries>(pyColorSpace, "Primaries");
>> +	auto pyColorSpaceTransferFunction = py::enum_<ColorSpace::TransferFunction>(pyColorSpace, "TransferFunction");
>> +	auto pyColorSpaceYcbcrEncoding = py::enum_<ColorSpace::YcbcrEncoding>(pyColorSpace, "YcbcrEncoding");
>> +	auto pyColorSpaceRange = py::enum_<ColorSpace::Range>(pyColorSpace, "Range");
> 
> I think the enums should go to pyenums.cpp. Same for the related code
> below.

They depend on pyColorSpace, which is not an enum.

  Tomi


More information about the libcamera-devel mailing list