21.02
|
Basic implementation of the multi-planar image interface. More...
#include <MultiImage.h>
Public Member Functions | |
MultiImage () | |
Constructor. More... | |
void | init (unsigned int width, unsigned int height, Format format) |
Allocate the multi-planar image. More... | |
void | init_auto_padding (unsigned int width, unsigned int height, Format format) |
Allocate the multi-planar image. More... | |
void | allocate () |
Allocated a previously initialised multi image. More... | |
void | create_subimage (MultiImage *image, const Coordinates &coords, unsigned int width, unsigned int height) |
Create a subimage from an existing MultiImage. More... | |
const MultiImageInfo * | info () const override |
Interface to be implemented by the child class to return the multi-planar image's metadata. More... | |
Image * | plane (unsigned int index) override |
Return a pointer to the requested plane of the image. More... | |
const Image * | plane (unsigned int index) const override |
Return a constant pointer to the requested plane of the image. More... | |
Public Member Functions inherited from IMultiImage | |
virtual | ~IMultiImage ()=default |
Destructor. More... | |
Basic implementation of the multi-planar image interface.
Definition at line 41 of file MultiImage.h.
MultiImage | ( | ) |
void allocate | ( | ) |
Allocated a previously initialised multi image.
Definition at line 130 of file MultiImage.cpp.
References arm_compute::test::validation::allocator(), ARM_COMPUTE_ERROR, arm_compute::F16, arm_compute::F32, MultiImageInfo::format(), arm_compute::IYUV, arm_compute::NV12, arm_compute::NV21, arm_compute::RGB888, arm_compute::RGBA8888, arm_compute::S16, arm_compute::S32, arm_compute::U16, arm_compute::U32, arm_compute::U8, arm_compute::UYVY422, arm_compute::YUV444, and arm_compute::YUYV422.
void create_subimage | ( | MultiImage * | image, |
const Coordinates & | coords, | ||
unsigned int | width, | ||
unsigned int | height | ||
) |
Create a subimage from an existing MultiImage.
[in] | image | Image to use backing memory from |
[in] | coords | Starting coordinates of the new image. Should be within the parent image sizes |
[in] | width | The width of the subimage |
[in] | height | The height of the subimage |
Definition at line 164 of file MultiImage.cpp.
References arm_compute::test::validation::allocator(), ARM_COMPUTE_ERROR, arm_compute::F16, arm_compute::F32, MultiImageInfo::format(), MultiImage::info(), MultiImageInfo::init(), arm_compute::IYUV, arm_compute::NV12, arm_compute::NV21, MultiImage::plane(), arm_compute::RGB888, arm_compute::RGBA8888, arm_compute::S16, arm_compute::S32, arm_compute::U16, arm_compute::U32, arm_compute::U8, arm_compute::UV88, arm_compute::UYVY422, arm_compute::YUV444, and arm_compute::YUYV422.
|
overridevirtual |
Interface to be implemented by the child class to return the multi-planar image's metadata.
Implements IMultiImage.
Definition at line 38 of file MultiImage.cpp.
Referenced by MultiImage::create_subimage(), and MultiImage::init_auto_padding().
void init | ( | unsigned int | width, |
unsigned int | height, | ||
Format | format | ||
) |
Allocate the multi-planar image.
[in] | width | Width of the whole image |
[in] | height | Height of the whole image |
[in] | format | Format of the whole image |
Definition at line 43 of file MultiImage.cpp.
void init_auto_padding | ( | unsigned int | width, |
unsigned int | height, | ||
Format | format | ||
) |
Allocate the multi-planar image.
[in] | width | Width of the whole image |
[in] | height | Height of the whole image |
[in] | format | Format of the whole image |
Definition at line 48 of file MultiImage.cpp.
References arm_compute::adjust_odd_shape(), arm_compute::test::validation::allocator(), ARM_COMPUTE_ERROR, TensorInfo::auto_padding(), arm_compute::calculate_subsampled_shape(), arm_compute::F16, arm_compute::F32, MultiImage::info(), MultiImageInfo::init(), arm_compute::IYUV, arm_compute::NV12, arm_compute::NV21, arm_compute::RGB888, arm_compute::RGBA8888, arm_compute::S16, arm_compute::S32, arm_compute::test::validation::shape, arm_compute::U16, arm_compute::U32, arm_compute::U8, arm_compute::UV88, arm_compute::UYVY422, Dimensions< T >::x(), Dimensions< T >::y(), arm_compute::YUV444, and arm_compute::YUYV422.
|
overridevirtual |
Return a pointer to the requested plane of the image.
[in] | index | The index of the wanted planed. |
Implements IMultiImage.
Definition at line 216 of file MultiImage.cpp.
Referenced by MultiImage::create_subimage().
|
overridevirtual |
Return a constant pointer to the requested plane of the image.
[in] | index | The index of the wanted planed. |
Implements IMultiImage.
Definition at line 221 of file MultiImage.cpp.