50 const int width =
dst.shape().x();
51 const int height =
dst.shape().y();
55 #pragma omp parallel for collapse(2) 57 for(
int y = 0; y < height; ++y)
59 for(
int x = 0; x < width; ++x)
64 const auto *src_pixel =
reinterpret_cast<const T *
>(
src(src_coord));
65 auto *dst_pixel =
reinterpret_cast<T *
>(
dst(dst_coord));
67 dst_pixel[0] = src_pixel[channel_idx];
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
int plane_idx_from_channel(Format format, Channel channel)
Return the plane index of a given channel given an input format.
TensorShape calculate_subsampled_shape(const TensorShape &shape, Format format, Channel channel=Channel::UNKNOWN)
Calculate subsampled shape for a given format and channel.
1 channel, 1 U8 per channel
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
Channel
Available channels.
Format
Image colour formats.
SimpleTensor< uint8_t > channel_extract(const TensorShape &shape, const std::vector< SimpleTensor< T >> &tensor_planes, Format format, Channel channel)
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
int channel_idx_from_format(Format format, Channel channel)
Return the channel index of a given channel given an input format.