android: post_processor: Consolidate contextual information

Save and provide the context for post-processor of a camera stream
via Camera3RequestDescriptor::StreamBuffer. We extend the structure
to include source and destination buffers for the post processor, along
with CameraStream::Type::Internal buffer pointer (if any). In addition
to that, a back pointer to Camera3RequestDescriptor is convenient to
get access to overall descriptor (status, metadata settings etc.).

Also, migrate CameraStream::process() and PostProcessor::process()
signature to use Camera3RequestDescriptor::StreamBuffer only. This
will be helpful when we move to async post-processing in subsequent
commits.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
This commit is contained in:
Umang Jain 2021-10-26 12:51:45 +05:30
parent 64bcbd0e2c
commit 79cdb1f19d
10 changed files with 44 additions and 40 deletions

View file

@ -11,8 +11,7 @@
#include <libcamera/stream.h>
#include "camera_buffer.h"
class Camera3RequestDescriptor;
#include "camera_request.h"
class PostProcessor
{
@ -21,9 +20,7 @@ public:
virtual int configure(const libcamera::StreamConfiguration &inCfg,
const libcamera::StreamConfiguration &outCfg) = 0;
virtual int process(const libcamera::FrameBuffer &source,
CameraBuffer *destination,
Camera3RequestDescriptor *request) = 0;
virtual int process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) = 0;
};
#endif /* __ANDROID_POST_PROCESSOR_H__ */