14#include <linux/media/v4l2-isp.h>
25 std::span<const uint8_t>
block(
unsigned int blockType,
size_t blockSize)
const;
26 constexpr explicit operator bool()
32 std::map<uint16_t, std::span<const uint8_t>> cache_;
33 std::span<uint8_t> data_;
37template<
typename Traits>
41 static_assert(std::is_same_v<std::underlying_type_t<typename Traits::id_type>, uint16_t>);
43 V4L2Stats(std::span<uint8_t> data,
unsigned int version)
48 template<
typename Traits::
id_type Id>
49 const typename Traits::template id_to_details<Id>::type *
52 using Details =
typename Traits::template id_to_details<Id>;
54 using Type =
typename Details::type;
55 constexpr auto kernelId = Details::blockType;
59 return data.size() > 0 ?
60 reinterpret_cast<const Type *
>(data.data()) :
nullptr;
Base class for V4L2Stats.
Definition v4l2_stats.h:21
std::span< const uint8_t > block(unsigned int blockType, size_t blockSize) const
Retrieve an ISP statistics block and return a reference to it.
Definition v4l2_stats.cpp:122
Helper class that represents an ISP statistics buffer.
Definition v4l2_stats.h:39
V4L2Stats(std::span< uint8_t > data, unsigned int version)
Construct an instance of V4L2Stats.
Definition v4l2_stats.h:43
const Traits::template id_to_details< Id >::type * block() const
Retrieve a pointer to an ISP statistics block.
Definition v4l2_stats.h:50
Top-level libcamera namespace.
Definition backtrace.h:17