ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
dsp_types.h
Go to the documentation of this file.
1#ifndef _dsp_types_H_
2#define _dsp_types_H_
3#include <stdint.h>
4#include <stdbool.h>
5#include <inttypes.h>
6
7// union to simplify access to the 16 bit data
8typedef union sc16_u {
9 struct {
10 int16_t re;
11 int16_t im;
12 };
13 uint32_t data;
15
16typedef union fc32_u {
17 struct {
18 float re;
19 float im;
20 };
21 uint64_t data;
23
24typedef struct image2d_s {
25 void *data; // could be int8_t, unt8_t, int16_t, unt16_t, float
26 int step_x; // step of elements by X
27 int step_y; // step of elements by Y, usually is 1
28 int stride_x; // stride width: size of the elements in X axis * by step_x + padding
29 int stride_y; // stride height: size of the elements in Y axis * by step_y + padding
30 // Point[x,y] = data[width*y*step_y + x*step_x];
31 // Full data size = width*height
32 int size_x; // image width
33 int size_y; // image height
35
36#endif // _dsp_types_H_
struct image2d_s image2d_t
union fc32_u fc32_t
union sc16_u sc16_t
int stride_x
Definition dsp_types.h:28
int stride_y
Definition dsp_types.h:29
int size_x
Definition dsp_types.h:32
void * data
Definition dsp_types.h:25
int step_y
Definition dsp_types.h:27
int step_x
Definition dsp_types.h:26
int size_y
Definition dsp_types.h:33
uint64_t data
Definition dsp_types.h:21
float re
Definition dsp_types.h:18
float im
Definition dsp_types.h:19
int16_t re
Definition dsp_types.h:10
uint32_t data
Definition dsp_types.h:13
int16_t im
Definition dsp_types.h:11