Compute Library
 21.08
ColorConvertHelper.h File Reference
#include "Utils.h"

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2021 Arm Limited.
 
 arm_compute::test
 
 arm_compute::test::colorconvert_helper
 
 arm_compute::test::colorconvert_helper::detail
 

Functions

template<typename T >
void store_rgb_from_src (const SimpleTensor< T > src, SimpleTensor< T > &rvec, SimpleTensor< T > &gvec, SimpleTensor< T > &bvec)
 
template<typename T >
void rgb_to_yuv_calculation (const SimpleTensor< T > rvec, const SimpleTensor< T > gvec, const SimpleTensor< T > bvec, SimpleTensor< T > &yvec, SimpleTensor< T > &uvec_top, SimpleTensor< T > &uvec_bottom, SimpleTensor< T > &vvec_top, SimpleTensor< T > &vvec_bottom)
 
float compute_rgb_value (int y_value, int v_value, int u_value, unsigned char channel_idx)
 
template<typename T >
void yuyv_to_rgb_calculation (const SimpleTensor< T > yvec, const SimpleTensor< T > vvec, const SimpleTensor< T > yyvec, const SimpleTensor< T > uvec, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_rgb_to_rgbx (const SimpleTensor< T > src, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_rgb_to_u8 (const SimpleTensor< T > src, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_rgbx_to_rgb (const SimpleTensor< T > src, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_yuyv_to_rgb (const SimpleTensor< T > src, const Format format, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_iyuv_to_rgb (const std::vector< SimpleTensor< T >> &tensor_planes, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_nv12_to_rgb (const Format format, const std::vector< SimpleTensor< T >> &tensor_planes, SimpleTensor< T > &dst)
 
template<typename T >
void colorconvert_rgb_to_nv12 (const SimpleTensor< T > src, std::vector< SimpleTensor< T >> &dst)
 
template<typename T >
void colorconvert_rgb_to_iyuv (const SimpleTensor< T > src, std::vector< SimpleTensor< T >> &dst)
 
template<typename T >
void colorconvert_rgb_to_yuv4 (const SimpleTensor< T > src, std::vector< SimpleTensor< T >> &dst)
 
template<typename T >
void colorconvert_yuyv_to_nv12 (const SimpleTensor< T > src, const Format format, std::vector< SimpleTensor< T >> &dst)
 
template<typename T >
void colorconvert_yuyv_to_iyuv (const SimpleTensor< T > src, const Format format, std::vector< SimpleTensor< T >> &dst)
 
template<typename T >
void nv_to_iyuv (const SimpleTensor< T > src, const Format src_format, SimpleTensor< T > &nv1, SimpleTensor< T > &nv2)
 
template<typename T >
void nv_to_yuv4 (const SimpleTensor< T > src, const Format src_format, SimpleTensor< T > &nv1, SimpleTensor< T > &nv2)
 
template<typename T >
void colorconvert_nv_to_iyuv (const std::vector< SimpleTensor< T >> src, const Format src_format, std::vector< SimpleTensor< T >> &dst)
 
template<typename T >
void colorconvert_nv_to_yuv4 (const std::vector< SimpleTensor< T >> src, const Format src_format, std::vector< SimpleTensor< T >> &dst)
 

Variables

constexpr float red_coef_bt709 = 1.5748F
 
constexpr float green_coef_bt709 = -0.1873f
 
constexpr float green_coef2_bt709 = -0.4681f
 
constexpr float blue_coef_bt709 = 1.8556f
 
constexpr float rgb2yuv_bt709_kr = 0.2126f
 
constexpr float rgb2yuv_bt709_kb = 0.0722f
 
constexpr float rgb2yuv_bt709_kg = 0.7152f
 
constexpr float rgb2yuv_bt709_cu = 0.5389f
 
constexpr float rgb2yuv_bt709_cv = 0.6350f
 
constexpr float rgb2u8_red_coef = 0.2126f
 
constexpr float rgb2u8_green_coef = 0.7152f
 
constexpr float rgb2u8_blue_coef = 0.0722f