Patch Detail
Show a patch.
GET /api/patches/23594/?format=api
{ "id": 23594, "url": "https://patchwork.libcamera.org/api/patches/23594/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23594/", "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": "<20250618120204.3047218-1-chenghaoyang@google.com>", "date": "2025-06-18T12:01:59", "name": "EncoderLibJpeg: Fix struct JPEGPixelFormatInfo::PixelFormatInfo", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2aeb30eb8ef9e6af6b1dab77fcd41c543388d944", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23594/mbox/", "series": [ { "id": 5227, "url": "https://patchwork.libcamera.org/api/series/5227/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5227", "date": "2025-06-18T12:01:59", "name": "EncoderLibJpeg: Fix struct JPEGPixelFormatInfo::PixelFormatInfo", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5227/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23594/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23594/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 65983C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Jun 2025 12:02:14 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 711F468DCC;\n\tWed, 18 Jun 2025 14:02:13 +0200 (CEST)", "from mail-pl1-x636.google.com (mail-pl1-x636.google.com\n\t[IPv6:2607:f8b0:4864:20::636])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F04268DC1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Jun 2025 14:02:11 +0200 (CEST)", "by mail-pl1-x636.google.com with SMTP id\n\td9443c01a7336-23649faf69fso67900525ad.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Jun 2025 05:02:11 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(208.158.221.35.bc.googleusercontent.com. [35.221.158.208])\n\tby smtp.gmail.com with ESMTPSA id\n\td9443c01a7336-2365e0d0abdsm98177225ad.254.2025.06.18.05.02.08\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Jun 2025 05:02:08 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"SEm/jma9\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1750248129; x=1750852929;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=IhCIWYX1AwphQdzHNhBbg8U9fwP/rT5ClZR80O+h3Cg=;\n\tb=SEm/jma9XQJWe0rB8qLWGiz5NJa5WGtDnMlqL/KslMQQzu8DnV4Q6N15jkUrLDWyFi\n\tKC8VDOmbXhEDJVYIp43ykPz1E+hZxZ+WcJE/iLi7C0svYRo3zcwjmCRrJSiXMcU7InpR\n\teWa918B4t00Q95fQwD1UuUxbAzps+Q3TmFQFY=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1750248129; x=1750852929;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=IhCIWYX1AwphQdzHNhBbg8U9fwP/rT5ClZR80O+h3Cg=;\n\tb=g0qAVu7wgXwX9gKdJQUyfcgo0qLpm2wrX1K3ExosoCSJNQ5s3xLKw4HR1INewcjTXG\n\taEoi9qA5zizLfa49bFxXKyuKydmVFROPUOxDqJa38OE++OhVQlHGEBCv+3Y/bI9EL31L\n\tkx7j6UoAH5mlujBOrH6zOLzanLxdkAgyvpCsf0hRMYxUaKbA1qOEfqambg44yF7lI9Dt\n\tBMY+B6Xflv/bLa9FFxDVl45JLATBaeP9PNL26ZAKwA8yHD25/+yabeG3Mug8V4Mzr8uy\n\tyOkHbEZJA3h9cWnA9J1VIBayI1538w7GQiTBiARhMyJS2/TWpD/JnCLSSfV10UJcO0ez\n\tC74g==", "X-Gm-Message-State": "AOJu0YyHrQbxB4dXPLxFjK6/5McVH6wx86F9pYK7XZWs1sq6egmEGdEf\n\tpe7lzdK1kDrFxiyYOHBVpJbi9ruOKR3sXgOUckJrhtNNg+TK0POZ13Yo00Fx9UWhG7UenYa7jFi\n\tMdIU=", "X-Gm-Gg": "ASbGncs+UJxPXUutE9fXIKNbz4aWk7znqNYXR7JeP7+q6NWHQ4+UlHG4WIpwdDmNRpQ\n\triuVznx6GMrcliyyOmFOSqIpm8deAmJjtQHUxjGHYQevsVc3R6u1uMugWRU4WoRJOTse4fcjwTx\n\tNAJhApGujLjFBbq+a1NQ6Q3ppmNhgknbmaSodZPTeRxtxxBIWAFo/toIBQYhTAgGPV4Qp2pjtq9\n\t5nPdZPJJV0+ouiAuZs4xZvQpFOB9HZZnqC+rdda5qkxI9wNSr7oTAHKdW0TippDMwSUVqSDUSxY\n\tUR+zalWjZFQU3l8e7FWbMdIsnllvfkZlkGYjoFIbyLxNpu4NAfY5reSmQ0NqVDbl+qVWNCDXyHG\n\tu7BRvsj0vKn+oHaJFoSh4Y+/IGPtwJD09CAEMjB65gf9FvKwvqg2gC7arPAepcBhpZQ==", "X-Google-Smtp-Source": "AGHT+IHJcGn0g39XVlCJFPbdy5IuUNoAWb241IZBt/Ftz9VeqSYiy6SCu25sGIA8EMYiaWXfr9H6Rg==", "X-Received": "by 2002:a17:902:ce85:b0:234:948b:91c7 with SMTP id\n\td9443c01a7336-2366b17db88mr237464555ad.51.1750248129218; \n\tWed, 18 Jun 2025 05:02:09 -0700 (PDT)", "From": "Harvey Yang <chenghaoyang@chromium.org>", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>", "Subject": "[PATCH] EncoderLibJpeg: Fix struct\n\tJPEGPixelFormatInfo::PixelFormatInfo", "Date": "Wed, 18 Jun 2025 12:01:59 +0000", "Message-ID": "<20250618120204.3047218-1-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.50.0.rc2.696.g1fc2a0284f-goog", "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": "Previously, JPEGPixelFormatInfo::PixelFormatInfo is a const reference.\nHowever, the use cases of it are mostly from temporarily constructed\ninstances, which will be destructed right after setting up\nJPEGPixelFormatInfo.\n\nTo avoid data corruption, JPEGPixelFormatInfo::PixelFormatInfo should be\na pure constant member variable instead.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n src/android/jpeg/encoder_libjpeg.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp\nindex cb242b5ec6a8..0c088535f0be 100644\n--- a/src/android/jpeg/encoder_libjpeg.cpp\n+++ b/src/android/jpeg/encoder_libjpeg.cpp\n@@ -34,7 +34,7 @@ namespace {\n \n struct JPEGPixelFormatInfo {\n \tJ_COLOR_SPACE colorSpace;\n-\tconst PixelFormatInfo &pixelFormatInfo;\n+\tconst PixelFormatInfo pixelFormatInfo;\n \tbool nvSwap;\n };\n \n", "prefixes": [] }