[libcamera-devel] [PATCH] android: camera_device: Set default max frame duration
Jacopo Mondi
jacopo at jmondi.org
Mon Feb 1 11:56:10 CET 2021
Hi Paul,
On Mon, Feb 01, 2021 at 05:56:51PM +0900, Paul Elder wrote:
> Set the max frame duration in the static metadata to 1 second.
>
> This allows the following CTS test to pass:
> - android.hardware.camera2.cts.SurfaceViewPreviewTest#testPreviewFpsRange
See:
[PATCH v2 3/6] android: camera_device: Compute frame durations
where MAX_FRAME_DURATION is instantiate using the frameDuration value
returned by pipeline handler.
Could you have a look at the series and see if it helps ?
Thanks
j
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> src/android/camera_device.cpp | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index c1025e81..a71af540 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -705,10 +705,10 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
> {
> /*
> * \todo Keep this in sync with the actual number of entries.
> - * Currently: 53 entries, 782 bytes of static metadata
> + * Currently: 54 entries, 794 bytes of static metadata
> */
> - uint32_t numEntries = 53;
> - uint32_t byteSize = 810;
> + uint32_t numEntries = 54;
> + uint32_t byteSize = 822;
>
> /*
> * Calculate space occupation in bytes for dynamically built metadata
> @@ -932,6 +932,10 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> &exposureTimeRange, 2);
> }
>
> + int64_t maxFrameDuration = 1000000000;
> + staticMetadata_->addEntry(ANDROID_SENSOR_INFO_MAX_FRAME_DURATION,
> + &maxFrameDuration, 1);
> +
> staticMetadata_->addEntry(ANDROID_SENSOR_ORIENTATION, &orientation_, 1);
>
> std::vector<int32_t> testPatterModes = {
> @@ -1179,6 +1183,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> ANDROID_SENSOR_INFO_SENSITIVITY_RANGE,
> ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,
> ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE,
> + ANDROID_SENSOR_INFO_MAX_FRAME_DURATION,
> ANDROID_SENSOR_ORIENTATION,
> ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES,
> ANDROID_SENSOR_INFO_PHYSICAL_SIZE,
> --
> 2.27.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list