{"id":13570,"url":"https://patchwork.libcamera.org/api/patches/13570/?format=json","web_url":"https://patchwork.libcamera.org/patch/13570/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210830210224.703704-1-hiroh@chromium.org>","date":"2021-08-30T21:02:24","name":"[libcamera-devel] libcamera: mapped_framebuffer: Rename maps() to planes()","commit_ref":"75df3c71397ffdd61568b19157d327284c6d3a7f","pull_url":null,"state":"accepted","archived":false,"hash":"d383a9b983dc545ac5c9035ba7a4414c1c91ca9b","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13570/mbox/","series":[{"id":2422,"url":"https://patchwork.libcamera.org/api/series/2422/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2422","date":"2021-08-30T21:02:24","name":"[libcamera-devel] libcamera: mapped_framebuffer: Rename maps() to planes()","version":1,"mbox":"https://patchwork.libcamera.org/series/2422/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13570/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13570/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 3F5F0BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Aug 2021 21:02:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9F96A6916C;\n\tMon, 30 Aug 2021 23:02:34 +0200 (CEST)","from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com\n\t[IPv6:2607:f8b0:4864:20::52c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CD32960258\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Aug 2021 23:02:32 +0200 (CEST)","by mail-pg1-x52c.google.com with SMTP id q68so14612302pga.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Aug 2021 14:02:32 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:3c62:aba4:18ea:5441])\n\tby smtp.gmail.com with ESMTPSA id\n\tnh21sm351909pjb.34.2021.08.30.14.02.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Aug 2021 14:02:30 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"BD10Tp76\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=oZOr00ZrrvJz4iZkJNUQwKcQ7pxGVbhQipt+LP9Wlco=;\n\tb=BD10Tp76n2J5iTrWm//G97Y+2VeNO1xuVekCYQO85YLP8R9BPLsK5+YzBcYUQTJxst\n\tAhAt9YaMzd6/2e/gScWqQo3ZjOg/qfgNLUZKQQZS7g5XFZ8GIKvwquCzBT6gHqGDZ68m\n\tFcw2J5zatcLjVLGstkYiBoxcWhDyr413M7PJE=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=oZOr00ZrrvJz4iZkJNUQwKcQ7pxGVbhQipt+LP9Wlco=;\n\tb=eF6F/BNbc65s2neX4Ijp04MJKqJb9gGmu8CCvAVlYG8jqADLNhid76vCC+BuvlOOGK\n\teM7Z81ICW7aote9YzSugay9IgG3ob0B36kBf2xojhWYdF7FJzJ+ANZcGS0fsYeLShMt1\n\tgZlMIxEOCcro9BLLmAsbHe9yWSi3c9LYNLA0ajxqncz7CM7TO+3mJdOJN4Z+esYQX76E\n\tJlkHUxGVRQPy59fx0/Xr71ziz+3KaPXosmfOOoTn8BrfCULCr/ZgZLy8MXLn/7SQEinK\n\t5ytnUbuzggccvg59+1lKe60QRDjAZOkFZotqsqljqXwPU8Umt5CqCO7XWZCHTMI83nl5\n\tWDRA==","X-Gm-Message-State":"AOAM533u0a1SfZ62Nm+cd6dvZhJx1bLX79OdVPWlw4M9pVQtL3PVpT26\n\tT6I5nVBF3Z8BH66iMwpKPCVzr0Ss0L8H2w==","X-Google-Smtp-Source":"ABdhPJyVJyXH33mmB2YxnU52UvU1g25+zlw8wYnowP9hPonOT5y8m0z13xPt2+3KUpSSOpbF8XCkcw==","X-Received":"by 2002:aa7:9ac9:0:b0:3fb:28ca:584b with SMTP id\n\tx9-20020aa79ac9000000b003fb28ca584bmr12765510pfp.64.1630357350702; \n\tMon, 30 Aug 2021 14:02:30 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 31 Aug 2021 06:02:24 +0900","Message-Id":"<20210830210224.703704-1-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.259.gc128427fd7-goog","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: mapped_framebuffer: Rename\n\tmaps() to planes()","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":"MappedFrameBuffer::maps() returns planes_. This renames the function\nname to planes().\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n include/libcamera/internal/mapped_framebuffer.h | 3 +--\n src/android/jpeg/encoder_libjpeg.cpp            | 2 +-\n src/android/jpeg/thumbnailer.cpp                | 2 +-\n src/android/yuv/post_processor_yuv.cpp          | 4 ++--\n src/ipa/ipu3/ipu3.cpp                           | 4 ++--\n src/ipa/raspberrypi/raspberrypi.cpp             | 4 ++--\n src/ipa/rkisp1/rkisp1.cpp                       | 4 ++--\n src/libcamera/mapped_framebuffer.cpp            | 2 +-\n 8 files changed, 12 insertions(+), 13 deletions(-)","diff":"diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h\nindex 42479541..70ffbcbe 100644\n--- a/include/libcamera/internal/mapped_framebuffer.h\n+++ b/include/libcamera/internal/mapped_framebuffer.h\n@@ -30,8 +30,7 @@ public:\n \n \tbool isValid() const { return error_ == 0; }\n \tint error() const { return error_; }\n-\t/* \\todo rename to planes(). */\n-\tconst std::vector<Plane> &maps() const { return planes_; }\n+\tconst std::vector<Plane> &planes() const { return planes_; }\n \n protected:\n \tMappedBuffer();\ndiff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp\nindex a7a63601..b8b01e20 100644\n--- a/src/android/jpeg/encoder_libjpeg.cpp\n+++ b/src/android/jpeg/encoder_libjpeg.cpp\n@@ -188,7 +188,7 @@ int EncoderLibJpeg::encode(const FrameBuffer &source, Span<uint8_t> dest,\n \t\treturn frame.error();\n \t}\n \n-\treturn encode(frame.maps()[0], dest, exifData, quality);\n+\treturn encode(frame.planes()[0], dest, exifData, quality);\n }\n \n int EncoderLibJpeg::encode(Span<const uint8_t> src, Span<uint8_t> dest,\ndiff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp\nindex 79d83926..043c7b33 100644\n--- a/src/android/jpeg/thumbnailer.cpp\n+++ b/src/android/jpeg/thumbnailer.cpp\n@@ -62,7 +62,7 @@ void Thumbnailer::createThumbnail(const FrameBuffer &source,\n \tASSERT(tw % 2 == 0 && th % 2 == 0);\n \n \t/* Image scaling block implementing nearest-neighbour algorithm. */\n-\tunsigned char *src = static_cast<unsigned char *>(frame.maps()[0].data());\n+\tunsigned char *src = static_cast<unsigned char *>(frame.planes()[0].data());\n \tunsigned char *srcC = src + sh * sw;\n \tunsigned char *srcCb, *srcCr;\n \tunsigned char *dstY, *srcY;\ndiff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\nindex 3e793a58..6952fc38 100644\n--- a/src/android/yuv/post_processor_yuv.cpp\n+++ b/src/android/yuv/post_processor_yuv.cpp\n@@ -63,9 +63,9 @@ int PostProcessorYuv::process(const FrameBuffer &source,\n \t\treturn -EINVAL;\n \t}\n \n-\tint ret = libyuv::NV12Scale(sourceMapped.maps()[0].data(),\n+\tint ret = libyuv::NV12Scale(sourceMapped.planes()[0].data(),\n \t\t\t\t    sourceStride_[0],\n-\t\t\t\t    sourceMapped.maps()[1].data(),\n+\t\t\t\t    sourceMapped.planes()[1].data(),\n \t\t\t\t    sourceStride_[1],\n \t\t\t\t    sourceSize_.width, sourceSize_.height,\n \t\t\t\t    destination->plane(0).data(),\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 0ed0a6f1..c925cf64 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -422,7 +422,7 @@ void IPAIPU3::processEvent(const IPU3Event &event)\n \t\t\treturn;\n \t\t}\n \n-\t\tSpan<uint8_t> mem = it->second.maps()[0];\n+\t\tSpan<uint8_t> mem = it->second.planes()[0];\n \t\tconst ipu3_uapi_stats_3a *stats =\n \t\t\treinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());\n \n@@ -436,7 +436,7 @@ void IPAIPU3::processEvent(const IPU3Event &event)\n \t\t\treturn;\n \t\t}\n \n-\t\tSpan<uint8_t> mem = it->second.maps()[0];\n+\t\tSpan<uint8_t> mem = it->second.planes()[0];\n \t\tipu3_uapi_params *params =\n \t\t\treinterpret_cast<ipu3_uapi_params *>(mem.data());\n \ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 7215b205..047123ab 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -936,7 +936,7 @@ void IPARPi::prepareISP(const ipa::RPi::ISPConfig &data)\n \t\t */\n \t\tauto it = buffers_.find(data.embeddedBufferId);\n \t\tASSERT(it != buffers_.end());\n-\t\tembeddedBuffer = it->second.maps()[0];\n+\t\tembeddedBuffer = it->second.planes()[0];\n \t}\n \n \t/*\n@@ -1043,7 +1043,7 @@ void IPARPi::processStats(unsigned int bufferId)\n \t\treturn;\n \t}\n \n-\tSpan<uint8_t> mem = it->second.maps()[0];\n+\tSpan<uint8_t> mem = it->second.planes()[0];\n \tbcm2835_isp_stats *stats = reinterpret_cast<bcm2835_isp_stats *>(mem.data());\n \tRPiController::StatisticsPtr statistics = std::make_shared<bcm2835_isp_stats>(*stats);\n \thelper_->Process(statistics, rpiMetadata_);\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 046816e0..bf2c13b6 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -192,7 +192,7 @@ void IPARkISP1::processEvent(const RkISP1Event &event)\n \n \t\tconst rkisp1_stat_buffer *stats =\n \t\t\treinterpret_cast<rkisp1_stat_buffer *>(\n-\t\t\t\tmappedBuffers_.at(bufferId).maps()[0].data());\n+\t\t\t\tmappedBuffers_.at(bufferId).planes()[0].data());\n \n \t\tupdateStatistics(frame, stats);\n \t\tbreak;\n@@ -203,7 +203,7 @@ void IPARkISP1::processEvent(const RkISP1Event &event)\n \n \t\trkisp1_params_cfg *params =\n \t\t\treinterpret_cast<rkisp1_params_cfg *>(\n-\t\t\t\tmappedBuffers_.at(bufferId).maps()[0].data());\n+\t\t\t\tmappedBuffers_.at(bufferId).planes()[0].data());\n \n \t\tqueueRequest(frame, params, event.controls);\n \t\tbreak;\ndiff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp\nindex 4db92b8c..464d35fe 100644\n--- a/src/libcamera/mapped_framebuffer.cpp\n+++ b/src/libcamera/mapped_framebuffer.cpp\n@@ -113,7 +113,7 @@ MappedBuffer::~MappedBuffer()\n  */\n \n /**\n- * \\fn MappedBuffer::maps()\n+ * \\fn MappedBuffer::planes()\n  * \\brief Retrieve the mapped planes\n  *\n  * This function retrieves the successfully mapped planes stored as a vector\n","prefixes":["libcamera-devel"]}