{"id":1083,"url":"https://patchwork.libcamera.org/api/1.1/patches/1083/?format=json","web_url":"https://patchwork.libcamera.org/patch/1083/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20190419102844.6838-2-laurent.pinchart@ideasonboard.com>","date":"2019-04-19T10:28:42","name":"[libcamera-devel,v2,2/4] libcamera: pipeline: rkisp1: Don't hardcode NV12 in configureStreams()","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"76d64274dd929ca231481b2d602521a006548d90","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1083/mbox/","series":[{"id":262,"url":"https://patchwork.libcamera.org/api/1.1/series/262/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=262","date":"2019-04-19T10:28:41","name":"[libcamera-devel,v2,1/4] libcamera: Document documentation style and update the code accordingly","version":2,"mbox":"https://patchwork.libcamera.org/series/262/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1083/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1083/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DE8E60004\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Apr 2019 12:29:07 +0200 (CEST)","from pendragon.bb.dnainternet.fi (unknown\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 10873333\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Apr 2019 12:29:07 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1555669747;\n\tbh=+w+p2VuL/BLahLwZ8a8YeXYrc9sDt4hVviKmMNwGLWA=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=cOpAeD5PqykNAgjABimeuxj45Ggn7gwtQUEi1pZoY2svQJVqBw7N+/2AFw4jjpXZW\n\t5HEwrzzBABbu/YfPbhK8Aq5/xu5vEmIZsxu4UdnSCVzdg6Kprqep/gI8TyMP8qO7nQ\n\tfmzvtpow5UZQVRuBrUofKOThvTxA9HFfpOOhOC/g=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 19 Apr 2019 13:28:42 +0300","Message-Id":"<20190419102844.6838-2-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.21.0","In-Reply-To":"<20190419102844.6838-1-laurent.pinchart@ideasonboard.com>","References":"<20190419102844.6838-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 2/4] libcamera: pipeline: rkisp1: Don't\n\thardcode NV12 in configureStreams()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 19 Apr 2019 10:29:07 -0000"},"content":"Use the pixel format requested by the application in the\nRkISP1PipelineHandler::configureStreams() method instead of hardcoding\nNV12. The streamsConfiguration() method still proposes NV12 by default.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 8ed0ba84780a..51f00fb68402 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -223,7 +223,7 @@ int PipelineHandlerRkISP1::configureStreams(Camera *camera,\n \tV4L2DeviceFormat outputFormat = {};\n \toutputFormat.width = cfg.width;\n \toutputFormat.height = cfg.height;\n-\toutputFormat.fourcc = V4L2_PIX_FMT_NV12;\n+\toutputFormat.fourcc = cfg.pixelFormat;\n \toutputFormat.planesCount = 2;\n \n \tret = video_->setFormat(&outputFormat);\n@@ -232,12 +232,12 @@ int PipelineHandlerRkISP1::configureStreams(Camera *camera,\n \n \tif (outputFormat.width != cfg.width ||\n \t    outputFormat.height != cfg.height ||\n-\t    outputFormat.fourcc != V4L2_PIX_FMT_NV12) {\n+\t    outputFormat.fourcc != cfg.pixelFormat) {\n \t\tLOG(RkISP1, Error)\n \t\t\t<< \"Unable to configure capture in \" << cfg.width\n \t\t\t<< \"x\" << cfg.height << \"-0x\"\n \t\t\t<< std::hex << std::setfill('0') << std::setw(8)\n-\t\t\t<< V4L2_PIX_FMT_NV12;\n+\t\t\t<< cfg.pixelFormat;\n \t\treturn -EINVAL;\n \t}\n \n","prefixes":["libcamera-devel","v2","2/4"]}