From patchwork Wed Apr 27 15:13:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanlin Chen X-Patchwork-Id: 15734 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 5BB35C0F2A for ; Wed, 27 Apr 2022 15:13:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C4F7B65644; Wed, 27 Apr 2022 17:13:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1651072389; bh=GSaeV5ftMrIdl4xHAlIkv+/xA/5RjKyEmgoYpoqwhcQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lWQMGrrKuBFQ7/x0yTBCFb+z/7LITtAaY9pTtqBo4SD9kZj1C8o5wljVUNneKm5ko 8s2LYYqFc/IttYxHPbqe660NuLnZORCac2gJoNDiWCDivmTg6yhTo91PD8pZvyxSUt 5DY47TcXnhe37LjO0/c1t3m6zcvK91fFrtq6xOnllijurgdg++1p7tXD7/25aTffey PJLYoKeQymqIWWxkz1qJWm62AiohAaS3Djzdxwz8/PfRXBgq7NApjwwurAaXc3lSxK vJ7P/bgcNdE568X+SYGGxCnBo3jALsMaZmMzo4p/UKr8jnMOwineYSiN/4JVGqylPo gVoNf9kyPlpMA== Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C7D886042F for ; Wed, 27 Apr 2022 17:13:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="EuWn7ioc"; dkim-atps=neutral Received: by mail-pj1-x1032.google.com with SMTP id d23-20020a17090a115700b001d2bde6c234so3983219pje.1 for ; Wed, 27 Apr 2022 08:13:07 -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=HOAURnb2YRFx2HOQVBOHr15bReHazB1JFUroddOIZxw=; b=EuWn7ioc+pe2rWBI5RuOobI1H0PrE6D8jrrI+Tg6srfshc935FY4pLiMviTnZ9YpeK JkdZRP+Nwl/jvONcvQg63unyHDuv2NZhhTQKCRFtIayUBd2nLAmnyv6wZhpd2dsAFWYM iWowUCnt0MdlolTAHnpZcN8byl0IB7osL6F7E= 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=HOAURnb2YRFx2HOQVBOHr15bReHazB1JFUroddOIZxw=; b=jadSlcosy/iVr1ruf0FW0Pc6ukkpmb3zjCGJYs8JflFCFEudBrckuer7WBtCSceh9r Y+r6kFXdWDwUtX3TfYbPlvaIwLhJIlZbeE7aPz4MP8/EVgeE1vGuTCwJEOXxymj00b9p 24TNUtLU4MDb28hLzOoxrZirs13Xr89KnTcwnxZ2ARRYy9PFfnA1afZtcbb91zGGV8MH sISctxXAieBN14fAMEQwHLf0jSWwcbPOfEG9pbs0gqDCA3+jvVqHzlOX6dU/KsfhUApE ohELb+oQc1pXkj6UMx0/tt2ZZMgksj7PLKxRsdsxTfy3QHRy5Z1mvPFRIViQOynai9EO ToxA== X-Gm-Message-State: AOAM5303WK/BRCjgZAQDeE2uGm8TozHyKl58yo5IMpSmojT/QqObnPEr 8mhk93X8w5ON60rNezuZjIiRqQECnG4gNw== X-Google-Smtp-Source: ABdhPJy52vaoONv1t2VmsI0SxmIgPdis6LDyMoXYvoPCdesEjkyok2gQxKQAyQR33EBfjg+VQ6/Org== X-Received: by 2002:a17:90a:1944:b0:1d9:7cf8:5457 with SMTP id 4-20020a17090a194400b001d97cf85457mr17298553pjh.112.1651072386077; Wed, 27 Apr 2022 08:13:06 -0700 (PDT) Received: from localhost ([2401:fa00:1:17:47e:a9de:8ea1:3876]) by smtp.gmail.com with UTF8SMTPSA id d15-20020a630e0f000000b003a408836badsm16435781pgl.45.2022.04.27.08.13.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Apr 2022 08:13:05 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 27 Apr 2022 23:13:02 +0800 Message-Id: <20220427151302.607431-1-hanlinchen@chromium.org> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] 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 ee17cdc7..649f84d3 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 supported, up to the + * camera maximum resolution. * * Augment the list by adding resolutions calculated from the camera * maximum one.