From patchwork Tue Apr 26 09:14:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 15718 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 DAE98C0F1B for ; Tue, 26 Apr 2022 09:14:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1266065644; Tue, 26 Apr 2022 11:14:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1650964469; bh=KbGnIDufzHmt69QPlU7UCm4enyj201pD8McneP15Ze4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=3hAL7qT11D6fEMehOboB3T0Iq/GW7WvXfiSkAu98lyXL41MSmNXbTvKCJL+S0bFbh MnS/oxeCzXWwiYbEfCk+7C7Y82MxYZ7EQQOUAH7vKr1WlEjW/+FizCAsKn+5ypF2IO S1DQtLfwxcIx2eA1Iw9W1fpArjh5gSMHIZyQY7BR7/RuB029WnYMpWvLAZaZs7yr+c 6iYCWIuT35nQNhLxC83WIDL5alWqFqmm1pBspeiU0RNM9HLahWOqCl0lnAecWca2fT u6Oo90T89m+jpehJMq/gF+5t4/m65nFi1O/KtsJBW8ApIQWBMCbsvTRWtTgBHR5leF EwnQCY58Z70pw== Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D89DD60431 for ; Tue, 26 Apr 2022 11:14:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="GYWoMVqS"; dkim-atps=neutral Received: by mail-pf1-x430.google.com with SMTP id p12so5707006pfn.0 for ; Tue, 26 Apr 2022 02:14:27 -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=99Ohi0rx2Yvu2thAA8jZIQbcmHwf+Jnc9t4zT87C5as=; b=GYWoMVqScutVs4S/vhrDqLEFjftPdQaG48QDynt0lPcohuwC//C3fuPxZflvGRT2Gq orr1CgHRGGRXRIyJ+gk9tZ8W241wBV0SHzMXBHgBi5yV//FBQkFeMrZMYKBBSEnUN07C a+7Nkdi3NCf+w2co7rJLLdXWgSz1upxMUCBog= 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=99Ohi0rx2Yvu2thAA8jZIQbcmHwf+Jnc9t4zT87C5as=; b=NQwUgDEOlmb3VDkEVMqdkXjLlXsOLJ6BimsfxvhkpQZ3/G/lL1Uz+2M3lsdBBPFpof kpB+cjbzPy0Evku0F88spf4/kyuIswylBrYIHWTqxYssLiaCFutNICptPC2MJrj75IuR KdlwZkzxHV5joJJQx3U7OaP64Sg+HtfPotwM6k/yxW2Ephgcjztk+4MuDwB1xQ+6lc1i 9MYUd+8zX5wt1heazpLpqFqbz398ns/xVcw+T16KkVkCVis0UQBBOzTyR8AgZYL2pZQn EqLo6T/6QpBYMQqee0pQAGucQlrNzDMMTu3Y6tzscnFxHHsgtUBEMQWSUpPzGlIH9h71 sYZQ== X-Gm-Message-State: AOAM532iaf68y9dt3TKUi49YMVCBQs9Ri/roGukotZP6zWBe4n8cUI17 rpj9ePUCmciV1nhCqfbbQO6uKHj3rSmsgqa2 X-Google-Smtp-Source: ABdhPJz2EOYGLFfY0+2Tturo/c1UOmsQNvUt2aU9svHWdHR11ZwXSPhTgUxFwXLtxnq8eD4Luc4bIA== X-Received: by 2002:a63:3d0b:0:b0:37f:ef34:1431 with SMTP id k11-20020a633d0b000000b0037fef341431mr18508941pga.547.1650964465869; Tue, 26 Apr 2022 02:14:25 -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 w123-20020a623081000000b005056a4d71e3sm14441042pfw.77.2022.04.26.02.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 02:14:25 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Apr 2022 09:14:05 +0000 Message-Id: <20220426091409.1352047-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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, I added the Signed-off-by line, and splitted the CL into four pieces to make the review easier. 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