From patchwork Wed Feb 8 03:33:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 18261 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 9C04DBEFBE for ; Wed, 8 Feb 2023 03:33:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E3869625E6; Wed, 8 Feb 2023 04:33:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1675827208; bh=/84sfY9/+iASnHsDq5SAg5am7H7TiAau4Ftol2C41no=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=IXcKAPiAnBCKSY9nDrJYRUXxVuNWDzaXU/WVRfe198qbza5EPigg0MMUnY1IrRKX+ +4WyyuI8/2d8Zqskeqs2lFC6qEEtuWe3ph2kRIS9llaO3twwqOqe0ap34X2QJq+9q7 8HYHK5Mi/zNNiWdeOOjHoJ+fPYR9a1S1Bd8OYGvtPJxOI16e9LtBS6iazVIoJbMUSV nzBmtsXTvmv6cHk3e8ML3fhR9q9nZ2ILY4Nx9UAa81cAsVwDs9p2aBHITUdGfIFnnz LaZef7FXrsZ6ibxB0wJ8Ry0zDGapMoCuIGItSBzn+BLezbZFKBPBmnmera7ag6Bi+b HgsunIhUS8ywQ== Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 62348603B8 for ; Wed, 8 Feb 2023 04:33:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KHWtnd1k"; dkim-atps=neutral Received: by mail-pl1-x630.google.com with SMTP id u9so13588966plf.3 for ; Tue, 07 Feb 2023 19:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OYLvxaD3ENdabMNIHtDiCC7ENySsPtRy3dXkXl5JHdE=; b=KHWtnd1kH8k2x7GPNd4P09fx0DBOrnOtbAUxqQrwnCMZY4bzF1HBcxE5byTUWYTeIf VhW2byF4LOZxIdpdbGzLnpuFG+aV+dA60MDhbNd5VGtjtfDvHavd21KBCSOOM4GxOQ8K yrYbxUPDGX7L05qPXzqaGl7evUgNaffsVirMs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OYLvxaD3ENdabMNIHtDiCC7ENySsPtRy3dXkXl5JHdE=; b=mAvCL8id7/R5wi3R54Cl6UKEYC9gQuQotTsIz/O9M/vW75ZqdYBlLpQnim2IMw9PRQ hA3PRpT54U1acnOLv/rKj3W3yyBQc7gn5a4saoNa7dYNaNQ7yuVIwf98OhYki7Nr5RaQ A3KP0nBCSeeyBt8FiZ8L2KWKyfnI/dx002ZCBI14Q8qThLmndnjCCEgTnSbCeZobt/BD J7Bg4wZxXUmFI2mPwMfSxXXLGznbuCEH5qATRlc7vb4AkR0bbjbYZOa5zXkYyvXrvu1v D7kID4UeoUN/WhBWNeJNYueEsWGPEDwcUtJIuebRJXi50SyXRE7NVFA+JWC/+Wa3onka V5jg== X-Gm-Message-State: AO0yUKXDhZu/2YeN19jOI2bRwiGTxlX56qCf4c8EiklJu7VYMY1WYE16 haeuQP4JbK0CenyMVpfP4UwGpwC/W4zcGlSO X-Google-Smtp-Source: AK7set+wEWv+Z4Q8A4oft72zmPbD53eu2ttqyQV/YgYRHUk/DZBG2F/f3vUwohCA8tJiWaQXjPM3DQ== X-Received: by 2002:a17:902:d4cc:b0:198:9bf8:298e with SMTP id o12-20020a170902d4cc00b001989bf8298emr6154952plg.60.1675827204453; Tue, 07 Feb 2023 19:33:24 -0800 (PST) Received: from chenghaoyang-low.c.googlers.com.com (46.165.189.35.bc.googleusercontent.com. [35.189.165.46]) by smtp.gmail.com with ESMTPSA id e9-20020a170902784900b00194c82c2a7bsm9621963pln.224.2023.02.07.19.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 19:33:24 -0800 (PST) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Wed, 8 Feb 2023 03:33:14 +0000 Message-Id: <20230208033319.1361109-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v10 0/5] Add CrOS JEA implementation 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: , X-Patchwork-Original-From: Harvey Yang via libcamera-devel From: Harvey Yang Reply-To: Harvey Yang Cc: Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi Laurent and all, As discussed offline, I think it's better to keep the generateThumbnail as is. In other words, don't let `Encoder` have a different function to generate thumbnails. In both implementations, an EncoderLibJpeg instance will be used to generate thumbnails. This means the previous 4/8, 5/8, 6/8 patches are no longer needed. Please check if the new series make sense. Thanks! BR, Harvey Harvey Yang (5): libcamera: framebuffer: Allow inheritance of FrameBuffer android: framebuffer: Add HALFrameBuffer and replace FrameBuffer android: jpeg: Add meson.build in src/android/jpeg android: jpeg: Pass StreamBuffer to Encoder::encoder android: jpeg: Add JEA implementation include/libcamera/framebuffer.h | 3 +- src/android/camera_device.cpp | 5 +- src/android/camera_device.h | 3 +- src/android/camera_request.h | 3 +- src/android/cros/camera3_hal.cpp | 4 +- src/android/cros_mojo_token.h | 12 ++++ src/android/frame_buffer_allocator.h | 7 ++- src/android/hal_framebuffer.cpp | 22 ++++++++ src/android/hal_framebuffer.h | 26 +++++++++ src/android/jpeg/encoder.h | 5 +- src/android/jpeg/encoder_jea.cpp | 56 +++++++++++++++++++ src/android/jpeg/encoder_jea.h | 31 ++++++++++ src/android/jpeg/encoder_libjpeg.cpp | 13 +++-- src/android/jpeg/encoder_libjpeg.h | 3 +- src/android/jpeg/meson.build | 14 +++++ src/android/jpeg/post_processor_jpeg.cpp | 11 +++- src/android/meson.build | 6 +- .../mm/cros_frame_buffer_allocator.cpp | 9 +-- .../mm/generic_frame_buffer_allocator.cpp | 11 ++-- 19 files changed, 213 insertions(+), 31 deletions(-) create mode 100644 src/android/cros_mojo_token.h create mode 100644 src/android/hal_framebuffer.cpp create mode 100644 src/android/hal_framebuffer.h create mode 100644 src/android/jpeg/encoder_jea.cpp create mode 100644 src/android/jpeg/encoder_jea.h create mode 100644 src/android/jpeg/meson.build