From bfee6316fc57b36b506eda9ed34519a86b9d9216 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 1 Sep 2020 17:42:13 +0200 Subject: android: camera_device: Break out size calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the RAW stream sizes needs to be calculated differently from the processed one, break out the procedure to calculate the processed (RGB/YUV) resolutions from initializeStreamConfigurations() in order to prepare for RAW sizes calculation. Reviewed-by: Hirokazu Honda Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi --- src/android/camera_device.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/android/camera_device.h') diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 3934f194..1ff43327 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -93,6 +93,11 @@ private: }; int initializeStreamConfigurations(); + std::vector + getYUVResolutions(libcamera::CameraConfiguration *cameraConfig, + const libcamera::PixelFormat &pixelFormat, + const std::vector &resolutions); + std::tuple calculateStaticMetadataSize(); libcamera::FrameBuffer *createFrameBuffer(const buffer_handle_t camera3buffer); void notifyShutter(uint32_t frameNumber, uint64_t timestamp); -- cgit v1.2.1