From patchwork Tue Apr 26 12:14:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanlin Chen X-Patchwork-Id: 15729 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 E69CAC0F2A for ; Tue, 26 Apr 2022 12:14:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3F48C65642; Tue, 26 Apr 2022 14:14:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1650975262; bh=kzmupxKf6FQ3j3UgTiLU+EmtNLErGnW6iM7W9MzQf2w=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dcw4elwKmHUJ5fi45N10VtYDDV0f5ZdbRKfJHRpvI1G0CQpmkIiefFgoSt2VhZLSq I/tRZkoiJIpdfyx6bTvkyspoCPNGW6OQy8X3G9xGBms8XwvyEABXxPGSXlDn1txwL+ zzhDuuL0xBEoYpP5J7vczPCTZuIyVzyTt6vkyIBxkAxoppHtiMBiIG31XQlkhn5CR6 noEP+uz6GtrUsVID7/xbt1+DJKUwYw3ySFqqbSfsbsSOfu75n3IeVKeNgNCqz4wtAl 3/+emCTmsZ00b/Cx5phiH/K2+eA5lYhfr9sKI9ThZRWAie77CojdKAFekmWLBXbG2h AIOfkPqS6JElQ== Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8755060431 for ; Tue, 26 Apr 2022 14:14:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ROY0XvwT"; dkim-atps=neutral Received: by mail-pl1-x62c.google.com with SMTP id c23so30029163plo.0 for ; Tue, 26 Apr 2022 05:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9XR6025k4SgZnE6anVDlgnkMbJdVvDycxdSRKHaaonc=; b=ROY0XvwTPqd0AviMZ9aAXXLHokilGYYchvj9eSdX7UFeLEHPJmWMpizJWYwXX1Vdc9 HoLaRUGMKyXAPKOxjTAsCGhJ7B4PEFOzugK2gP5GjP/1XXya2Ju95yxUj49nMbXU06Hi YnDtxj2CEa6ma9a97CA6oYumJxrvxzGU1TaQQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9XR6025k4SgZnE6anVDlgnkMbJdVvDycxdSRKHaaonc=; b=Tlps14s3klAmA2zKuVIGQpVeRupO2LnqaIoZa4mu/Gj050JRamvRVwcaR9icV0jfBt peLYZ4lwlAPvPVL/JtNoRcSWUnVbiWiyqkAvPm22QMjDeuoiIfrvIV3wsWhKA8UNLcvm EKnFO5b37bSRLj2MAQJp+pxnEgA8dIoRhEnrWZecg/Yg7ob8XGnwQ5d4sfW3Rx1e4SEs kJTqlnybdKQO/Bc0qbtbp8Endpc9p075ULWprlHvI8qwm3a0Vg9+HjetefkZv/dEDK7n RDgi4LR5cFd+I+Zyya/Wg+ZF5J7iGOsFkqsIyy15IL6mwXfGzfOTVFW+jN4Yk7kgd+Yh d4vQ== X-Gm-Message-State: AOAM531fx1ZsTJs//JxXJLAVvqPUoBQYRYLWdcqmWIb2+TZlEJ5JyYt9 fW1GqcuOsiVQDytb2CfxmiLNMyyLfa3vWg== X-Google-Smtp-Source: ABdhPJwVVaxRSxUwcGUGal0mAkTGLbVYCfkHngG56SKxenLYR38zlZ5ONNo/bk07EsIbetgQU4zM8w== X-Received: by 2002:a17:903:2d1:b0:156:7ceb:b56f with SMTP id s17-20020a17090302d100b001567cebb56fmr23230255plk.11.1650975259588; Tue, 26 Apr 2022 05:14:19 -0700 (PDT) Received: from localhost ([2401:fa00:1:17:255:33c4:eb32:373b]) by smtp.gmail.com with UTF8SMTPSA id z9-20020a630a49000000b003ab2bfdc919sm6835178pgk.39.2022.04.26.05.14.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 05:14:19 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Apr 2022 20:14:16 +0800 Message-Id: <20220426121416.754053-1-hanlinchen@chromium.org> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] android: camera_capabilities: Add (1600x1200) and (1280x960) 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: , X-Patchwork-Original-From: Han-Lin Chen via libcamera-devel From: Hanlin Chen Reply-To: Han-Lin Chen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Although resolutions (1600x1200) and (1280x960) are not mandatory to be supported by the Android Camera3 specification, they are commonly used by Android devices as viewfinder streams for 4:3 still capture. Add them into stream resolution candidates. Signed-off-by: Han-Lin Chen Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/android/camera_capabilities.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 5242055c..e0f23c87 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -31,13 +31,20 @@ namespace { /* * \var camera3Resolutions - * \brief The list of image resolutions defined as mandatory to be supported by - * the Android Camera3 specification + * \brief The list of image resolutions commonly supported by Android + * + * The following are defined as mandatory to be supported by the Android + * Camera3 specification: (320x240), (640x480), (1280x720), (1920x1080). + * + * The following 4:3 resolutions are defined as optional, but commonly + * supported by Android devices: (1280x960), (1600x1200). */ const std::vector camera3Resolutions = { { 320, 240 }, { 640, 480 }, { 1280, 720 }, + { 1280, 960 }, + { 1600, 1200 }, { 1920, 1080 } }; @@ -492,8 +499,8 @@ int CameraCapabilities::initializeStreamConfigurations() /* * Build the list of supported image resolutions. * - * The resolutions listed in camera3Resolution are mandatory to be - * supported, up to the camera maximum resolution. + * The resolutions listed in camera3Resolution are to be supported, + * up to the camera maximum resolution. * * Augment the list by adding resolutions calculated from the camera * maximum one.