[libcamera-devel] [PATCH 2/3] android: camera_stream: Support PostProcessorYuv in CameraStream

Jacopo Mondi jacopo at jmondi.org
Wed Aug 18 13:00:41 CEST 2021


Hi Hiro,

On Thu, Aug 05, 2021 at 10:45:29PM +0900, Hirokazu Honda wrote:
> CameraStream creates PostProcessorYuv if the destination format
> is NV12.
>
> Signed-off-by: Hirokazu Honda <hiroh at chromium.org>

Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
   j

> ---
>  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 <libcamera/formats.h>
>
> @@ -65,6 +66,12 @@ int CameraStream::configure()
>  		StreamConfiguration output = configuration();
>  		output.pixelFormat = outFormat;
>  		switch (outFormat) {
> +		case formats::NV12:
> +			postProcessor_ = std::make_unique<PostProcessorYuv>();
> +			output.size.width = camera3Stream_->width;
> +			output.size.height = camera3Stream_->height;
> +			break;
> +
>  		case formats::MJPEG:
>  			postProcessor_ = std::make_unique<PostProcessorJpeg>(cameraDevice_);
>  			break;
> --
> 2.32.0.554.ge1b32706d8-goog
>


More information about the libcamera-devel mailing list