From patchwork Tue Aug 31 06:34:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 13571 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2D46DBD87D for ; Tue, 31 Aug 2021 06:35:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6DB1F6916B; Tue, 31 Aug 2021 08:35:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="UtuWWnSK"; dkim-atps=neutral Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8474B60137 for ; Tue, 31 Aug 2021 08:35:04 +0200 (CEST) Received: by mail-pf1-x429.google.com with SMTP id g14so14180562pfm.1 for ; Mon, 30 Aug 2021 23:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h8Tw1IXyOejNW5+a5zeSHefyLqWZKFSxeu/m6pUvL4E=; b=UtuWWnSK6/mm5prZkg/TXUUC+7jbSRnLcr7gQYJ5FKxzQnZNNPk6F5dYW/ptVLZZP6 S2dwuJ1z2rJfcP+F3VCExe/veC9iFyZSQNiSjCeUzHtMARxklun2KOBrNTviE11SyjZw eBGD+9tKmXPrS3eMZNYHipUOgpbYBHXkTJ93s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h8Tw1IXyOejNW5+a5zeSHefyLqWZKFSxeu/m6pUvL4E=; b=UY+IE7M5j8Q9lDBvwRGbUF2wJa9uPL7fog/O2Tz8b8gC+vcoYpwbhybDdJG7eX4PQP CsHXeKcjYytk60JEcum1sa7KOeXF03Pu3Bh4/O3MWr3nfoVxM4Wc+rW0l2y6cj7EBqHU j3LTye2Yk4+fQkJafcoA27Vq/NsB/ZS4lpciTDWITfSqgnut2+SiywezA8Gl+7zyJwQV aUFeidr88iIfK4cEzFZx1lEFzw3dZB8LffTbtbQGWBFPSDYIKX1sFp9ZhjckJn/S36zs hgoE9uJCjkdahzNJSye+AQ7U7OZ4X4PlW5tAPcfUXy5eJtOf6+hoETB4JzbFia1lQ+ZL qagg== X-Gm-Message-State: AOAM531BLEXJthYagtg3NooqIvA/X2DzxvGoCIxJIGmbw7k1LWAKA1rt EelTW/80OqL3aVMSiDbgyFiAvFRldAXpQA== X-Google-Smtp-Source: ABdhPJwXNtp/J8HP1IsTnBjZPuUKbY8bpmds3YUViolkEO+pojJWGQTFqRpBAkJ8m6KwCZiXhjsjng== X-Received: by 2002:aa7:989d:0:b0:3ef:5f81:5c2f with SMTP id r29-20020aa7989d000000b003ef5f815c2fmr26835186pfl.44.1630391702692; Mon, 30 Aug 2021 23:35:02 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:3c62:aba4:18ea:5441]) by smtp.gmail.com with ESMTPSA id d17sm16304027pfn.110.2021.08.30.23.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Aug 2021 23:35:02 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 31 Aug 2021 15:34:33 +0900 Message-Id: <20210831063438.785767-1-hiroh@chromium.org> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] Improve/Clean up post processors code in android X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patch series basically improves and clean ups by some variable types with MappedBuffer. I also introduce a new MappedBuffer class for planes that are originated in heap i.e. std::vector. Although this is not done in the patch, ideally we should remove all the stride computation in the post processor code. Even though the plane address is acquired by MappedBuffer::planes(), the post processing is done with the manual stride computation. It might be different from the actual stride of the plane. I think MappedBuffer should provide strides() like CameraBuffer. Hirokazu Honda (5): android: yuv: Use CameraBuffer::stride() in PostProcessorYuv android: jpeg: thumbnailer: Use MappedFrameBuffer::planes() mapped_framebuffer: Introduce MappedVectorBuffer thumbnailer: Change the type of thumbnail to MappedBuffer android: encoder_libjpeg: Use MappedBuffer for the source frame .../libcamera/internal/mapped_framebuffer.h | 9 ++++++ src/android/jpeg/encoder_libjpeg.cpp | 28 +++++++++++-------- src/android/jpeg/encoder_libjpeg.h | 7 +++-- src/android/jpeg/post_processor_jpeg.cpp | 14 ++++++---- src/android/jpeg/thumbnailer.cpp | 14 ++++++---- src/android/jpeg/thumbnailer.h | 6 +++- src/android/yuv/post_processor_yuv.cpp | 13 +++++---- src/android/yuv/post_processor_yuv.h | 1 - src/libcamera/mapped_framebuffer.cpp | 17 +++++++++++ 9 files changed, 75 insertions(+), 34 deletions(-) --- 2.33.0.259.gc128427fd7-goog