diff options
author | Umang Jain <email@uajain.com> | 2020-10-16 11:07:53 +0530 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-16 10:22:33 +0100 |
commit | 3d946a2e609ced0331563558e120361f153ef442 (patch) | |
tree | aab7a8cb6d9b8ad3e4da595dd560a278fc3ffa8b /src/android | |
parent | 4221ffbc4bfd107fbddb8257de951ecef4aded3f (diff) |
android: post_processor: Introduce a PostProcessor interface
Introduce a PostProcessor interface for the streams that require any
kind of processing (refer to CameraStream::Type) for their consumption
by the HAL layer. The PostProcessor interface can be configured via
configure() and the actual processing can be initiated using process().
The post-processing layer can be extended to have multiple post
processors for various stream configurations. As of now, we only have
one post processor (JPEG), hence the subsequent commit will port its
function to this interface.
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/post_processor.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/android/post_processor.h b/src/android/post_processor.h new file mode 100644 index 00000000..a891c43a --- /dev/null +++ b/src/android/post_processor.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * post_processor.h - CameraStream Post Processing Interface + */ +#ifndef __ANDROID_POST_PROCESSOR_H__ +#define __ANDROID_POST_PROCESSOR_H__ + +#include <libcamera/buffer.h> +#include <libcamera/span.h> +#include <libcamera/stream.h> + +class CameraMetadata; + +class PostProcessor +{ +public: + virtual ~PostProcessor() {} + + virtual int configure(const libcamera::StreamConfiguration &inCfg, + const libcamera::StreamConfiguration &outCfg) = 0; + virtual int process(const libcamera::FrameBuffer *source, + const libcamera::Span<uint8_t> &destination, + CameraMetadata *metadata) = 0; +}; + +#endif /* __ANDROID_POST_PROCESSOR_H__ */ |