Show a cover letter.

GET /api/covers/3839/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3839,
    "url": "https://patchwork.libcamera.org/api/covers/3839/?format=api",
    "web_url": "https://patchwork.libcamera.org/cover/3839/",
    "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": "<20200522145459.16836-1-laurent.pinchart@ideasonboard.com>",
    "date": "2020-05-22T14:54:47",
    "name": "[libcamera-devel,PATCH/RFC,00/11] Introduce formats:: namespace for libcamera pixel formats",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/cover/3839/mbox/",
    "series": [
        {
            "id": 923,
            "url": "https://patchwork.libcamera.org/api/series/923/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=923",
            "date": "2020-05-22T14:54:47",
            "name": "Introduce formats:: namespace for libcamera pixel formats",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/923/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/covers/3839/comments/",
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 49220603D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 May 2020 16:55:19 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BF67A24D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 May 2020 16:55:18 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"FK2cZNKA\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1590159318;\n\tbh=h6lJfhzFywCDm7bEHl3pw8stvmhiSr9vBtfx/uYer+c=;\n\th=From:To:Subject:Date:From;\n\tb=FK2cZNKApySAS40J8qQXl2DkNYoxOF7i5EcU+50J1NegZFJdU4GTBZ4e8xK5VWwR3\n\t9kBSM5O/oZKDuUIY8gLRdepDOh8OlZsuHVJHTY0ZqXm9VWYIuLy0/bvAtP+sasii8s\n\ts+arr/XT3bTy77045OTu5C7YgSW7Ki/8twZyc09s=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 22 May 2020 17:54:47 +0300",
        "Message-Id": "<20200522145459.16836-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH/RFC 00/11] Introduce formats:: namespace\n\tfor libcamera pixel 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": "Fri, 22 May 2020 14:55:19 -0000"
    },
    "content": "Hello,\n\nThis patch series is an attempt to fix a problem caused by a direct\ndependency on drm_fourcc.h in the libcamera public API.\n\nlibcamera specifies pixel formats using the DRM pixel format FourCC and\nmodifiers. This requires both internal code and applications to include\ndrm_fourcc.h. For internal code, we carry a copy of the header to avoid\nexternal dependencies. For third-party applications, however,\ndrm_fourcc.h needs to be accessible from system includes. It turns out\nthat the file is shipped by two different packages:\n\n- libdrm, which typically installs it in /usr/include/libdrm/\n- kernel headers or libc headers, which typically installs it in\n  /usr/include/drm\n\nWe don't want to make libdrm a dependency for applications using\nlibcamera. Unfortunately, depending on drm_fourcc.h being provided by\nthe distribution kernel headers or libc headers package causes issues,\nas not all distributions install the header in /usr/include/drm/. Ubuntu\nand Gentoo do, but Debian and Arch don't.\n\nThe best option may be to remove the dependency on the macros provided\nby drm_fourcc.h, while keeping the pixel format numerical values\nidentical. This is what this patch series attempts to do.\n\nPatches 01/11 to 04/11 are preparatory cleanups, please see individual\npatches for details. I believe they make sense regardless of whether the\nrest is accepted or rejected.\n\nPatch 05/11 creates a new libcamera::formats:: namespace and populates\nit with constants (in the form of constexpr) for all supported pixel\nformats. The values have been written manually, which isn't ideal. We\ncould partly automate this process by generating the header from a list\nof formats (likely in a YAML file), and fetching the numerical values\nfrom drm_fourcc.h to make sure they will always match. This could allow\ndocumenting the pixel formats in the YAML file and generating Doxygen\ndocumentation, like we do for controls.\n\nPatches 06/11 to 11/11 then replace usage of the DRM_FORMAT_* macros\nthrough the code, with one exception in the IPU3 pipeline handler to\ndemonstrate how DRM_FORMAT_* values can still be used for internal\nformats. I however believe this will be dropped too, as applications may\nwant to capture RAW data from the IPU3, so the format should likely be\ndefined in the public API.\n\nLaurent Pinchart (11):\n  libcamera: Rename pixelformats.{cpp,h} to pixel_format.{cpp,h}\n  libcamera: Replace C++ comments with C comments\n  libcamera: Rename header guards for internal headers\n  libcamera: pixel_format: Make PixelFormat usable as a constexpr\n  libcamera: Define constants for pixel formats in the public API\n  gst: Replace explicit DRM FourCCs with libcamera formats\n  qcam: Replace explicit DRM FourCCs with libcamera formats\n  v4l2: Replace explicit DRM FourCCs with libcamera formats\n  test: Replace explicit DRM FourCCs with libcamera formats\n  libcamera: pipeline: Replace explicit DRM FourCCs with libcamera\n    formats\n  libcamera: Replace explicit DRM FourCCs with libcamera formats\n\n include/libcamera/control_ids.h.in            |   4 +-\n include/libcamera/formats.h                   |  94 +++++++++++\n .../libcamera/internal/byte_stream_buffer.h   |   6 +-\n include/libcamera/internal/camera_controls.h  |   6 +-\n include/libcamera/internal/camera_sensor.h    |   6 +-\n .../libcamera/internal/control_serializer.h   |   6 +-\n .../libcamera/internal/control_validator.h    |   6 +-\n .../libcamera/internal/device_enumerator.h    |   6 +-\n .../internal/device_enumerator_sysfs.h        |   6 +-\n .../internal/device_enumerator_udev.h         |   6 +-\n .../internal/event_dispatcher_poll.h          |   6 +-\n include/libcamera/internal/file.h             |   6 +-\n include/libcamera/internal/formats.h          |   8 +-\n .../libcamera/internal/ipa_context_wrapper.h  |   6 +-\n include/libcamera/internal/ipa_manager.h      |   6 +-\n include/libcamera/internal/ipa_module.h       |   6 +-\n include/libcamera/internal/ipa_proxy.h        |   6 +-\n include/libcamera/internal/ipc_unixsocket.h   |   6 +-\n include/libcamera/internal/log.h              |   6 +-\n include/libcamera/internal/media_device.h     |   6 +-\n include/libcamera/internal/media_object.h     |   6 +-\n include/libcamera/internal/message.h          |   6 +-\n include/libcamera/internal/pipeline_handler.h |   6 +-\n include/libcamera/internal/process.h          |   6 +-\n include/libcamera/internal/pub_key.h          |   6 +-\n include/libcamera/internal/semaphore.h        |   6 +-\n include/libcamera/internal/thread.h           |   6 +-\n include/libcamera/internal/utils.h            |   6 +-\n include/libcamera/internal/v4l2_controls.h    |   6 +-\n include/libcamera/internal/v4l2_device.h      |   6 +-\n include/libcamera/internal/v4l2_pixelformat.h |   8 +-\n include/libcamera/internal/v4l2_subdevice.h   |   6 +-\n include/libcamera/internal/v4l2_videodevice.h |   8 +-\n include/libcamera/meson.build                 |   3 +-\n include/libcamera/pixel_format.h              |  48 ++++++\n include/libcamera/pixelformats.h              |  43 -----\n include/libcamera/property_ids.h.in           |   6 +-\n include/libcamera/stream.h                    |   2 +-\n src/gstreamer/gstlibcamera-utils.cpp          |  62 ++++----\n src/libcamera/formats.cpp                     | 148 +++++++++---------\n src/libcamera/meson.build                     |   2 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp          |   8 +-\n .../pipeline/raspberrypi/raspberrypi.cpp      |  10 +-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  19 +--\n src/libcamera/pipeline/simple/converter.h     |   2 +-\n src/libcamera/pipeline/vimc/vimc.cpp          |  11 +-\n .../{pixelformats.cpp => pixel_format.cpp}    |  19 +--\n src/libcamera/v4l2_pixelformat.cpp            |  85 +++++-----\n src/qcam/dng_writer.cpp                       |  17 +-\n src/qcam/format_converter.cpp                 |  36 +++--\n src/qcam/format_converter.h                   |   2 +-\n src/qcam/viewfinder.cpp                       |  10 +-\n src/qcam/viewfinder.h                         |   2 +-\n src/v4l2/v4l2_camera_proxy.cpp                |  27 ++--\n test/v4l2_videodevice/buffer_cache.cpp        |   3 +-\n 55 files changed, 477 insertions(+), 378 deletions(-)\n create mode 100644 include/libcamera/formats.h\n create mode 100644 include/libcamera/pixel_format.h\n delete mode 100644 include/libcamera/pixelformats.h\n rename src/libcamera/{pixelformats.cpp => pixel_format.cpp} (89%)"
}