From patchwork Tue Mar 12 12:12:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 727 Return-Path: Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CA4F5612E8 for ; Tue, 12 Mar 2019 13:12:26 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 61BEC1C0002; Tue, 12 Mar 2019 12:12:26 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 12 Mar 2019 13:12:40 +0100 Message-Id: <20190312121242.2253-13-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312121242.2253-1-jacopo@jmondi.org> References: <20190312121242.2253-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 12/14] libcamera: ipu3: Use NV12 as default image format X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2019 12:12:27 -0000 Now that images come from the ImgU output, hardcode NV12 as default output format. Signed-off-by: Jacopo Mondi --- src/libcamera/pipeline/ipu3/ipu3.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 4d08383291ea..f998f900b219 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -190,6 +190,7 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, IPU3CameraData *data = cameraData(camera); V4L2Subdevice *sensor = data->cio2.sensor; StreamConfiguration *config = &configs[&data->stream_]; + bool found = false; /* * Make sure the sensor produces a raw format compatible with the @@ -208,17 +209,18 @@ PipelineHandlerIPU3::streamConfiguration(Camera *camera, config->width = range.maxWidth; config->height = range.maxHeight; - config->pixelFormat = cio2Code; + found = true; } } /* If not suitable format has been found, return an empty config. */ - if (!config->pixelFormat) { + if (!found) { LOG(IPU3, Error) << "Sensor image format not supported"; return configs; } + config->pixelFormat = V4L2_PIX_FMT_NV12; config->bufferCount = IPU3_BUFFER_COUNT; LOG(IPU3, Debug)