Patch Detail
Show a patch.
GET /api/patches/13591/?format=api
{ "id": 13591, "url": "https://patchwork.libcamera.org/api/patches/13591/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13591/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210901080302.68525-2-hiroh@chromium.org>", "date": "2021-09-01T08:03:01", "name": "[libcamera-devel,v4,2/3] android: camera_stream: Support PostProcessorYuv in CameraStream", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f74553f21647e4206916de0db1081e8b67e890c7", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13591/mbox/", "series": [ { "id": 2432, "url": "https://patchwork.libcamera.org/api/series/2432/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2432", "date": "2021-09-01T08:03:00", "name": "[libcamera-devel,v4,1/3] android: camera_stream: Create post processor in configure()", "version": 4, "mbox": "https://patchwork.libcamera.org/series/2432/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13591/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13591/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 31B87BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 1 Sep 2021 08:03:14 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D833260253;\n\tWed, 1 Sep 2021 10:03:13 +0200 (CEST)", "from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com\n\t[IPv6:2607:f8b0:4864:20::62d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5814360253\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 1 Sep 2021 10:03:12 +0200 (CEST)", "by mail-pl1-x62d.google.com with SMTP id m4so1055624pll.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 01 Sep 2021 01:03:12 -0700 (PDT)", "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:af31:7c67:f02a:bccc])\n\tby smtp.gmail.com with ESMTPSA id\n\tn15sm20487092pff.149.2021.09.01.01.03.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 01 Sep 2021 01:03:09 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"HpzacafM\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=OxzUfuH3EjHKFdIqWNsivIS6aByxXvu9J9Tc0R1ndro=;\n\tb=HpzacafMYFwmPWGKztfmSn03myCz7hQrx5XrSqQVhhE4510/euHM0ultucq8v5S0tB\n\tjYLEQgr1QYp3EbL1DwK0mI6rjXhNpXF1bVI64kdWdEqvFp3wy1xfiZjuhtvwznthuKt/\n\tQZprUOD4ur4MCVQilqELGAPqYW0x9J1/kb6LY=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=OxzUfuH3EjHKFdIqWNsivIS6aByxXvu9J9Tc0R1ndro=;\n\tb=QmV/Ri/UVq2p+UxzPNkqu+ZNnRpg4k/LIMAqv+3OnTF20SLIyezMU06Td7jGeX84z5\n\ttjrFoY33ODBzeWVEjWxjezPGFDl+PgJ7ttrNFj5ciOv3RQ3rMZREVxhzlH1WT0HDtNJ2\n\tbkahmobHFuNokCiwd55PQUqZPSjZdfWWE2psyrCor0sBTBaHnXIAz2xrFXWUP+hj+p8H\n\tWldjBbut2VWlPbvV7daR9HtdY97VHBfxlsZU/N2PyToPJsivyR7P2mjDducNjSxR/jYd\n\t3+fA8/Bp1/ok3xkga1tapsxqSVdYyXkjK17RBFvYmiyiLOCnc380OS9i7MP+BuBZoKes\n\ttHqw==", "X-Gm-Message-State": "AOAM5338cmnKjnFDZD8Vqfe1XjeXcqOjTGeO/RXipf6txLOKb/AulEme\n\tT5J5scAIDgAl5k6dz3XmKBV0rgOOpzTL+A==", "X-Google-Smtp-Source": "ABdhPJy0Kp3XZdJQEujcvhn/wB4F3QbWL/gF/CeNucyey+hozSSXDJV8KYzyEt+oMCHL10Xwq9sErw==", "X-Received": "by 2002:a17:90b:f97:: with SMTP id\n\tft23mr10225012pjb.135.1630483390407; \n\tWed, 01 Sep 2021 01:03:10 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 1 Sep 2021 17:03:01 +0900", "Message-Id": "<20210901080302.68525-2-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.33.0.259.gc128427fd7-goog", "In-Reply-To": "<20210901080302.68525-1-hiroh@chromium.org>", "References": "<20210901080302.68525-1-hiroh@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 2/3] android: camera_stream: Support\n\tPostProcessorYuv in CameraStream", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "CameraStream creates PostProcessorYuv if the destination format\nis NV12.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp | 4 ++--\n src/android/camera_stream.cpp | 14 +++++++++++---\n 2 files changed, 13 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex fda77db4..324b997f 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1144,12 +1144,12 @@ void CameraDevice::requestComplete(Request *request)\n \t\tresultMetadata = std::make_unique<CameraMetadata>(0, 0);\n \t}\n \n-\t/* Handle any JPEG compression. */\n+\t/* Handle post-processing. */\n \tfor (camera3_stream_buffer_t &buffer : descriptor.buffers_) {\n \t\tCameraStream *cameraStream =\n \t\t\tstatic_cast<CameraStream *>(buffer.stream->priv);\n \n-\t\tif (cameraStream->camera3Stream().format != HAL_PIXEL_FORMAT_BLOB)\n+\t\tif (cameraStream->type() == CameraStream::Type::Direct)\n \t\t\tcontinue;\n \n \t\tFrameBuffer *src = request->findBuffer(cameraStream->stream());\ndiff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 3fce29c1..52ebf30a 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -9,13 +9,15 @@\n \n #include <sys/mman.h>\n \n+#include <libcamera/formats.h>\n+\n+#include \"jpeg/post_processor_jpeg.h\"\n+#include \"yuv/post_processor_yuv.h\"\n+\n #include \"camera_buffer.h\"\n #include \"camera_capabilities.h\"\n #include \"camera_device.h\"\n #include \"camera_metadata.h\"\n-#include \"jpeg/post_processor_jpeg.h\"\n-\n-#include <libcamera/formats.h>\n \n using namespace libcamera;\n \n@@ -67,8 +69,14 @@ int CameraStream::configure()\n \t\t\tcameraDevice_->capabilities()->toPixelFormat(camera3Stream_->format);\n \t\tStreamConfiguration output = configuration();\n \t\toutput.pixelFormat = outFormat;\n+\t\toutput.size.width = camera3Stream_->width;\n+\t\toutput.size.height = camera3Stream_->height;\n \n \t\tswitch (outFormat) {\n+\t\tcase formats::NV12:\n+\t\t\tpostProcessor_ = std::make_unique<PostProcessorYuv>();\n+\t\t\tbreak;\n+\n \t\tcase formats::MJPEG:\n \t\t\tpostProcessor_ = std::make_unique<PostProcessorJpeg>(cameraDevice_);\n \t\t\tbreak;\n", "prefixes": [ "libcamera-devel", "v4", "2/3" ] }