Patch Detail
Show a patch.
GET /api/patches/2247/?format=api
{ "id": 2247, "url": "https://patchwork.libcamera.org/api/patches/2247/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2247/", "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": "<20191027234312.35284-10-jacopo@jmondi.org>", "date": "2019-10-27T23:43:11", "name": "[libcamera-devel,09/10] qcam: Convert to use DRM formats", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "02a4e128392beeed139194627bfeade1d74b017c", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2247/mbox/", "series": [ { "id": 559, "url": "https://patchwork.libcamera.org/api/series/559/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=559", "date": "2019-10-27T23:43:02", "name": "libcamera: Use DRM_FORMAT_* fourcc codes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/559/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2247/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2247/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BD8466151F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 00:41:29 +0100 (CET)", "from uno.localdomain (143.121.2.93.rev.sfr.net [93.2.121.143])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5BC9B20004;\n\tSun, 27 Oct 2019 23:41:29 +0000 (UTC)" ], "X-Originating-IP": "93.2.121.143", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 28 Oct 2019 00:43:11 +0100", "Message-Id": "<20191027234312.35284-10-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191027234312.35284-1-jacopo@jmondi.org>", "References": "<20191027234312.35284-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 09/10] qcam: Convert to use DRM formats", "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>", "X-List-Received-Date": "Sun, 27 Oct 2019 23:41:30 -0000" }, "content": "Use DRM_FORMAT_* fourcc codes in place of the V4L2_PIX_FMT_* ones in the\nqcam format conversion routine.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/qcam/format_converter.cpp | 30 +++++++++++++++---------------\n 1 file changed, 15 insertions(+), 15 deletions(-)", "diff": "diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp\nindex 86b03b2cd84d..383d48223140 100644\n--- a/src/qcam/format_converter.cpp\n+++ b/src/qcam/format_converter.cpp\n@@ -7,7 +7,7 @@\n \n #include <errno.h>\n \n-#include <linux/videodev2.h>\n+#include <linux/drm_fourcc.h>\n \n #include <QImage>\n \n@@ -31,84 +31,84 @@ int FormatConverter::configure(unsigned int format, unsigned int width,\n \t\t\t unsigned int height)\n {\n \tswitch (format) {\n-\tcase V4L2_PIX_FMT_NV12:\n+\tcase DRM_FORMAT_NV12:\n \t\tformatFamily_ = NV;\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 2;\n \t\tnvSwap_ = false;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_NV21:\n+\tcase DRM_FORMAT_NV21:\n \t\tformatFamily_ = NV;\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 2;\n \t\tnvSwap_ = true;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_NV16:\n+\tcase DRM_FORMAT_NV16:\n \t\tformatFamily_ = NV;\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 1;\n \t\tnvSwap_ = false;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_NV61:\n+\tcase DRM_FORMAT_NV61:\n \t\tformatFamily_ = NV;\n \t\thorzSubSample_ = 2;\n \t\tvertSubSample_ = 1;\n \t\tnvSwap_ = true;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_NV24:\n+\tcase DRM_FORMAT_NV24:\n \t\tformatFamily_ = NV;\n \t\thorzSubSample_ = 1;\n \t\tvertSubSample_ = 1;\n \t\tnvSwap_ = false;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_NV42:\n+\tcase DRM_FORMAT_NV42:\n \t\tformatFamily_ = NV;\n \t\thorzSubSample_ = 1;\n \t\tvertSubSample_ = 1;\n \t\tnvSwap_ = true;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_BGR24:\n+\tcase DRM_FORMAT_RGB888:\n \t\tformatFamily_ = RGB;\n \t\tr_pos_ = 2;\n \t\tg_pos_ = 1;\n \t\tb_pos_ = 0;\n \t\tbpp_ = 3;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_RGB24:\n+\tcase DRM_FORMAT_BGR888:\n \t\tformatFamily_ = RGB;\n \t\tr_pos_ = 0;\n \t\tg_pos_ = 1;\n \t\tb_pos_ = 2;\n \t\tbpp_ = 3;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_ARGB32:\n+\tcase DRM_FORMAT_BGRA8888:\n \t\tformatFamily_ = RGB;\n \t\tr_pos_ = 1;\n \t\tg_pos_ = 2;\n \t\tb_pos_ = 3;\n \t\tbpp_ = 4;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_VYUY:\n+\tcase DRM_FORMAT_VYUY:\n \t\tformatFamily_ = YUV;\n \t\ty_pos_ = 1;\n \t\tcb_pos_ = 2;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_YVYU:\n+\tcase DRM_FORMAT_YVYU:\n \t\tformatFamily_ = YUV;\n \t\ty_pos_ = 0;\n \t\tcb_pos_ = 3;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_UYVY:\n+\tcase DRM_FORMAT_UYVY:\n \t\tformatFamily_ = YUV;\n \t\ty_pos_ = 1;\n \t\tcb_pos_ = 0;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_YUYV:\n+\tcase DRM_FORMAT_YUYV:\n \t\tformatFamily_ = YUV;\n \t\ty_pos_ = 0;\n \t\tcb_pos_ = 1;\n \t\tbreak;\n-\tcase V4L2_PIX_FMT_MJPEG:\n+\tcase DRM_FORMAT_MJPEG:\n \t\tformatFamily_ = MJPEG;\n \t\tbreak;\n \tdefault:\n", "prefixes": [ "libcamera-devel", "09/10" ] }