[libcamera-devel] [PATCH v5 5/8] android: camera_device: Use precise sizes for request template

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Sep 4 16:27:17 CEST 2019


Hi Jacopo,

Thank you for the patch.

On Wed, Sep 04, 2019 at 04:18:22PM +0200, Jacopo Mondi wrote:
> Use more opportune sizes, manually calculated, for the generated request
> template.
> 
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  src/android/camera_device.cpp | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 969c8192c316..5f8d19b9ef3d 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -547,11 +547,11 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)
>  	if (requestTemplate_)
>  		return requestTemplate_;
>  
> -	/* \todo Use correct sizes */
> -	#define REQUEST_TEMPLATE_ENTRIES	  30
> -	#define REQUEST_TEMPLATE_DATA		2048
> -	requestTemplate_ = allocate_camera_metadata(REQUEST_TEMPLATE_ENTRIES,
> -						    REQUEST_TEMPLATE_DATA);
> +	/*
> +	 * \todo Keep this in sync with the actual number of entries.
> +	 * Currently: 12 entries, 15 bytes
> +	 */
> +	requestTemplate_ = allocate_camera_metadata(15, 20);
>  	if (!requestTemplate_) {
>  		LOG(HAL, Error) << "Failed to allocate template metadata";
>  		return nullptr;

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list