{"id":18775,"url":"https://patchwork.libcamera.org/api/patches/18775/?format=json","web_url":"https://patchwork.libcamera.org/patch/18775/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230630134232.1295-1-naush@raspberrypi.com>","date":"2023-06-30T13:42:32","name":"[libcamera-devel] pipeline: rpi: Account for Bayer packing when validating format","commit_ref":"7802471a3badb561f1e017c3ecdafc95a0a43d61","pull_url":null,"state":"accepted","archived":false,"hash":"28cdc61a2d67ba265177bf6e6ca2da189d957d86","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18775/mbox/","series":[{"id":3946,"url":"https://patchwork.libcamera.org/api/series/3946/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3946","date":"2023-06-30T13:42:32","name":"[libcamera-devel] pipeline: rpi: Account for Bayer packing when validating format","version":1,"mbox":"https://patchwork.libcamera.org/series/3946/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18775/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18775/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id ABC8DBE175\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Jun 2023 13:45:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E4A3360454;\n\tFri, 30 Jun 2023 15:45:24 +0200 (CEST)","from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com\n\t[IPv6:2a00:1450:4864:20::12a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E69960454\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jun 2023 15:45:23 +0200 (CEST)","by mail-lf1-x12a.google.com with SMTP id\n\t2adb3069b0e04-4fb8ede27eeso3046162e87.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Jun 2023 06:45:22 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tbf11-20020a0560001ccb00b003062b2c5255sm18339176wrb.40.2023.06.30.06.45.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 30 Jun 2023 06:45:21 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1688132724;\n\tbh=ARehAiE3B9J2m1IlHFxhCz5OuMiL39PRjk2vDsRNMFk=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=Srwpg9GzvGb/HGerk3XKT0ixGNHan1bksAc1s9H/0nR4ea7l2nC6djgJ7mheNkj5Q\n\tJe8/NQzbnAfyHeIO5MnFlAGF/x+MF8NSxmho95nUeiumnWxh+vogpOGzWYtQUb7VCr\n\thhi0MRX1rqcagLLVzLWGIbC8k+LOeVbsiDMPX2pTOHlIU7cJ9sRC20jbyeccVtVEBp\n\tbK+i5araUCuBIxa0KFBpnqIvVCFpWzP8LtSF6eaUvZ4pSv2gk0Hr6fHF6DMrwukrkk\n\tXJe5PbcbOL2zKkNoSxFKsUfOOuAid3KODyjGHMM2RfCN4aybcbN5iOEcSY+cmMV+/v\n\th79JIzgcl/cWw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1688132722; x=1690724722;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=VITRkEgIEwGUfQXNLxylUtIJOPCbRcUYZW1La62GwYc=;\n\tb=Br6rrpeuoVaieyRpVZjRqiSVM7dk9kE5easrh/jfvHN0GyBs2vN5SEcmfKnLjU5WTU\n\t0wpcFDQfW15miW8c8dCMPEXFsqc5cA2IVUX6aXYo6ekzgSWeU1D8K3UaN6GkJsdKzngF\n\tAR4LarAyKIby2DxZAGbrnbmbgoRh+S83k3qXIFdz5yQ8NQzV1bUN6s7UqFqYNPL5T0QG\n\tIfMe8p4rTIl8pLLPf6V3fBX1+pK3DpAyhS4k31Ql1I4pEyX/sr1MyGi9+6ahOxt42C5l\n\t5oQ0PLys/gTxnezB3pwzQhpHhyvC8uCVLheExoafdkRrES3PFBC0Yk4nOnduHm9pwBUw\n\tWLhA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Br6rrpeu\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1688132722; x=1690724722;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=VITRkEgIEwGUfQXNLxylUtIJOPCbRcUYZW1La62GwYc=;\n\tb=RdRBT7fVR/xjzMaUQ2lk+85eIAJEP2pIu14lSljR2seuktxH9hoTkYdx89Aij1NriJ\n\tCWKL18KsE+cwI4eKKgl9pwB3tDBo3iE4keU0GEpyRl/F6Z4RHwL7R6pI+GkEr4RczCuT\n\tlgLurm5VSPi1SYSy+XDUkIavIGKfT4qSpc2ONO/IauQ5fVmGeJWbVSf2MROMxzYGwXTT\n\tM0/TuqGGzOB31Kn5bhbH8q4TD6GGO2KqhGxzz8FbzWuIZTJntnPyv+JAJCbYEwQNXu3F\n\tmioly6bq7VVjgSLF6eWevspl+okpHlbygTaa2EKotcJ/DDWD3kKNpUEiXb0yA0wkaBSA\n\tC5RQ==","X-Gm-Message-State":"ABy/qLb9wcRCBAW+dRpYQIeVb6F0xHt9ROagGWiqrIhNBecPvN1wdI9T\n\tMml+55aM52b/ttUO/14BxRZucS5usKIlkbc/fsEiwA==","X-Google-Smtp-Source":"APBJJlH4ojga4Xv2J1J57T/y783+7g9DOuJQCB4Su3dxasWc5k7IhI5Lgi3ubNyaSSlBdgpadO1Tqw==","X-Received":"by 2002:ac2:4f14:0:b0:4f8:442c:de25 with SMTP id\n\tk20-20020ac24f14000000b004f8442cde25mr2727837lfr.5.1688132721815; \n\tFri, 30 Jun 2023 06:45:21 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 30 Jun 2023 14:42:32 +0100","Message-Id":"<20230630134232.1295-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] pipeline: rpi: Account for Bayer packing\n\twhen validating format","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"RPiCameraConfiguration::validate() did not account for user supplied\nBayer packing when validating the RAW stream configuration. Fix this\nby seeing what packing (if any) has been specified selecting the output\nRAW stream format.\n\nFixes: 6c71ee1f1530 (\"pipeline: raspberrypi: Introduce PipelineHandlerBase class\")\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex df7482920e75..2eb71beaff55 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -288,8 +288,8 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n \t\tunsigned int bitDepth = info.isValid() ? info.bitsPerPixel : defaultRawBitDepth;\n \t\tV4L2SubdeviceFormat sensorFormat = findBestFormat(data_->sensorFormats_, cfg.size, bitDepth);\n \n-\t\trawFormat.size = sensorFormat.size;\n-\t\trawFormat.fourcc = raw.dev->toV4L2PixelFormat(cfg.pixelFormat);\n+\t\tBayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n+\t\trawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat, packing);\n \n \t\tint ret = raw.dev->tryFormat(&rawFormat);\n \t\tif (ret)\n","prefixes":["libcamera-devel"]}