From patchwork Thu Aug 5 13:45:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 13209 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 20436C3235 for ; Thu, 5 Aug 2021 13:45:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CD6F46880D; Thu, 5 Aug 2021 15:45:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hVRWjgjL"; dkim-atps=neutral Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7473B6882A for ; Thu, 5 Aug 2021 15:45:42 +0200 (CEST) Received: by mail-pj1-x102d.google.com with SMTP id m10-20020a17090a34cab0290176b52c60ddso9513878pjf.4 for ; Thu, 05 Aug 2021 06:45:42 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=xbWSfNll0kJr2OmdWkjhhEwP2V0tpQzdIqD465Qd8RE=; b=hVRWjgjL2s9r/BuVf615jzYxK3/N/vsFQOwXBUEddnZjscqIcVC46bMfO/zpYoXdw3 +oRwAjoVHbBkfSYP9dCjPmRe8wokLFTot70lAz5oqMneX74IebM1SspcvAj3+olCrfM+ Klu+zUUatNh/XNVTU9FGK4Rse2cLRxk0v1nno= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xbWSfNll0kJr2OmdWkjhhEwP2V0tpQzdIqD465Qd8RE=; b=YHr+wyrHo5fKxEo6wQaAb7csByL4v7A1BGBN7I7+47bg31raMzUeEu5hPIG6rOkmIH SaP5h5DY9vgrp9h26177yQbvrD8b6noMHJMOR84MrMQe+wjoH1GcYDBsF/TFuEVTyA7b eMg0Z5vAqywC8xVwO77+DXhPeR5zSEWwTy4ULUJRKelWfdtn6lJTfMt3lL1J0/jMnBS2 NDxXjOmKtNjA1r0S0ls9IvCPcyE5YaaA7kVi3wD0BkKhD84HhjPM8Q21ta+0kRbpSSw6 6owHcX0bV6ZYNCrJipa6HGibh62stagHui8ROJmZMCvV2kvFJg5yWcsrZYlNt7wH6PnE p7Fg== X-Gm-Message-State: AOAM533ba2llDr2N/bysKsUIIQVq0PSLjsV5Mb7YS5pGdLFg36Br1S6T 56EwC4ldQeSS37tW0tfBGLzsuoLF+iHCTA== X-Google-Smtp-Source: ABdhPJxGWKd/9WPGNO6Af4A3XaTW5UlYAO8FE4OL6Hc9y6MGkeuDR5cv/uhxDs9HDBtKvMwMlcU4QA== X-Received: by 2002:a17:902:7208:b029:12c:9c9d:e0bb with SMTP id ba8-20020a1709027208b029012c9c9de0bbmr4380385plb.44.1628171140579; Thu, 05 Aug 2021 06:45:40 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:490b:61c8:a52a:e6eb]) by smtp.gmail.com with ESMTPSA id b8sm6029381pjo.51.2021.08.05.06.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 06:45:40 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 5 Aug 2021 22:45:29 +0900 Message-Id: <20210805134530.825065-3-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog In-Reply-To: <20210805134530.825065-1-hiroh@chromium.org> References: <20210805134530.825065-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] android: camera_stream: Support PostProcessorYuv in CameraStream 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" CameraStream creates PostProcessorYuv if the destination format is NV12. Signed-off-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- src/android/camera_stream.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp index 86263403..8c02cb43 100644 --- a/src/android/camera_stream.cpp +++ b/src/android/camera_stream.cpp @@ -11,6 +11,7 @@ #include "camera_device.h" #include "camera_metadata.h" #include "jpeg/post_processor_jpeg.h" +#include "yuv/post_processor_yuv.h" #include @@ -65,6 +66,12 @@ int CameraStream::configure() StreamConfiguration output = configuration(); output.pixelFormat = outFormat; switch (outFormat) { + case formats::NV12: + postProcessor_ = std::make_unique(); + output.size.width = camera3Stream_->width; + output.size.height = camera3Stream_->height; + break; + case formats::MJPEG: postProcessor_ = std::make_unique(cameraDevice_); break;