From patchwork Tue Apr 26 09:00:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 15713 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 BEFAFC3256 for ; Tue, 26 Apr 2022 09:00:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 489C265647; Tue, 26 Apr 2022 11:00:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1650963653; bh=mZLlo3ekyOWye2HuEcTyKQifas7rj7WjRHPMzdAjUQQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=ipya0oMhCV2/MGTJcyHWHVkHnbVUQk+ODB5JM7etcaqAmYQ+fqEiORN6sqcGpWBFx qtpIoxgMBbBcnEoMyaN7mtQGI2fcSVeD8Pgb9iU3cWAtCL9w5yTKLV3ITBKdx+Vpsf nXKwKS7YB9MH7EsQnx+t9XD5ApU2Pqq41rGmU/pN1Og33sHNjok/7qtpWxMNkXJihE 0wJ856bm3c17trwAAtLAixQDhxIjBFpxcryrmcOE3FrgC2N4FADaMtyvBokRDmVwfD Y05rdeZouFlsv5z9/YM8WBA5WubBO+1KGwClFCl5bPkk/jND4ErmTeF71UzVv2LESh Ss8B/AOzPVtLA== Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CF1ED60431 for ; Tue, 26 Apr 2022 11:00:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="eFoi08xh"; dkim-atps=neutral Received: by mail-pl1-x62a.google.com with SMTP id c12so29591476plr.6 for ; Tue, 26 Apr 2022 02:00:51 -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=XVlq21pIoVWfmLOnQky8yPucRAUy3wbJor/uE9K2HFI=; b=eFoi08xh68kC9YesSCKbjs35NQqhWytef7R0MrJ/gg4P7oomDzC/rQzhA2utxmM0Nf 0x5xVqA63YOWvNbxPCH9cmslACDrHwDRDs69BciC/+Z26+0/09NrmsBAk4yDPlH+Q6sW APizsvN1juyNovp3Y61PGAhi/Br+JMtQa4we0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XVlq21pIoVWfmLOnQky8yPucRAUy3wbJor/uE9K2HFI=; b=wauH088D8DcoUj32NMmEujZjyft/+/Hxn62FqIZb6rwD4pPU7SoutXDgGzyEWkPHed nmtymncxBd1qGD9nW6LbtoR8iRwit1fMe3mi4OKnlJptCk1S2bDDDtyy33rUhN9cseLA fjDTCK97//1Eh1s99wSRG+3TL7wJ5wwcc++2rtguabBoCHysDLkDzQuBEVgPjCLxFyto HIaDgIAAyiW20pjbCAJYSP5PWtsYHtD7zR8MHW1FBpzZTqJc+11ip61zA17zI0WKns0+ NjEz5HWEG3UhQsyoz2r8du/ZJxGdTT28zu3z5fyYDzmMfAhV7bCyvpKnBVkgkKXQ5DPS MANQ== X-Gm-Message-State: AOAM533OhBF57Fxn0dld4sjp10l7HKeTIqtns1SgDalBnD6myJZ9kQXA bKoxNsC7VWW+DrdtbVUS1zSDJK6RaCQ4dyVP X-Google-Smtp-Source: ABdhPJxIx1TmmHvtsAVlQ6zvfSilf/6nZODYTS5uNDV03rwFtLDoCkVD5ewo5kXmdbliT4pWlEQQhw== X-Received: by 2002:a17:90a:4413:b0:1cd:2d00:9d0b with SMTP id s19-20020a17090a441300b001cd2d009d0bmr25468128pjg.81.1650963649805; Tue, 26 Apr 2022 02:00:49 -0700 (PDT) Received: from chenghaoyang.c.googlers.com.com (93.135.240.35.bc.googleusercontent.com. [35.240.135.93]) by smtp.gmail.com with ESMTPSA id c18-20020a056a000ad200b004cdccd3da08sm15449379pfl.44.2022.04.26.02.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 02:00:49 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Apr 2022 09:00:25 +0000 Message-Id: <20220426090029.1350103-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/4] 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 everyone, This CL is the second draft of adding CrOS JEA as the backend of the encoder in src/android/jpeg. According to Laurent's comments, splitting the CL into four pieces to review them more easily. More comments are welcome. Thanks! BR, Harvey Harvey Yang (4): Allow inheritance of FrameBuffer Add AndroidFrameBuffer and replace FrameBuffer in src/android Rework JPEG encoder API and update PostProcessorJpeg and EncoderLibJpeg Add JEA implementation include/libcamera/framebuffer.h | 3 +- src/android/android_framebuffer.cpp | 32 ++++++++ src/android/android_framebuffer.h | 28 +++++++ src/android/camera_device.cpp | 3 +- src/android/cros/camera3_hal.cpp | 3 + src/android/frame_buffer_allocator.h | 7 +- src/android/jpeg/cros_post_processor_jpeg.cpp | 14 ++++ src/android/jpeg/encoder.h | 9 +- src/android/jpeg/encoder_jea.cpp | 82 +++++++++++++++++++ src/android/jpeg/encoder_jea.h | 35 ++++++++ src/android/jpeg/encoder_libjpeg.cpp | 70 ++++++++++++++++ src/android/jpeg/encoder_libjpeg.h | 21 ++++- .../jpeg/generic_post_processor_jpeg.cpp | 14 ++++ src/android/jpeg/meson.build | 16 ++++ src/android/jpeg/post_processor_jpeg.cpp | 60 ++------------ src/android/jpeg/post_processor_jpeg.h | 11 +-- src/android/meson.build | 6 +- .../mm/cros_frame_buffer_allocator.cpp | 13 +-- .../mm/generic_frame_buffer_allocator.cpp | 11 +-- 19 files changed, 352 insertions(+), 86 deletions(-) create mode 100644 src/android/android_framebuffer.cpp create mode 100644 src/android/android_framebuffer.h create mode 100644 src/android/jpeg/cros_post_processor_jpeg.cpp create mode 100644 src/android/jpeg/encoder_jea.cpp create mode 100644 src/android/jpeg/encoder_jea.h create mode 100644 src/android/jpeg/generic_post_processor_jpeg.cpp create mode 100644 src/android/jpeg/meson.build