RockX  1.0.0
rockx_type.h
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * Copyright (c) 2017 - 2019 by Rockchip Corp. All rights reserved.
4 *
5 * The material in this file is confidential and contains trade secrets
6 * of Rockchip Corporation. This is proprietary information owned by
7 * Rockchip Corporation. No part of this work may be disclosed,
8 * reproduced, copied, transmitted, or used in any way for any purpose,
9 * without the express written permission of Rockchip Corporation.
10 *
11 *****************************************************************************/
12 
13 #ifndef _ROCKX_TYPE_H
14 #define _ROCKX_TYPE_H
15 
16 #include <stddef.h>
17 #include <cstdint>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
26 typedef void *rockx_handle_t;
27 
31 typedef void (*rockx_async_callback)(void *result, size_t result_size);
32 
36 typedef enum {
40 } rockx_ret_t;
41 
45 typedef enum {
50 
54 typedef enum {
62 
66 typedef enum {
71 
75 typedef struct rockx_tensor_t {
78  uint8_t n_dims;
79  uint32_t dims[4];
80  void* data;
82 
86 typedef struct rockx_point_t {
87  int x;
88  int y;
90 
94 typedef struct rockx_pointf_t {
95  float x;
96  float y;
98 
102 typedef struct rockx_rect_t {
103  int left;
104  int top;
105  int right;
106  int bottom;
107 } rockx_rect_t;
108 
112 typedef struct rockx_rectf_t {
113  float left;
114  float top;
115  float right;
116  float bottom;
117 } rockx_rectf_t;
118 
122 typedef struct rockx_image_t {
123  uint8_t *data;
125  int width;
126  int height;
127 } rockx_image_t;
128 
132 typedef struct rockx_color_t {
133  uint8_t r;
134  uint8_t g;
135  uint8_t b;
136 } rockx_color_t;
137 
138 
139 #ifdef __cplusplus
140 } //extern "C"
141 #endif
142 
143 #endif // _ROCKX_TYPE_H
rockx_color_t
struct rockx_color_t rockx_color_t
Color.
rockx_rectf_t::bottom
float bottom
Most bottom coordinate.
Definition: rockx_type.h:116
rockx_color_t
Color.
Definition: rockx_type.h:132
rockx_point_t::x
int x
X Coordinate.
Definition: rockx_type.h:87
rockx_rectf_t::left
float left
Most left coordinate.
Definition: rockx_type.h:113
rockx_data_type
rockx_data_type
Data Type.
Definition: rockx_type.h:54
rockx_rectf_t
struct rockx_rectf_t rockx_rectf_t
Rectangle of Object Region.
rockx_rectf_t::right
float right
Most right coordinate.
Definition: rockx_type.h:115
rockx_rect_t::bottom
int bottom
Most bottom coordinate.
Definition: rockx_type.h:106
rockx_point_t::y
int y
Y Coordinate.
Definition: rockx_type.h:88
rockx_ret_t
rockx_ret_t
Return Value of RockX functions.
Definition: rockx_type.h:36
rockx_color_t::g
uint8_t g
Definition: rockx_type.h:134
rockx_tensor_t::data
void * data
Tensor data.
Definition: rockx_type.h:80
rockx_pointf_t
struct rockx_pointf_t rockx_pointf_t
Point (Float)
ROCKX_RET_FAIL
Fail.
Definition: rockx_type.h:38
rockx_tensor_t
Tensor.
Definition: rockx_type.h:75
ROCKX_TENSOR_FORMAT_NCHW
data format is NCHW (RRRGGGBBB)
Definition: rockx_type.h:67
rockx_rect_t
struct rockx_rect_t rockx_rect_t
Rectangle of Object Region.
rockx_pointf_t
Point (Float)
Definition: rockx_type.h:94
rockx_pointf_t::y
float y
Y Coordinate.
Definition: rockx_type.h:96
rockx_tensor_t::dims
uint32_t dims[4]
Tensor dimension.
Definition: rockx_type.h:79
ROCKX_PIXEL_FORMAT_RGB888
RGB888.
Definition: rockx_type.h:47
rockx_image_t
struct rockx_image_t rockx_image_t
Image.
rockx_rect_t::top
int top
Most top coordinate.
Definition: rockx_type.h:104
ROCKX_RET_SUCCESS
Success.
Definition: rockx_type.h:37
rockx_rect_t
Rectangle of Object Region.
Definition: rockx_type.h:102
rockx_image_t::width
int width
Image Width.
Definition: rockx_type.h:125
rockx_point_t
struct rockx_point_t rockx_point_t
Point.
rockx_color_t::b
uint8_t b
Definition: rockx_type.h:135
rockx_tensor_t::dtype
rockx_data_type dtype
Data type (rockx_data_type)
Definition: rockx_type.h:76
ROCKX_DTYPE_FLOAT16
Data type is float16.
Definition: rockx_type.h:56
rockx_async_callback
void(* rockx_async_callback)(void *result, size_t result_size)
Pointer of Async Callback Function.
Definition: rockx_type.h:31
ROCKX_DTYPE_UINT8
Data type is uint8.
Definition: rockx_type.h:58
ROCKX_PIXEL_FORMAT_GRAY8
Gray8.
Definition: rockx_type.h:46
rockx_color_t::r
uint8_t r
Definition: rockx_type.h:133
ROCKX_PIXEL_FORMAT_BGR888
BGR888.
Definition: rockx_type.h:48
rockx_tensor_t::fmt
rockx_tensor_format fmt
Tensor Format(rockx_tensor_format)
Definition: rockx_type.h:77
rockx_rectf_t
Rectangle of Object Region.
Definition: rockx_type.h:112
rockx_image_t::data
uint8_t * data
Image data.
Definition: rockx_type.h:123
rockx_pixel_format
rockx_pixel_format
Image Pixel Format.
Definition: rockx_type.h:45
ROCKX_TENSOR_FORMAT_MAX
Definition: rockx_type.h:69
ROCKX_DTYPE_FLOAT32
Data type is float32.
Definition: rockx_type.h:55
rockx_image_t::height
int height
Image Height.
Definition: rockx_type.h:126
rockx_tensor_t
struct rockx_tensor_t rockx_tensor_t
Tensor.
rockx_tensor_format
rockx_tensor_format
Tensor Format.
Definition: rockx_type.h:66
rockx_tensor_t::n_dims
uint8_t n_dims
Number of tensor dimension (0 < n_dims <= 4)
Definition: rockx_type.h:78
ROCKX_DTYPE_INT16
Data type is int16.
Definition: rockx_type.h:59
rockx_handle_t
void * rockx_handle_t
Handle of a created RockX module.
Definition: rockx_type.h:26
ROCKX_DTYPE_INT8
Data type is int8.
Definition: rockx_type.h:57
rockx_image_t::pixel_format
rockx_pixel_format pixel_format
Image pixel format (rockx_pixel_format)
Definition: rockx_type.h:124
rockx_point_t
Point.
Definition: rockx_type.h:86
rockx_rect_t::left
int left
Most left coordinate.
Definition: rockx_type.h:103
ROCKX_RET_PARAM_ERR
Input Param error.
Definition: rockx_type.h:39
rockx_image_t
Image.
Definition: rockx_type.h:122
ROCKX_TENSOR_FORMAT_NHWC
data format is NHWC (RGBRGBRGB)
Definition: rockx_type.h:68
rockx_pointf_t::x
float x
X Coordinate.
Definition: rockx_type.h:95
rockx_rect_t::right
int right
Most right coordinate.
Definition: rockx_type.h:105
ROCKX_DTYPE_TYPE_MAX
Definition: rockx_type.h:60
rockx_rectf_t::top
float top
Most top coordinate.
Definition: rockx_type.h:114