diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-10-15 15:16:56 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-10-18 09:53:59 +0100 |
commit | f4999536b4f75eef1a489936b0c9795fdc234574 (patch) | |
tree | 85341cd5a8869f108ac5306b0ae4f5f3e747a6d7 /include/libcamera-helpers/mapped_buffer.h | |
parent | 2c8c967d725f56940a6c8f7e23930fed58ccf083 (diff) |
libcamera-helpers: Integrate latest MappedFrameBuffer
The MappedFrameBuffer helper class has been updated in the libcamera
source code.
This makes use of the new enum MapFlags type, and corrects the mapping
changes that were made during 8708904fad6f ("libcamera:
mapped_framebuffer: Return plane begin address by MappedBuffer::maps()")
This update also brings back isolated IPA functionality to this external
IPA, which is otherwise broken due to the offset/plane changes.
The files are renamed to mapped_framebuffer to match the naming in
libcamera, but are kept within the 'libcamera-helper' hierarchy of the
IPA.
Also, a minor todo is added to IPAIPU3::mapBuffers, to highlight that we
could potentially map Statistics buffers as read only rather than
read/write if we could correctly identify them.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/libcamera-helpers/mapped_buffer.h')
-rw-r--r-- | include/libcamera-helpers/mapped_buffer.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/include/libcamera-helpers/mapped_buffer.h b/include/libcamera-helpers/mapped_buffer.h deleted file mode 100644 index 6cfc572..0000000 --- a/include/libcamera-helpers/mapped_buffer.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2020, Google Inc. - * - * buffer.h - Internal buffer handling - */ -#ifndef __LIBCAMERA_MAPPED_BUFFER_H__ -#define __LIBCAMERA_MAPPED_BUFFER_H__ - -#include <sys/mman.h> -#include <vector> - -#include <libcamera/base/class.h> -#include <libcamera/base/span.h> - -#include <libcamera/framebuffer.h> - -namespace libcamera { - -class MappedBuffer -{ -public: - using Plane = Span<uint8_t>; - - ~MappedBuffer(); - - MappedBuffer(MappedBuffer &&other); - MappedBuffer &operator=(MappedBuffer &&other); - - bool isValid() const { return error_ == 0; } - int error() const { return error_; } - const std::vector<Plane> &maps() const { return maps_; } - -protected: - MappedBuffer(); - - int error_; - std::vector<Plane> maps_; - -private: - LIBCAMERA_DISABLE_COPY(MappedBuffer) -}; - -class MappedFrameBuffer : public MappedBuffer -{ -public: - MappedFrameBuffer(const FrameBuffer *buffer, int flags); -}; - -} /* namespace libcamera */ - -#endif /* __LIBCAMERA_MAPPED_BUFFER_H__ */ - |