[{"id":27844,"web_url":"https://patchwork.libcamera.org/comment/27844/","msgid":"<gunggdgnqdovwfvg2spbcdxt2ybtiayjl6y7shvnjnrofz5xva@z2bgwjzpft75>","date":"2023-09-22T10:34:23","subject":"Re: [libcamera-devel] [PATCH RFC 1/7] android: yuv: separate source\n\tdestination in length check","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Mattijs\n\nOn Fri, Sep 15, 2023 at 09:57:25AM +0200, Mattijs Korpershoek via libcamera-devel wrote:\n> Right now, the assumption of PostProcessorYuv is that both the source\n> and the destination are in formats::NV12.\n>\n> This might change in the future, if we add other formats or pixel format\n> conversion as supported in libyuv.\n>\n> Split out source and destination check to prepare for that.\n>\n> No functional change.\n>\n> Signed-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(-)\n>\n> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\n> index 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\nYou probably want to use the newly introduced destinationInfo here ?\n\n>  \t}\n>  }\n>\n> --\n> 2.41.0\n>","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 290F4BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Sep 2023 10:34:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71C0D62944;\n\tFri, 22 Sep 2023 12:34:29 +0200 (CEST)","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 D450F6291F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Sep 2023 12:34:26 +0200 (CEST)","from ideasonboard.com (93-46-82-201.ip106.fastwebnet.it\n\t[93.46.82.201])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A5EF8BC4;\n\tFri, 22 Sep 2023 12:32:48 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1695378869;\n\tbh=palmk6aQi8QJMsmbDKKs1wzB/zj3DCMbkA6gFjFaezk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=V4Py2n0HZZH8gTXl7rUTquDsNa4D7dbXJMXQS8goWBgaYHI0wccQemj6146SlwqSD\n\t2V7mDzdnjSK0hWv7H+h533W5T3Jspf1TOhd49QN8xYJcDkkSh0w5CZpAEuezluSvKq\n\tLFgJGxEO0W23IRmtnDpw/CYhvhQ1N2poHCcYf59ZzkPOGyjvuplmXXZuMUTE6MYd2r\n\tTnCxca1x2q8Ng6NVzpaJhclLfayjnJCJuZPkokGN+7nzaLldqY91MLuxOWOeFK26L6\n\th2e+MyTKRTKfhpBxMHFs/7UDe5eKWol2b+HjTIXPkh6DZ9JRfHxXBk/kqXyCzmOz8N\n\tlJEjsDFvFGf1g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1695378768;\n\tbh=palmk6aQi8QJMsmbDKKs1wzB/zj3DCMbkA6gFjFaezk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=GxF29mblXUHrgiv4kRmGLHAgzLPDNZfXfQJQtie7RWPjXd1uFaaJBK6+BuuRsEvb/\n\tIOu0cWumK2/a4QgIs+l5q2dTTSbnkSP+dzGsrxOM8f/X0hmOdgCZmnOzRy+MaKqNTD\n\t5p5duroAW9Vd7STKMM1IYjjH4zwBGPIOASwNspXU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"GxF29mbl\"; dkim-atps=neutral","Date":"Fri, 22 Sep 2023 12:34:23 +0200","To":"Mattijs Korpershoek <mkorpershoek@baylibre.com>","Message-ID":"<gunggdgnqdovwfvg2spbcdxt2ybtiayjl6y7shvnjnrofz5xva@z2bgwjzpft75>","References":"<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>\n\t<20230915-libyuv-convert-v1-1-1e5bcf68adac@baylibre.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230915-libyuv-convert-v1-1-1e5bcf68adac@baylibre.com>","Subject":"Re: [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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tGuillaume La Roque <glaroque@baylibre.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27851,"web_url":"https://patchwork.libcamera.org/comment/27851/","msgid":"<87jzsfiy67.fsf@baylibre.com>","date":"2023-09-24T11:54:40","subject":"Re: [libcamera-devel] [PATCH RFC 1/7] android: yuv: separate source\n\tdestination in length check","submitter":{"id":153,"url":"https://patchwork.libcamera.org/api/people/153/","name":"Mattijs Korpershoek","email":"mkorpershoek@baylibre.com"},"content":"Hi Jacopo,\n\nThank you for your review.\n\nOn ven., sept. 22, 2023 at 12:34, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n\n> Hi Mattijs\n>\n> On Fri, Sep 15, 2023 at 09:57:25AM +0200, Mattijs Korpershoek via libcamera-devel wrote:\n>> Right now, the assumption of PostProcessorYuv is that both the source\n>> and the destination are in formats::NV12.\n>>\n>> This might change in the future, if we add other formats or pixel format\n>> conversion as supported in libyuv.\n>>\n>> Split out source and destination check to prepare for that.\n>>\n>> No functional change.\n>>\n>> Signed-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(-)\n>>\n>> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\n>> index 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>\n> You probably want to use the newly introduced destinationInfo here ?\n\nUrgh. Indeed. Thank you for catching this, will fix in v2.\n\n>\n>>  \t}\n>>  }\n>>\n>> --\n>> 2.41.0\n>>","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 EC829BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 24 Sep 2023 11:54:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3439362944;\n\tSun, 24 Sep 2023 13:54:51 +0200 (CEST)","from mail-lj1-x230.google.com (mail-lj1-x230.google.com\n\t[IPv6:2a00:1450:4864:20::230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 905F362916\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Sep 2023 13:54:49 +0200 (CEST)","by mail-lj1-x230.google.com with SMTP id\n\t38308e7fff4ca-2c15463ddd4so14085691fa.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Sep 2023 04:54:49 -0700 (PDT)","from localhost ([89.207.171.157]) by smtp.gmail.com with ESMTPSA id\n\tq26-20020a1709064c9a00b009ad87fd4e65sm4979966eju.108.2023.09.24.04.54.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 24 Sep 2023 04:54:47 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1695556491;\n\tbh=hn/AM2eT2a2WqhBgZop/enRxyx/xUdygOBN/I0HEklU=;\n\th=To:In-Reply-To:References:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=QYRJJdrNUR7qOtGT4pimZCtlOx10r0afINqce4Nb7Z6Izph2B7tJ4+zhO6cV32M4n\n\tYhFF9h+M18ynAhf/IRKX1kdcNZ+/pooO8DI2LM0wFvOOgpKLsB9q8EsE/HOK8fLzuD\n\tsPlNXJpDxvbXs2bIr4pwTk+1du21DOUs6AvbY8jvH5WRwonSO4jtDM13tah1ibWJ/5\n\t49MJTYZLb3UOGw6T9XLxo/y5GdKjZpqj+FXdOaSCGwz+YNmCFFaA1SD4Zjj+trAE3A\n\t3AL8bHfJONcjvyEBe2wqqfgx+6m5tSlRjqaHS4HYs+2bnph7dm6QUYOoo3WkJ/AsIv\n\tXll3acVIvKdaQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695556488;\n\tx=1696161288; darn=lists.libcamera.org; \n\th=mime-version:message-id:date:references:in-reply-to:subject:cc:to\n\t:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=rjDm1yfTx3+tRKDUXL6R2olQRh1RB6iUCUimt5YeOjE=;\n\tb=SsBJLo3+8vutEFXMDxf/k1z3wIWhBsjUoQtk87h4YS5FR8gJJRTuMgD3u1EJMZpNBH\n\tSRj6EtGy+PiBsxvBHyGnJy5TdUQAF3VcZE/yYqlUcLEwJzpdSLGhJ/GoEQ0B0vygbXnM\n\tWfW2/KW3JscfeQYTcz9Se3mdSLX5/ajaOaLPVp99lkdw/UrFEcAigEk+HMp4CQ8row+5\n\tBsVrbV9eH9rYextWhBoG8ok/FJDD9tq4fBBgehXBNc+NYcumn8AIdyXSML4EeNcveOV2\n\tRuKooa1MqizEiT3Y2g/on/uGdkqaOGJrBa0f/dGk7napcrgeIEKiEfVHt/ofoBUXqYgz\n\tyicw=="],"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=\"SsBJLo3+\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1695556488; x=1696161288;\n\th=mime-version:message-id:date:references:in-reply-to:subject:cc:to\n\t:from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; \n\tbh=rjDm1yfTx3+tRKDUXL6R2olQRh1RB6iUCUimt5YeOjE=;\n\tb=Ku3BGdV70vJ1vJuUgTbJcBQm5mvLJvFHIB7EnhoP0DU2IxIK47Zah7fEBLmn9qdYOg\n\tPgwYacnj+5xslicvswV40WKKcxSh+Cw72lz0qzkwZcUlcA/S2AQaFwdmCpjApZ5WJLsP\n\tDTK4QxAiAXTXs3+LW3TTVjttGAJQBpxUcCWUyeUlHqmspCSBtGuNnl4WcxJIucOT6p2r\n\tF3sFwSR0gpnKQxJHv1bxCFOPYv1shBtSSK0vt8asoKr/U7YsUB2sRTsZQWZl5EZYUVjc\n\ttIUNP4P4IhlmNJbBDKkYhjdMZ9dQnH+Za7gndbBJEKtihM1qJ1ZNJgpR37CAbbNIclWW\n\tzgUA==","X-Gm-Message-State":"AOJu0Yz0Fe9wcYljirLK5gpRKMf1Mt9GLbOQLnTJDcEn/Hjbggz+DnL9\n\tc86QVF75qkd1jdVl5HdVQul6QA==","X-Google-Smtp-Source":"AGHT+IEX0o877Q2Kt5cUoeZPO0NGvbwhKsv0s6jwBligJVjb1kJDsRDCBKRuzTygYtF6DXKyHAtL0Q==","X-Received":"by 2002:a2e:7d17:0:b0:2bf:d379:275b with SMTP id\n\ty23-20020a2e7d17000000b002bfd379275bmr3591513ljc.20.1695556488549; \n\tSun, 24 Sep 2023 04:54:48 -0700 (PDT)","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","In-Reply-To":"<gunggdgnqdovwfvg2spbcdxt2ybtiayjl6y7shvnjnrofz5xva@z2bgwjzpft75>","References":"<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>\n\t<20230915-libyuv-convert-v1-1-1e5bcf68adac@baylibre.com>\n\t<gunggdgnqdovwfvg2spbcdxt2ybtiayjl6y7shvnjnrofz5xva@z2bgwjzpft75>","Date":"Sun, 24 Sep 2023 13:54:40 +0200","Message-ID":"<87jzsfiy67.fsf@baylibre.com>","MIME-Version":"1.0","Content-Type":"text/plain","Subject":"Re: [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":"libcamera-devel@lists.libcamera.org,\n\tGuillaume La Roque <glaroque@baylibre.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27857,"web_url":"https://patchwork.libcamera.org/comment/27857/","msgid":"<20230924131947.GP19112@pendragon.ideasonboard.com>","date":"2023-09-24T13:19:47","subject":"Re: [libcamera-devel] [PATCH RFC 1/7] android: yuv: separate source\n\tdestination in length check","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, Sep 24, 2023 at 01:54:40PM +0200, Mattijs Korpershoek via libcamera-devel wrote:\n> On ven., sept. 22, 2023 at 12:34, Jacopo Mondi wrote:\n> > On Fri, Sep 15, 2023 at 09:57:25AM +0200, Mattijs Korpershoek via libcamera-devel wrote:\n> >> Right now, the assumption of PostProcessorYuv is that both the source\n> >> and the destination are in formats::NV12.\n> >>\n> >> This might change in the future, if we add other formats or pixel format\n> >> conversion as supported in libyuv.\n> >>\n> >> Split out source and destination check to prepare for that.\n> >>\n> >> No functional change.\n> >>\n> >> Signed-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(-)\n> >>\n> >> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\n> >> index 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\nA blank line here would be nice.\n\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> >\n> > You probably want to use the newly introduced destinationInfo here ?\n> \n> Urgh. Indeed. Thank you for catching this, will fix in v2.\n> \n> >\n> >>  \t}\n> >>  }\n> >>","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 C8227C326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 24 Sep 2023 13:19:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 49A0C62931;\n\tSun, 24 Sep 2023 15:19:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 558DD62916\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Sep 2023 15:19:36 +0200 (CEST)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C710128D;\n\tSun, 24 Sep 2023 15:17:56 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1695561578;\n\tbh=tU1ZHTbFIlikScyhWPIvffK3RR+Gc78duY7BU7YWWTQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=QlNE3v33z5KrAYYGi5LDOE9tmCWe/q7ClkKkLh7Ygq8TAdZfnxtH4VOHXJhfuqe/8\n\twXHHgLcvFoskJR6xR/rSK22VcqCm/0r5VIIv5SmDyM8IDYW87OuwWF7TL+LrRytsRR\n\tABPja1Q1tFFpyrWPNjLf6rsAOanDWwIcoyj2mYbmGTBGcpObuI8+VQ7O0q/2tpShjs\n\tYVXvgCgeF/PQ7TnlaCucwuHa2ZPvvXJK6NET8KjV8eBYZ/n1EfBJi2JhV2CuytGNPJ\n\tfcRnq1Ar3HkeZhK/n7V3POWcsd/expv+Y01+wgxpSmTyJCp4Vb303//SrrLXFLT6n7\n\t8XoVrrvpsOFIw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1695561476;\n\tbh=tU1ZHTbFIlikScyhWPIvffK3RR+Gc78duY7BU7YWWTQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DRAGE0WXYMcTarNBmUHHMjeXQG1nq0OJIN7ZBXf5OCjGZuDDDBfnBxn9WmOtEOcob\n\tD7sMLtvPqARMrWDsbTdbwPmwSx2KuDwbSbiCruBCHwE5ojoreOQaMFeZUdmwUJsybs\n\t+lZJuakoHnIx00qZ+lDLQeM3w1rcMLb2LjCNMfjc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DRAGE0WX\"; dkim-atps=neutral","Date":"Sun, 24 Sep 2023 16:19:47 +0300","To":"Mattijs Korpershoek <mkorpershoek@baylibre.com>","Message-ID":"<20230924131947.GP19112@pendragon.ideasonboard.com>","References":"<20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com>\n\t<20230915-libyuv-convert-v1-1-1e5bcf68adac@baylibre.com>\n\t<gunggdgnqdovwfvg2spbcdxt2ybtiayjl6y7shvnjnrofz5xva@z2bgwjzpft75>\n\t<87jzsfiy67.fsf@baylibre.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<87jzsfiy67.fsf@baylibre.com>","Subject":"Re: [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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org,\n\tGuillaume La Roque <glaroque@baylibre.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]