From patchwork Wed Dec 14 09:33:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 18001 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 B0DC8BDE6B for ; Wed, 14 Dec 2022 09:33:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 128F963362; Wed, 14 Dec 2022 10:33:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1671010418; bh=IcVTQCZszO4TkxTWP5b9PeCb+zF6yGr/lT6lriII59E=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=dZcWZqditnwkkT/jkXOMuPnWxSQSzgEwwRmGBy2oBFPvu1Gee1h2u++hIaTt30byN L1bh0FklR9NZVsIcPBgKbFN0lRQQYvyALRM4Jz7Pi6FqyLxnCjNFlFCNtWHKxGvclS y/7e7OaTKirL+mrvd9jtNiZb+SkpfZ4HCl3Dsyo6Oe5IRvexnK9t7ZQ5GahqC8iacH 7xL4NbqvtJRCj2Hu22AYA2hiGH9KtJdk9dgW0gbtlGfjzRfW0g3nkcLdouKhYfubxy jkQF5b7qzLixNpopIPjxSrQWiykm9vj8DDx2cjjHZ1JYyZVMOjnTknuPiHZPS8y+n1 3Ke9PsYmG1ZGg== Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 65A54603D0 for ; Wed, 14 Dec 2022 10:33:36 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jRPCBttJ"; dkim-atps=neutral Received: by mail-pf1-x42e.google.com with SMTP id 21so4039337pfw.4 for ; Wed, 14 Dec 2022 01:33:36 -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=J+Kc0lYuDSWjtzJ29Sg9v02g8U26rFTLrsIp8R2s2bM=; b=jRPCBttJD/H+YKcARBtvnbpzSaTIFyiu0w0yx8xQM+qDuC0iLFZy9BDgQQVmmq0C83 sjxbfNc60d90aQNPXvTkxuZ1Xz4db4JQZXOzHPTHhXwNWLGKu8QfTDl/ZNzaYssJCpo2 //2gDeEQHvVZahBOhbFCljygX5Eq+t9+vQZBw= 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=J+Kc0lYuDSWjtzJ29Sg9v02g8U26rFTLrsIp8R2s2bM=; b=MScyBAaUkwBurK7FNkTTSku97w82ZpdFavTc2vnrun+K2hcNTS1yQXLtpwN6Asw5d4 cFGAEZlaNtnISuVdcj82cvq52BK3qgOuN3Digj47sb7EGBuv2H6R1Lofej+KnTKO9Fmi uzxw5nbxBM9XJwiiqMatS9qbXtMbz4zspfbS5smg84LfbHNjg0WcxiPiparwxr/xKvB/ SrQ+ZO4LOX1pb97t/E/djsQYn+UcKAxPcTtGmdU9btzN96VNsDqxIDwevYSoaUnk70Ns xNyMjPULswngSFXF6jdmsegmxEVv4wloewg0MbrneV8x2TV5Pc++pqggo2nuEo1oH1LG raQg== X-Gm-Message-State: ANoB5pmNxCWJGeg+5RUycHU9fCpf/dV86O021LPyJ/TRtpZsQz8yxVhO MKYxtnWNoTimKBRusjtnhiOdfVHAvd9ANlzR X-Google-Smtp-Source: AA0mqf4FT/18lsXIUPt24idrdgpS+zL5aYj8gXcSRMVMFgrASqEdviCN7gB7OEbPvxVIgrjegGDTEg== X-Received: by 2002:aa7:81cb:0:b0:56b:e473:514 with SMTP id c11-20020aa781cb000000b0056be4730514mr22758040pfn.2.1671010414507; Wed, 14 Dec 2022 01:33:34 -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 d206-20020a621dd7000000b0056bc742d21esm9331190pfd.176.2022.12.14.01.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 01:33:34 -0800 (PST) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Wed, 14 Dec 2022 09:33:23 +0000 Message-Id: <20221214093330.3345421-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 0/7] 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 all, Updated based on Laurent's comments, and fixed a memory flaky issue in JEA's generateThumbnail function. Sorry that the issue took me so long, with other issues in CrOS camera service mixed together :p BR, Harvey Harvey Yang (7): Allow inheritance of FrameBuffer Add HALFrameBuffer and replace FrameBuffer in src/android Add meson.build in src/android/jpeg Add an internal Encoder class in EncoderLibJpeg Move generateThumbnail from PostProcessorJpeg to Encoder Pass StreamBuffer to Encoder::encoder 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 | 9 +- src/android/jpeg/encoder_jea.cpp | 105 ++++++++++++++++++ src/android/jpeg/encoder_jea.h | 35 ++++++ src/android/jpeg/encoder_libjpeg.cpp | 85 ++++++++++++-- src/android/jpeg/encoder_libjpeg.h | 46 +++++--- src/android/jpeg/meson.build | 17 +++ src/android/jpeg/post_processor_jpeg.cpp | 63 ++--------- src/android/jpeg/post_processor_jpeg.h | 11 +- src/android/meson.build | 6 +- .../mm/cros_frame_buffer_allocator.cpp | 9 +- .../mm/generic_frame_buffer_allocator.cpp | 11 +- 20 files changed, 373 insertions(+), 109 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