From patchwork Sat Jul 23 09:53:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16747 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A07E1BE173 for ; Sat, 23 Jul 2022 09:54:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 603CC63318; Sat, 23 Jul 2022 11:54:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658570063; bh=TNmhER/6vcCjomAJMxRoFjHfiVSzZ3e3UoIOzQmmC2M=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oBJFqdQL4uMB0aIbodbdMdWV4ZkdLMViggReFirwk7LXcUyvc2MmXuJ4JxutJuyEy +/KMVXeDZeEljXDNpNdAPx/BoDIKqTITijzbaMUabzoJz7QaPI0OGFAoQdfB9deEN2 yPnqbD/h1zL9CjmSIisNkLI/fUhgWTVzuYZT5wV/K9rzEdCxBfh5nOJ2M/0K/PBgeE 4sDcMRa3jE/inNtUelOwSwJ6Haif4+FNZkA9CHUjUSU5WZ6XdGl+ksAZ/8U5ieUv7h bwE8arknbZYBKT5Aei563pwUuJ+tJ/G6V1Bs3ClAD77qYwAi4UizDlD5r1dnCIsw9j +agqqB3zwKTew== Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B2F896330D for ; Sat, 23 Jul 2022 11:54:21 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 989DA1BF204; Sat, 23 Jul 2022 09:54:19 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Sat, 23 Jul 2022 11:53:30 +0200 Message-Id: <20220723095330.43542-9-jacopo@jmondi.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220723095330.43542-1-jacopo@jmondi.org> References: <20220723095330.43542-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 8/8] libcamera: v4l2_pixelformat: Map formats::MJPEG to V4L2_PIX_FMT_JPEG X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: jozef@mlich.cz, Pavel Machek Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Map the application visibile formats::MJPEG format to the V4L2_PIX_FMT_JPEG format. Both V4L2_PIX_FMT_JPEG and V4L2_PIX_FMT_MJPEG map to the same libcamera MJPEG format. Signed-off-by: Jacopo Mondi --- src/libcamera/v4l2_pixelformat.cpp | 2 ++ 1 file changed, 2 insertions(+) -- 2.37.1 diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp index 7ab63f092a28..8d3bc5d534c5 100644 --- a/src/libcamera/v4l2_pixelformat.cpp +++ b/src/libcamera/v4l2_pixelformat.cpp @@ -183,6 +183,8 @@ const std::map vpf2pf{ /* Compressed formats. */ { V4L2PixelFormat(V4L2_PIX_FMT_MJPEG), { formats::MJPEG, "Motion-JPEG" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_JPEG), + { formats::MJPEG, "JPEG JFIF" } }, }; } /* namespace */