From patchwork Fri Sep 15 07:57:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 19011 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 97091C3260 for ; Fri, 15 Sep 2023 07:57:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 265EE62925; Fri, 15 Sep 2023 09:57:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694764655; bh=jVKLL5QEF5z5C0TNFbo0tgqqRfWikpDWJ129oNMsrl0=; h=Date:References:In-Reply-To:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Yk1bCfA91vEmPWOSkYqt/ARouZOmxndzhsFS5dOp5NATGmZ8lZQJKcsG3VUJLjybs Ss7TCNwoWrRaF3V5YcyPUe035ovtvOjMDfUvXiiK+Grag+gR/k0sHbLv7gS3N6mziv Q0Lvm1vCDEPIvsvzRxDrAtXzfUqs37aJJcFESwhvgwY/QzAtHL/r8BqrQhFEo4wyEo LcFTJnx6afNRzaYXD35Cgl2j8ZwEBwN9uH03gFV949qdjwdfm76scIx2hIqTw/08eF CHvIIm4M2kasiM53rQ7t7q/2H1QavXTpF9jypujt1DqKTXbLhPt56/LaK0GBHInPjx k6sMjPPHH4SBg== Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4771F62921 for ; Fri, 15 Sep 2023 09:57:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="JlmqQ/hU"; dkim-atps=neutral Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-402cc6b8bedso21187035e9.1 for ; Fri, 15 Sep 2023 00:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1694764650; x=1695369450; darn=lists.libcamera.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7Yd76vAKqd9nCx1+b0DVl9wG9TBhJs7jAHDcebruqiE=; b=JlmqQ/hU5CxrdP7dFcuKk3cvEqHMxjvbLlghZ85mdx0KX2gB2ScDHb7T5sI7bszUuI e7DI2ZkLY/PZ2tHF6LtOuxbggzf5iP7BTuzOLHSu6ASSQzGK3ZFBUPxOPo7JqdvonNQc RvhY99CGvgPdbpHqLHNj0/5WvcmFz9xPshHrTzNb/yAyLWr4xgtZBocftelanMus0r1Q 1cE3ut1v/jJp962G8gY5d0hvpfI2xgFN/UU/jYHhXsPh1EWdIiAMeBt67cG80NAr3J5U VsHYEK03YfOfzGpjRQ/XamGIRQhC/fJ4kbwbucLyQ7bnjCHyyoDzawQdGTq5aR2Wt3js 28Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694764650; x=1695369450; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7Yd76vAKqd9nCx1+b0DVl9wG9TBhJs7jAHDcebruqiE=; b=Nv7UMmFBCsZLJdesOrgYutftK6/a5oYE/4+/djDm/l1kTjzDmaxBjuvorC+npzCBFu 27kr6G6/n7qIiYscNymYzqSUAh2shbBy1z9TDtsKlZy0ArY6cSLcP3Qt2LwV9wv+3jv9 5N/bEw/LOHITeokyl2Z5odirft27US5/rQYCRB0ExhF5zzFuqJbaUxhds5fBnhe6/him tqJUM/QBoO12Uo0+Ghwjn32+HlCNTT8tkdVVnOnLXpSdsQeGuEd8kTmIPZYj5EsQisOH X1ujBHdAe029JYrXRZ1ze8fz/ONPOqwwTh1QumEVUC30zgGYgaD86qDmXq6GuPOhwrX4 4CvQ== X-Gm-Message-State: AOJu0YyR71EdZIe1v7W/GPMPQhWxCx/43LfhPIMw9tT+AFdz+a+DSWh6 7P3CuOCVXahoB0AF/bjQF3wslg== X-Google-Smtp-Source: AGHT+IHP8tAsP3EL6+g/m2wKXhxeM8R24gXxBLlhhy0By/5lmTstw9JxaZuOhknj7d2gzDFgpJZ8uw== X-Received: by 2002:adf:e845:0:b0:31a:d6cb:7f94 with SMTP id d5-20020adfe845000000b0031ad6cb7f94mr692758wrn.23.1694764650741; Fri, 15 Sep 2023 00:57:30 -0700 (PDT) Received: from [192.168.1.20] ([2a01:cb19:8704:be00:4f55:bd9d:611a:6c8e]) by smtp.gmail.com with ESMTPSA id m2-20020a056000174200b0031fe9a47a87sm2506942wrf.112.2023.09.15.00.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 00:57:30 -0700 (PDT) Date: Fri, 15 Sep 2023 09:57:29 +0200 MIME-Version: 1.0 Message-Id: <20230915-libyuv-convert-v1-5-1e5bcf68adac@baylibre.com> References: <20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com> In-Reply-To: <20230915-libyuv-convert-v1-0-1e5bcf68adac@baylibre.com> To: libcamera-devel@lists.libcamera.org X-Mailer: b4 0.12.4-dev-6aa5d Subject: [libcamera-devel] [PATCH RFC 5/7] android: camera_stream: add add explicit input configuration 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: Mattijs Korpershoek via libcamera-devel From: Mattijs Korpershoek Reply-To: Mattijs Korpershoek Cc: Guillaume La Roque Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" PostProcessors are configured using and input StreamConfigurations. Right now, we use configuration() for the input StreamConfiguration. Use an intermediate variable instead, to prepare for software conversion using libyuv. Signed-off-by: Mattijs Korpershoek Reviewed-by: Jacopo Mondi --- src/android/camera_stream.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp index 045e60061a20..4fd05dda5ed3 100644 --- a/src/android/camera_stream.cpp +++ b/src/android/camera_stream.cpp @@ -87,6 +87,7 @@ int CameraStream::configure() if (type_ == Type::Internal || type_ == Type::Mapped) { const PixelFormat outFormat = cameraDevice_->capabilities()->toPixelFormat(camera3Stream_->format); + StreamConfiguration input = configuration(); StreamConfiguration output = configuration(); output.pixelFormat = outFormat; output.size.width = camera3Stream_->width; @@ -106,7 +107,7 @@ int CameraStream::configure() return -EINVAL; } - int ret = postProcessor_->configure(configuration(), output); + int ret = postProcessor_->configure(input, output); if (ret) return ret;