[libcamera-devel] [PATCH 1/4] android: camera_device: Remove ANDROID_SCALER_AVAILABLE_FORMATS
Jacopo Mondi
jacopo at jmondi.org
Fri Jul 24 10:35:47 CEST 2020
Hi Niklas,
On Thu, Jul 23, 2020 at 07:39:39PM +0200, Niklas Söderlund wrote:
> According to the documentation the tag
> ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS deprecates the
> ANDROID_SCALER_AVAILABLE_FORMATS tag. As the HAL implements both tags
> remove the deprecated one.
Indeed deprecated! Sorry I missed that
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Thanks
j
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/android/camera_device.cpp | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 48f8090a93db454d..6e7673583f6a8f85 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -376,7 +376,7 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
> * \todo Keep this in sync with the actual number of entries.
> * Currently: 50 entries, 647 bytes of static metadata
> */
> - uint32_t numEntries = 50;
> + uint32_t numEntries = 49;
> uint32_t byteSize = 647;
>
> /*
> @@ -385,10 +385,9 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
> *
> * Each stream configuration entry requires 52 bytes:
> * 4 32bits integers for ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
> - * 1 32bits integer for ANDROID_SCALER_AVAILABLE_FORMATS
> * 4 64bits integers for ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
> */
> - byteSize += streamConfigurations_.size() * 52;
> + byteSize += streamConfigurations_.size() * 48;
>
> return std::make_tuple(numEntries, byteSize);
> }
> @@ -656,15 +655,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM,
> &maxDigitalZoom, 1);
>
> - std::vector<uint32_t> availableStreamFormats;
> - availableStreamFormats.reserve(streamConfigurations_.size());
> - std::transform(streamConfigurations_.begin(), streamConfigurations_.end(),
> - std::back_inserter(availableStreamFormats),
> - [](const auto &entry) { return entry.androidScalerCode; });
> - staticMetadata_->addEntry(ANDROID_SCALER_AVAILABLE_FORMATS,
> - availableStreamFormats.data(),
> - availableStreamFormats.size());
> -
> std::vector<uint32_t> availableStreamConfigurations;
> availableStreamConfigurations.reserve(streamConfigurations_.size() * 4);
> for (const auto &entry : streamConfigurations_) {
> @@ -761,7 +751,6 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE,
> ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES,
> ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM,
> - ANDROID_SCALER_AVAILABLE_FORMATS,
> ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS,
> ANDROID_SCALER_AVAILABLE_STALL_DURATIONS,
> ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS,
> --
> 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