Show a patch.

GET /api/1.1/patches/24945/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24945,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/24945/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24945/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20251102150810.5415-1-laurent.pinchart@ideasonboard.com>",
    "date": "2025-11-02T15:08:10",
    "name": "[v3] subprojects: libyuv: Bump to version 1922",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2c9f86afe37f04ec6764cdd799a0e7305255bc07",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24945/mbox/",
    "series": [
        {
            "id": 5551,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5551/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5551",
            "date": "2025-11-02T15:08:10",
            "name": "[v3] subprojects: libyuv: Bump to version 1922",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5551/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24945/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24945/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6A744BDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  2 Nov 2025 15:08:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A76816096B;\n\tSun,  2 Nov 2025 16:08:26 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A57ED606E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  2 Nov 2025 16:08:24 +0100 (CET)",
            "from pendragon.ideasonboard.com (82-203-160-149.bb.dnainternet.fi\n\t[82.203.160.149])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 2F8DD10D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  2 Nov 2025 16:06:32 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"nvqZXN9c\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1762095992;\n\tbh=dHNKDMUv9aYrD4EORLid0EFWs6cVx94OAYgyK8RClzw=;\n\th=From:To:Subject:Date:From;\n\tb=nvqZXN9cH8k7iZxsdhMeU20NjA0JSj2YHsRswqwAtD8I9puLLovAGxn/nj3KnZ8+6\n\t5KJ+BFNwPtl2OIEChTEbv8FAV05i/N2PHpWcJVkea2BxWPLUe2Pax1IEToFGJwDBgq\n\tIwgVd5HEi0T631h73NXpIPJhm7hhfJHVGfrv2Pqg=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH v3] subprojects: libyuv: Bump to version 1922",
        "Date": "Sun,  2 Nov 2025 17:08:10 +0200",
        "Message-ID": "<20251102150810.5415-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The libyuv wrap uses a libyuv commit between versions 1770 and 1772,\nmore than 5 years old. This specifies CMake 2.8 as the minimum required\nversion.\n\nThe most recent CMake has dropped compatibility with versions older than\n3.5 in CMake 4.0. CMake 3.5 was released in 2016, and all distributions\nwe care about ship more recent versions. With CMake 4.0 or newer,\nshipped for instance by Gentoo, compilation of the libyuv wrap fails.\n\nUpdate the wrap to version 1922, which is the latest numbered version\n(libyuv doesn't tag release by increases a version number in the\nREADME.chromium file). This requires CMake 3.16, released 6 years ago,\nand available in at least the last two LTS of major distributions.\n\nThis update introduces two issues. First, due to a bug in Meson (see\nhttps://github.com/mesonbuild/meson/issues/10764), PIC handling is\nbroken when a CMake project wraps a static library into another static\nlibrary that has no additional source file. Work around it by wrapping\nthe libyuv static library again, manually setting 'pic' to true.\n\nThe second issue is that libyuv fails to compile for armhf platforms\nthat don't support NEON instructions. This is the case on Debian 12 and\n13 that ship armhf toolchains with NEON disabled by default. The issue\ncauses CI failures. As the libyuv wrap is a convenience measure, disable\nNEON optimization on armfd platforms the same way Debian does in its\narmhf packages. If NEON support is important, the build environment\nshould provide a suitable libyuv.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\nThis now passes CI: https://gitlab.freedesktop.org/pinchartl/libcamera/-/pipelines/1539176\n\nChanges since v2:\n\n- Disable NEON on armhf\n- Update to version 1922\n\nChanges since v1:\n\n- Update to version 1921\n---\n src/meson.build                               | 16 ++++++-\n subprojects/libyuv.wrap                       |  3 +-\n ...t-Do-not-enable-NEON-for-armel-armhf.patch | 42 +++++++++++++++++++\n 3 files changed, 59 insertions(+), 2 deletions(-)\n create mode 100644 subprojects/packagefiles/libyuv/0004-CMakeLists.txt-Do-not-enable-NEON-for-armel-armhf.patch\n\n\nbase-commit: 760456acfc78419b61c9df01d944007c7f3f6d22\n--\nRegards,\n\nLaurent Pinchart",
    "diff": "diff --git a/src/meson.build b/src/meson.build\nindex 8eb8f05b362f..9b63c8e845d8 100644\n--- a/src/meson.build\n+++ b/src/meson.build\n@@ -55,7 +55,21 @@ if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n          '-Wno-unused-parameter')\n     libyuv_vars.append_link_args('-ljpeg')\n     libyuv = cmake.subproject('libyuv', options : libyuv_vars)\n-    libyuv_dep = libyuv.dependency('yuv')\n+\n+    # Meson fails to apply the -fPIC flag to static libraries produced by CMake\n+    # that wraps other static libraries without adding any source file, despite\n+    # setting CMAKE_POSITION_INDEPENDENT_CODE to ON. See\n+    # https://github.com/mesonbuild/meson/issues/10764.\n+    #\n+    # Work around the issue by wrapping the libyuv static library into another\n+    # static library with 'pic' set to true.\n+    libyuv_static = static_library('libyuv-static',\n+                                   dependencies : libyuv.dependency('yuv'),\n+                                   pic : true,\n+                                   install : false)\n+    libyuv_include = libyuv.include_directories('yuv')\n+    libyuv_dep = declare_dependency(link_with : libyuv_static,\n+                                    include_directories : libyuv_include)\n endif\n\n # libcamera must be built first as a dependency to the other components.\ndiff --git a/subprojects/libyuv.wrap b/subprojects/libyuv.wrap\nindex 3417e73f376c..e892d8a3b5c3 100644\n--- a/subprojects/libyuv.wrap\n+++ b/subprojects/libyuv.wrap\n@@ -3,4 +3,5 @@\n [wrap-git]\n directory = libyuv\n url = https://chromium.googlesource.com/libyuv/libyuv.git\n-revision = 93b1b332cd60b56ab90aea14182755e379c28a80\n+revision = 500f45652c459cfccd20f83f297eb66cb7b015cb\n+diff_files = libyuv/0004-CMakeLists.txt-Do-not-enable-NEON-for-armel-armhf.patch\ndiff --git a/subprojects/packagefiles/libyuv/0004-CMakeLists.txt-Do-not-enable-NEON-for-armel-armhf.patch b/subprojects/packagefiles/libyuv/0004-CMakeLists.txt-Do-not-enable-NEON-for-armel-armhf.patch\nnew file mode 100644\nindex 000000000000..70cbc2c7d32b\n--- /dev/null\n+++ b/subprojects/packagefiles/libyuv/0004-CMakeLists.txt-Do-not-enable-NEON-for-armel-armhf.patch\n@@ -0,0 +1,42 @@\n+From: Boyuan Yang <byang@debian.org>\n+Date: Fri, 8 Nov 2024 08:07:01 -0500\n+Subject: CMakeLists.txt: Do not enable NEON for armel armhf\n+\n+According to https://wiki.debian.org/ArchitectureSpecificsMemo#armel\n+the armhf architecture does not guarantee NEON. Do not enable NEON\n+on armhf. Also disable NEON for armel to prevent FTBFS\n+---\n+ CMakeLists.txt | 19 ++++++++++---------\n+ 1 file changed, 10 insertions(+), 9 deletions(-)\n+\n+diff --git a/CMakeLists.txt b/CMakeLists.txt\n+index bf8be36..783c3d4 100644\n+--- a/CMakeLists.txt\n++++ b/CMakeLists.txt\n+@@ -95,16 +95,17 @@ endif()\n+ if(NOT MSVC)\n+   string(TOLOWER \"${CMAKE_SYSTEM_PROCESSOR}\" arch_lowercase)\n+\n++# Debian-specific: Do not enable Arm Neon kernels on non-arm64 architectures.\n+   if(arch_lowercase MATCHES \"^arm\" AND NOT arch_lowercase STREQUAL \"arm64\")\n+-    # Enable Arm Neon kernels.\n+-    add_definitions(-DLIBYUV_NEON=1)\n+-    add_library(${ly_lib_name}_neon OBJECT\n+-      ${ly_src_dir}/compare_neon.cc\n+-      ${ly_src_dir}/rotate_neon.cc\n+-      ${ly_src_dir}/row_neon.cc\n+-      ${ly_src_dir}/scale_neon.cc)\n+-    target_compile_options(${ly_lib_name}_neon PRIVATE -mfpu=neon)\n+-    list(APPEND ly_lib_parts $<TARGET_OBJECTS:${ly_lib_name}_neon>)\n++    message(\"Debian-specific: Not enabling NEON on ${arch_lowercase}.\")\n++#    add_definitions(-DLIBYUV_NEON=1)\n++#    add_library(${ly_lib_name}_neon OBJECT\n++#      ${ly_src_dir}/compare_neon.cc\n++#      ${ly_src_dir}/rotate_neon.cc\n++#      ${ly_src_dir}/row_neon.cc\n++#      ${ly_src_dir}/scale_neon.cc)\n++#    target_compile_options(${ly_lib_name}_neon PRIVATE -mfpu=neon)\n++#    list(APPEND ly_lib_parts $<TARGET_OBJECTS:${ly_lib_name}_neon>)\n+   endif()\n+\n+   if(arch_lowercase STREQUAL \"aarch64\" OR arch_lowercase STREQUAL \"arm64\")\n",
    "prefixes": [
        "v3"
    ]
}