24#include "rawspeedconfig.h"
52 const uint8_t*
data =
nullptr;
80 ThrowIOE(
"Buffer overflow: image file may be truncated");
87 ThrowIOE(
"Buffer overflow: image file may be truncated");
99 [[nodiscard]]
const uint8_t*
begin()
const {
106 template <
typename T>
118 return static_cast<uint64_t>(offset) + count <=
125 return std::pair(lhs.
begin(), lhs.
end()) < std::pair(rhs.
begin(), rhs.
end());
146 template <
typename T>
assert(dim.area() >=area)
CroppedArray1DRef< T > getCrop(int offset, int numElts) const
Buffer(const uint8_t *data_, size_type size_)
Array1DRef< const uint8_t > getAsArray1DRef() const
Buffer getSubView(size_type offset, size_type size_) const
bool isValid(size_type offset, size_type count=1) const
Buffer(Array1DRef< const uint8_t > data_)
const uint8_t * begin() const
const uint8_t * end() const
T get(bool inNativeByteOrder, size_type offset, size_type index=0) const
size_type RAWSPEED_READONLY getSize() const
Buffer getSubView(size_type offset) const
uint8_t operator[](size_type offset) const
Endianness getByteOrder() const
Endianness setByteOrder(Endianness endianness_)
DataBuffer(Buffer data_, Endianness endianness_)
T get(size_type offset, size_type index=0) const
bool operator<(const Range< T > &lhs, const Range< T > &rhs)
constexpr RAWSPEED_READNONE Ttgt implicit_cast(Tsrc value)
int8_t getByteSwapped(int8_t v)
Endianness getHostEndianness()
void RAWSPEED_UNLIKELY_FUNCTION RAWSPEED_NOINLINE static char buf[bufSize]
static bool RegionIsPoisoned(const volatile void *addr, size_t size)