{"id":13581,"url":"https://patchwork.libcamera.org/api/patches/13581/?format=json","web_url":"https://patchwork.libcamera.org/patch/13581/","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":"<20210831093439.853586-3-hiroh@chromium.org>","date":"2021-08-31T09:34:38","name":"[libcamera-devel,v3,2/3] android: camera_stream: Support PostProcessorYuv in CameraStream","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"621be1d93e3489b2b6926f68f3b78ad9c2247605","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13581/mbox/","series":[{"id":2427,"url":"https://patchwork.libcamera.org/api/series/2427/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2427","date":"2021-08-31T09:34:36","name":"android: Request one stream for identica stream requests","version":3,"mbox":"https://patchwork.libcamera.org/series/2427/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13581/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13581/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 52559BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 31 Aug 2021 09:34:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E3C06916E;\n\tTue, 31 Aug 2021 11:34:51 +0200 (CEST)","from mail-pg1-x532.google.com (mail-pg1-x532.google.com\n\t[IPv6:2607:f8b0:4864:20::532])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7EE7660288\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Aug 2021 11:34:49 +0200 (CEST)","by mail-pg1-x532.google.com with SMTP id 17so16084355pgp.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Aug 2021 02:34:49 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:3c62:aba4:18ea:5441])\n\tby smtp.gmail.com with ESMTPSA id\n\tw5sm19787885pgp.79.2021.08.31.02.34.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 31 Aug 2021 02:34:47 -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=\"GTmQH4F/\"; 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=QVjXR02ZDHCX2y9ypwQuJT+gVqFw+9N0XA4WuPDjA9w=;\n\tb=GTmQH4F/TPJSeMnh7rTJgk/dfmuNTRd8JVL7OkemPskmvuPL7uFN4Bfiv1Td5vEcF/\n\t+xtb85CEytccvy6dstWqTzwlmQ0x5yJ460ZDlHcmoHoe/ipy2sj38Vl4VJ1dbX+3MGb1\n\t2QtNEu424BuPr5vt0zPswjEdZ8kyfcRYzymdc=","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=QVjXR02ZDHCX2y9ypwQuJT+gVqFw+9N0XA4WuPDjA9w=;\n\tb=jyaYUiKbhjaIRnwanK+8Ivko+BS4oUBvWs9H+1Bk7baiEI0sZu02doQ6LOTY1/OJLo\n\tPxqb3BeCnYhc6A7PoJLphedudMKT4IOHc20zSp88dCxdx4nOxdilZjDvbYg8vdlX+VJR\n\teQpeb/5wemkRTFFW16wvpP8tysLveAQ/5LGRkJ576iihC4i25EpIJ7eGL8QQgI8/zphj\n\tKUKE1wCpnZZGsK7gaqBKuNMbYDrokHsHuQKJt7xUOf0WFapzewgIQRukiYQXXhp7gE8+\n\tbzDd5j+JXPldrKpkjEQVFQm+6R2Wfsf5lxN5gt/jEBjqN2KuvVB9kUQiz7LZgK8wG5HS\n\tUjNw==","X-Gm-Message-State":"AOAM532WBLLWslJruqEWjsiGSfd8hslvlDXcmAEEX5CnLALqd94rwUp/\n\trEusdyq4VS4UrJ0b3pNmP46iMgrHiQSx3A==","X-Google-Smtp-Source":"ABdhPJyVxYfklA9qdCFXMW3lPnT5L5t6V96EEev/3AuEoz3QeDKblvHxsIh37DqHyc10fQOnFWr0pA==","X-Received":"by 2002:a62:9288:0:b0:3e1:c44f:a1b7 with SMTP id\n\to130-20020a629288000000b003e1c44fa1b7mr28027543pfd.63.1630402487835; \n\tTue, 31 Aug 2021 02:34:47 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 31 Aug 2021 18:34:38 +0900","Message-Id":"<20210831093439.853586-3-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.259.gc128427fd7-goog","In-Reply-To":"<20210831093439.853586-1-hiroh@chromium.org>","References":"<20210831093439.853586-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 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>\n---\n src/android/camera_stream.cpp | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)","diff":"diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex fb10bf06..49a2e336 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@@ -68,6 +70,12 @@ int CameraStream::configure()\n \t\tStreamConfiguration output = configuration();\n \t\toutput.pixelFormat = outFormat;\n \t\tswitch (outFormat) {\n+\t\tcase formats::NV12:\n+\t\t\tpostProcessor_ = std::make_unique<PostProcessorYuv>();\n+\t\t\toutput.size.width = camera3Stream_->width;\n+\t\t\toutput.size.height = camera3Stream_->height;\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","v3","2/3"]}