Patch Detail
Show a patch.
GET /api/patches/19007/?format=api
{ "id": 19007, "url": "https://patchwork.libcamera.org/api/patches/19007/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19007/", "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": "<20230915-libyuv-convert-v1-1-1e5bcf68adac@baylibre.com>", "date": "2023-09-15T07:57:25", "name": "[libcamera-devel,RFC,1/7] android: yuv: separate source destination in length check", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "02362b3883ccb12743d79c0a12b828ec3e13d177", "submitter": { "id": 153, "url": "https://patchwork.libcamera.org/api/people/153/?format=api", "name": "Mattijs Korpershoek", "email": "mkorpershoek@baylibre.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19007/mbox/", "series": [ { "id": 4023, "url": "https://patchwork.libcamera.org/api/series/4023/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4023", "date": "2023-09-15T07:57:24", "name": "android: add YUYV->NV12 conversion via libyuv", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4023/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19007/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19007/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 8D7AEBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Sep 2023 07:57:33 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6F72462922;\n\tFri, 15 Sep 2023 09:57:31 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CC74262911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Sep 2023 09:57:28 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-401b393ddd2so21128535e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Sep 2023 00:57:28 -0700 (PDT)", "from [192.168.1.20] ([2a01:cb19:8704:be00:4f55:bd9d:611a:6c8e])\n\tby smtp.gmail.com with ESMTPSA id\n\tm2-20020a056000174200b0031fe9a47a87sm2506942wrf.112.2023.09.15.00.57.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 15 Sep 2023 00:57:27 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694764651;\n\tbh=BlimaKRl0xyLPQ0r4LM+wfkESh4Lofh1vu5Ia6W5Lns=;\n\th=Date:References:In-Reply-To:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=zqBrziG973kVpkXnlw6dhR96AM2xGB1S5etxutBLVc81UFTLjMPvOQ+dNo0YtIHcE\n\t6FdnVWRwEM8IN2u4nrfLxBwG76tiAMMV0VhQ7YZEZ+OtWZ0P5Ng5UAl47H/InrTxKD\n\tFBtscG4PWT2u/UQsoyJv40S8WTAdjgCvnkJTieZ48Vv9X8zFArgZT7IY5PEiSonf3V\n\thg9M21fVrNtoI3CAk3m7gLGScE+otZj89mlV1Q5YQVVkMPn8Rj7QA0AlTqpsGFGJ+R\n\tQg5el2ixSaVNbmKYSOJt8ZnridnJkXnAI3MHeGGqB1rawxYDrDRouyERFeDwSeQqwF\n\tD3r8BNIkbab/w==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1694764648;\n\tx=1695369448; darn=lists.libcamera.org; \n\th=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n\t:mime-version:subject:date:from:from:to:cc:subject:date:message-id\n\t:reply-to; bh=FR44mURV+pW3PtQs626ezxxVyqhFayqZPrHLiDOr1BA=;\n\tb=NFJqjrLIX290GGyJ8EUEM+zHhjN60okgBgvoJJp/zkhNnBV7fC9f65Je53A/kQoI+P\n\tnhQc6p873JMr+7T3iC69cTmDmoWrOvpte6BrNqR6VIcHXTj0QEeFTEjqlfzUVbLAwAek\n\ta0y/dQIiT5SPcnArEP1y1En64aXkCUSBHZoNj2gn+ZR4pV01Szh2FG5U8QoT30w76ixP\n\t8A4VFngT1lC0wOM4eNxh2+RFRE+/mWuRWhN90flitrfGQfl13lMrWK++ZxnVt80TQF8z\n\tUeFKRlHBP9BU+MWop5FzWVTqm+Y1pfWWJ/t2a0Q72uk/FK6W1KsCXoXTQn22TjrchOVM\n\tyeLw==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20230601.gappssmtp.com\n\theader.i=@baylibre-com.20230601.gappssmtp.com header.b=\"NFJqjrLI\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1694764648; x=1695369448;\n\th=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n\t:mime-version:subject:date:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=FR44mURV+pW3PtQs626ezxxVyqhFayqZPrHLiDOr1BA=;\n\tb=hy7bBWX1nrPwHc+qgYgeF2B7/0vGeT5iM+EIntuUjJyF/xPpiwc9vIXzDsUlKiD6PG\n\tEVFfZBuriUMXulFHILY8S/wHTLl7rCIbc/UdQkcWTFpOXhEOqRX8NSCPELE6NJpozCeY\n\txDeRLcZzvvzbVCFEIxZhyaCp62qDvaOMndXrru+yrnY8KIdBQ5rVNIfOPlJGkXqCTl1S\n\tNfDEjSoNWoNw9ei6UYh7vUMh7Ahqvt6VwvrsPVTtoWYXsE0ssqNu+5pos8ppaaISv5nZ\n\tSkWwnkl/+pttMW4V97qEuCpmnVLK5gA5oMyZT354PTK06qCb1nPQU+6jebNY7zeOSY5d\n\tDS+g==", "X-Gm-Message-State": "AOJu0Yzg8HFxG79cC1QxsDWtFk8kywQBZJ47yyPMnSdT+jJMxxxrrkQ/\n\tNaGhvQd0u480L8lmPv6pWm1y0zzW1th15t/f3rY=", "X-Google-Smtp-Source": "AGHT+IG/o48nMAFDqtTdhmW98ZQ9QbtRFVthl1zYYqzjnCnJafEHyqeZp5w7BIvqTIikacsctL5ALA==", "X-Received": "by 2002:adf:b604:0:b0:31f:f662:8ec5 with SMTP id\n\tf4-20020adfb604000000b0031ff6628ec5mr543006wre.55.1694764648249; \n\tFri, 15 Sep 2023 00:57:28 -0700 (PDT)", "Date": "Fri, 15 Sep 2023 09:57:25 +0200", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20230915-libyuv-convert-v1-1-1e5bcf68adac@baylibre.com>", "References": "<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>", "In-Reply-To": "<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>", "To": "libcamera-devel@lists.libcamera.org", "X-Mailer": "b4 0.12.4-dev-6aa5d", "Subject": "[libcamera-devel] [PATCH RFC 1/7] android: yuv: separate source\n\tdestination in length check", "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>", "From": "Mattijs Korpershoek via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Mattijs Korpershoek <mkorpershoek@baylibre.com>", "Cc": "Guillaume La Roque <glaroque@baylibre.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Right now, the assumption of PostProcessorYuv is that both the source\nand the destination are in formats::NV12.\n\nThis might change in the future, if we add other formats or pixel format\nconversion as supported in libyuv.\n\nSplit out source and destination check to prepare for that.\n\nNo functional change.\n\nSigned-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>\n---\n src/android/yuv/post_processor_yuv.cpp | 15 +++++++++------\n 1 file changed, 9 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\nindex ed44e6fe02da..9631c9617154 100644\n--- a/src/android/yuv/post_processor_yuv.cpp\n+++ b/src/android/yuv/post_processor_yuv.cpp\n@@ -133,14 +133,17 @@ void PostProcessorYuv::calculateLengths(const StreamConfiguration &inCfg,\n \tsourceSize_ = inCfg.size;\n \tdestinationSize_ = outCfg.size;\n \n-\tconst PixelFormatInfo &nv12Info = PixelFormatInfo::info(formats::NV12);\n+\tconst PixelFormatInfo &sourceInfo = PixelFormatInfo::info(formats::NV12);\n \tfor (unsigned int i = 0; i < 2; i++) {\n \t\tsourceStride_[i] = inCfg.stride;\n-\t\tdestinationStride_[i] = nv12Info.stride(destinationSize_.width, i, 1);\n+\t\tsourceLength_[i] = sourceInfo.planeSize(sourceSize_.height, i,\n+\t\t\t\t\t\t\tsourceStride_[i]);\n+\t}\n \n-\t\tsourceLength_[i] = nv12Info.planeSize(sourceSize_.height, i,\n-\t\t\t\t\t\t sourceStride_[i]);\n-\t\tdestinationLength_[i] = nv12Info.planeSize(destinationSize_.height, i,\n-\t\t\t\t\t\t\t destinationStride_[i]);\n+\tconst PixelFormatInfo &destinationInfo = PixelFormatInfo::info(formats::NV12);\n+\tfor (unsigned int i = 0; i < 2; i++) {\n+\t\tdestinationStride_[i] = sourceInfo.stride(destinationSize_.width, i, 1);\n+\t\tdestinationLength_[i] = sourceInfo.planeSize(destinationSize_.height, i,\n+\t\t\t\t\t\t\t destinationStride_[i]);\n \t}\n }\n", "prefixes": [ "libcamera-devel", "RFC", "1/7" ] }