[{"id":19602,"web_url":"https://patchwork.libcamera.org/comment/19602/","msgid":"<CAO5uPHO=AGa6Jgmumo8XGMWaGy1cj8qzb06X4MOBWq3Hb5ncLQ@mail.gmail.com>","date":"2021-09-10T12:52:28","subject":"Re: [libcamera-devel] [PATCH v1 1/2] android: jpeg: Rectify\n\tvariable naming style.","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Umang,\n\nOn Fri, Sep 10, 2021 at 7:47 PM Umang Jain <umang.jain@ideasonboard.com> wrote:\n>\n> Rectify variable renaming style for YPlaneSize, UVPlaneSize.\n> libcamera uses camelCase where first letter should be in lower case.\n>\n> Fixes: e355ca0087cd9(\"android: jpeg: Split and pass the thumbnail planes to encoder\")\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nSorry for capitalized names in my suggestion.\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  src/android/jpeg/post_processor_jpeg.cpp | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index ef2d98cc..f6d47f63 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -82,10 +82,10 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source,\n>                  */\n>                 std::vector<Span<uint8_t>> thumbnailPlanes;\n>                 const PixelFormatInfo &formatNV12 = PixelFormatInfo::info(formats::NV12);\n> -               size_t YPlaneSize = formatNV12.planeSize(targetSize, 0);\n> -               size_t UVPlaneSize = formatNV12.planeSize(targetSize, 1);\n> -               thumbnailPlanes.push_back({ rawThumbnail.data(), YPlaneSize });\n> -               thumbnailPlanes.push_back({ rawThumbnail.data() + YPlaneSize, UVPlaneSize });\n> +               size_t yPlaneSize = formatNV12.planeSize(targetSize, 0);\n> +               size_t uvPlaneSize = formatNV12.planeSize(targetSize, 1);\n> +               thumbnailPlanes.push_back({ rawThumbnail.data(), yPlaneSize });\n> +               thumbnailPlanes.push_back({ rawThumbnail.data() + yPlaneSize, uvPlaneSize });\n>\n>                 int jpeg_size = thumbnailEncoder_.encode(thumbnailPlanes,\n>                                                          *thumbnail, {}, quality);\n> --\n> 2.31.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 E7121BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Sep 2021 12:52:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6804269170;\n\tFri, 10 Sep 2021 14:52:40 +0200 (CEST)","from mail-ed1-x534.google.com (mail-ed1-x534.google.com\n\t[IPv6:2a00:1450:4864:20::534])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DEA9969169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 14:52:39 +0200 (CEST)","by mail-ed1-x534.google.com with SMTP id t6so916471edi.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 05:52:39 -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=\"LYtN1s1t\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=OMSK0a9iy+DQ5W27Luqz8M/gd0JeKQVhhD/jSmonuuQ=;\n\tb=LYtN1s1tOVMutSBGplS0+YpquT5yTs91gssHTC6HzQzz5gRdKKeLiKBHw6I5YZSJOm\n\tKT/LQAbnOmnNuzSy6NRfxPISMf+xhc+7x/PhBbJh1m/38d6go/lVkkl1LZ4ucNq3N4RW\n\tsmf+OdVjQppq62pcJeiYbQYZcYLiBJYgLyDtk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=OMSK0a9iy+DQ5W27Luqz8M/gd0JeKQVhhD/jSmonuuQ=;\n\tb=5g+8PfWgmzV57MWCYUIPSVeBxYOVguNFAny09IIe3093khe89uLeTSY96L5QeYwoUS\n\tIw7FG8uVLNLC7isoSlSioQtwCvQK7X9rN+wTbfOPxsNoVESVIv0H+8JMjXt/qxnW5DFm\n\tRX5IT4oq0btVLjom3FizUm8vJnvwObKbAx3qkkdvC7hDPja68R7gLsRrx0zJTZ8zH20Z\n\tSmrxJMn25IEhlMzXH90yWjDuNIDz2jaqZztihGMVDN1Z1UwkUsnUoVeIPsowlBwKAQPr\n\tlcilc4qEK+Uy8Yk8IKOaJM1IziKgY2Nu7yF611uafzym+oWBZofe2iw3H9JPDNgeNTxA\n\t3xtg==","X-Gm-Message-State":"AOAM533YaOA2B66HeLZV6Fjn5mD2gOeBbkJ64/8qM3ljHgAk8YZp1HMT\n\tQFnmkijwTTqQssvaPAYJ809JqK4wiOpBCl56/rOAjlSldn4=","X-Google-Smtp-Source":"ABdhPJxvawQapUsisDn8Z2U90WufPb6y632gKfBvLbEJXgdZ25E+p1OYhuf7JcHO0oIoqcjBFkA7QnouNSXWK8/ViiQ=","X-Received":"by 2002:a05:6402:1385:: with SMTP id\n\tb5mr8687509edv.276.1631278359471; \n\tFri, 10 Sep 2021 05:52:39 -0700 (PDT)","MIME-Version":"1.0","References":"<20210910104729.542779-1-umang.jain@ideasonboard.com>\n\t<20210910104729.542779-2-umang.jain@ideasonboard.com>","In-Reply-To":"<20210910104729.542779-2-umang.jain@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 10 Sep 2021 21:52:28 +0900","Message-ID":"<CAO5uPHO=AGa6Jgmumo8XGMWaGy1cj8qzb06X4MOBWq3Hb5ncLQ@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v1 1/2] android: jpeg: Rectify\n\tvariable naming style.","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":19616,"web_url":"https://patchwork.libcamera.org/comment/19616/","msgid":"<YTuGhJbWfP9bpojX@pendragon.ideasonboard.com>","date":"2021-09-10T16:23:32","subject":"Re: [libcamera-devel] [PATCH v1 1/2] android: jpeg: Rectify\n\tvariable naming style.","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\nOn Fri, Sep 10, 2021 at 04:17:28PM +0530, Umang Jain wrote:\n> Rectify variable renaming style for YPlaneSize, UVPlaneSize.\n> libcamera uses camelCase where first letter should be in lower case.\n> \n> Fixes: e355ca0087cd9(\"android: jpeg: Split and pass the thumbnail planes to encoder\")\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/android/jpeg/post_processor_jpeg.cpp | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index ef2d98cc..f6d47f63 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -82,10 +82,10 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source,\n>  \t\t */\n>  \t\tstd::vector<Span<uint8_t>> thumbnailPlanes;\n>  \t\tconst PixelFormatInfo &formatNV12 = PixelFormatInfo::info(formats::NV12);\n> -\t\tsize_t YPlaneSize = formatNV12.planeSize(targetSize, 0);\n> -\t\tsize_t UVPlaneSize = formatNV12.planeSize(targetSize, 1);\n> -\t\tthumbnailPlanes.push_back({ rawThumbnail.data(), YPlaneSize });\n> -\t\tthumbnailPlanes.push_back({ rawThumbnail.data() + YPlaneSize, UVPlaneSize });\n> +\t\tsize_t yPlaneSize = formatNV12.planeSize(targetSize, 0);\n> +\t\tsize_t uvPlaneSize = formatNV12.planeSize(targetSize, 1);\n> +\t\tthumbnailPlanes.push_back({ rawThumbnail.data(), yPlaneSize });\n> +\t\tthumbnailPlanes.push_back({ rawThumbnail.data() + yPlaneSize, uvPlaneSize });\n>  \n>  \t\tint jpeg_size = thumbnailEncoder_.encode(thumbnailPlanes,\n>  \t\t\t\t\t\t\t *thumbnail, {}, quality);","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 03BAFBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Sep 2021 16:23:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A90D6917C;\n\tFri, 10 Sep 2021 18:23:56 +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 0BFD469169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 18:23:55 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 713D9883;\n\tFri, 10 Sep 2021 18:23:54 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"oyPshDQl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631291034;\n\tbh=i5smSKNJOhmIfNkWLtb6gUIDWi9cxF2HGIxwCCaLMME=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oyPshDQlM+p2dAfIjjFOLTwiQV8zEE6pMlSzydyQkeFcQmlyZTXP1FHDkKnX8VYxc\n\toCp+ekvAYK9mftF/jlfJTxtxXdiwnfmVCvpcpaySTSjH7EtN/Ei8BD7Pitilg1A6a4\n\tioDcTdAjAg1zmPBvmPpnM9McmoUosyZEjDB5m3kc=","Date":"Fri, 10 Sep 2021 19:23:32 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YTuGhJbWfP9bpojX@pendragon.ideasonboard.com>","References":"<20210910104729.542779-1-umang.jain@ideasonboard.com>\n\t<20210910104729.542779-2-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210910104729.542779-2-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v1 1/2] android: jpeg: Rectify\n\tvariable naming style.","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]