From patchwork Wed Apr 6 09:41:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 15627 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 CA9CEC3256 for ; Wed, 6 Apr 2022 10:34:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 63B7765646; Wed, 6 Apr 2022 12:34:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649241267; bh=t02CRQKKXybCu1q+cmM/fQoAbd4qEtFqRYPhQ3pW410=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=G3jkV3bY5YsWJSVmSCE68ozXdDAJeGf5me2cWbLckssq7tQzTSAgsctPsZEWe/n0p ooyikM3qvcI+wcli8ROzkAP+LBKgePMOElUyM5qEv6u8GHOE00zAmx2rMvA1f2CgHG CRoLqnRA4B/2A1thmQaq4a+kgc2coS/025VCugz0hn+lwlFlMDPZtreG10xSPrhxmp kvzpTNUSem5oVlGAZ1mVPf3nyoVMRtvumv8d7GPXUck6s8djwpzhiu394Y1BCLNyJL GQtSi8gc/RyehHXxyat9uxr+vVyNt3efn5SCT6r4XYcpfKuz81QWlr3Dc9dEggO7Pb hT7SJY/ARlSGw== Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 83A74604B8 for ; Wed, 6 Apr 2022 11:41:43 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MLs5pjvU"; dkim-atps=neutral Received: by mail-pj1-x102c.google.com with SMTP id kw18so2016200pjb.5 for ; Wed, 06 Apr 2022 02:41:43 -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=Dm38nBZ6xPaF5nkckklJ7vDCcjzu5EQqbt0kz3eTwDI=; b=MLs5pjvUH08uRZstfy8hb+QpZY42G4RPAsNB3ZnlBVUqQQ6yhoBrD8S+F6LzGw08Sa 4olNj6JuDIPgeGUZ+ue5IySb0XgGpiXznTPpAygXKxmHYdV1bxKEda5YZuxD/VbNEkFQ 0b8h06oHCUvLMJiLNlbQi58f1RHJGpHqJIWX8= 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=Dm38nBZ6xPaF5nkckklJ7vDCcjzu5EQqbt0kz3eTwDI=; b=7kO2zSCneQgxCWz3QO2nPMrHUd6nlZsj5hsMQtHLUf73dbZGZaih6iO5H0LizITpeI nQpTNPbkzbihtLcdZQTit3yH3HPeqTc7GU2B8QSTVrIR+5ZdMk0c6k2Z1nnn59LaW3PB VJodqrSZG/QkzDFhUzhQyepwlRF/aX6EnnAF0J4mj8rsHMOAUuQwwiwcJciD6PhTBcZ9 Bl0rqiuYqdRBQohXwv0MmYn7dwHUhXztwtTt94nMh94NXsDX9r4mcx1672SOhqAsyArS kUxXamVXn5uZGqKkxAIguAkbM6iHl6GEQa05Iuu41OqdxjahDHJTQiAdif169gxpioTZ hCqg== X-Gm-Message-State: AOAM532tlw087l2weRui2ZpNrGJiscPbd/KggL7FDqPT0H/QmmXxpVdg AmTK15D1JLTBpPnYo3u30xaRCysW5uWuDw== X-Google-Smtp-Source: ABdhPJy+dzTexns+LpR4GlAYsLLTmTeraDEjAKWdvY0nMhpa4dUPmMCbZY2V4KAO0sWZzvnBicLDRw== X-Received: by 2002:a17:90b:4f4b:b0:1c7:928d:1964 with SMTP id pj11-20020a17090b4f4b00b001c7928d1964mr8996499pjb.129.1649238101210; Wed, 06 Apr 2022 02:41:41 -0700 (PDT) Received: from chenghaoyang-p920.tpe.corp.google.com ([2401:fa00:1:17:42f3:c4c9:1892:e888]) by smtp.gmail.com with ESMTPSA id mq6-20020a17090b380600b001c6357f146csm6071855pjb.12.2022.04.06.02.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 02:41:40 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Apr 2022 17:41:29 +0800 Message-Id: <20220406094130.189862-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.35.1.1094.g7c7d902a7c-goog MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 06 Apr 2022 12:34:26 +0200 Subject: [libcamera-devel] [PATCH 0/1] Add CrOS JEA implementation in src/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: , 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 first draft of adding CrOS JEA as the backend of the encoder in src/android/jpeg. It's the first time I added a patch in libcamera, so it's very likely I missed any critical things. Please help review and give suggestions. Thanks! BR, Harvey Harvey Yang (1): Add CrOS 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 | 37 +++++---- 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, 367 insertions(+), 101 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