From patchwork Wed Sep 2 10:47:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9437 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A670EBF019 for ; Wed, 2 Sep 2020 10:43:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 386CA629A3; Wed, 2 Sep 2020 12:43:56 +0200 (CEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A1E5628EE for ; Wed, 2 Sep 2020 12:43:55 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 0896E4000A; Wed, 2 Sep 2020 10:43:53 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 2 Sep 2020 12:47:25 +0200 Message-Id: <20200902104730.43451-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] android: camera_device: List JPEG/RAW correct resolutions X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tfiga@google.com, hiroh@google.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" With the recent introduction of JPEG and RAW support in the libcamera camera HAL, the initialization of formats and sizes wasn't properly advanced. 1) We assumed all sizes were valid for JPEG format 2) RAW sizes were not enumerated, if not they luckily matched one of the tested resolutions This small series aims to fix this by: 1) Claiming support for JPEG sizes based on the supported YCbCr_888 sizes 2) Enumerate the RAW sizes differently from the processed ones The result is the following enumeration on Soraka cam0 camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 320x240 - 0x00000022 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 640x480 - 0x00000022 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1280x720 - 0x00000022 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1920x1080 - 0x00000022 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 4160x3104 - 0x00000022 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 320x240 - 0x00000023 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 320x240 - 0x00000021 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 640x480 - 0x00000023 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 640x480 - 0x00000021 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1280x720 - 0x00000023 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1280x720 - 0x00000021 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1920x1080 - 0x00000023 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1920x1080 - 0x00000021 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 4160x3104 - 0x00000023 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 4160x3104 - 0x00000021 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 1056x784 - 0x00000024 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 2112x1188 - 0x00000024 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 2112x1568 - 0x00000024 } camera_device.cpp:508 '\_SB_.PCI0.I2C2.CAM0': { 4224x3136 - 0x00000024 } Thanks j Jacopo Mondi (5): android: camera_device: Refuse unsupported formats android: camera_device: Generate JPEG sizes android: camera_device: Add debug to stream initialization android: camera_device: Break out size calculation android: camera_device: List RAW resolutions src/android/camera_device.cpp | 123 +++++++++++++++++++++++++++------- src/android/camera_device.h | 7 ++ 2 files changed, 107 insertions(+), 23 deletions(-) --- 2.28.0