7 #ifndef __IMP_COMMON_H__
8 #define __IMP_COMMON_H__
12 #include <linux/videodev2.h>
37 DEV_ID_RESERVED_START,
38 DEV_ID_RESERVED_END = 23,
165 static inline int calc_pic_size(
int width,
int height,
IMPPixelFormat imp_pixfmt)
167 int bpp1 = 0, bpp2 = 1,size;
169 #define BPP(FMT, A, B) case FMT: bpp1 = A;bpp2 = B;break
170 switch (imp_pixfmt) {
180 size = width * height * bpp1 / bpp2;
185 static inline const char *fmt_to_string(
IMPPixelFormat imp_pixfmt)
187 static const char *nv12 =
"nv12";
188 static const char *yuyv422 =
"yuyv422";
190 switch (imp_pixfmt) {
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: imp_common.h:93
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: imp_common.h:108
uint64_t ts
time
Definition: imp_common.h:74
Decoder.
Definition: imp_common.h:33
int y
Y-axis.
Definition: imp_common.h:143
Image Overlay.
Definition: imp_common.h:35
H264 video protocol type.
Definition: imp_common.h:84
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
Definition: imp_common.h:115
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
Definition: imp_common.h:119
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: imp_common.h:111
uint32_t virAddr
frame's virtual address
Definition: imp_common.h:64
uint32_t pixfmt
frame's image format
Definition: imp_common.h:60
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: imp_common.h:105
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: imp_common.h:106
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
Definition: imp_common.h:129
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb...
Definition: imp_common.h:100
IMPPayloadType
Encoding and decoding protocol type.
Definition: imp_common.h:82
IMPDeviceID
IMP Device ID enumeration definition.
Definition: imp_common.h:30
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: imp_common.h:91
uint64_t minus
time to min
Definition: imp_common.h:75
IMP frame image information definition.
Definition: imp_common.h:54
Algorithm.
Definition: imp_common.h:34
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: imp_common.h:113
FB FG1Direct.
Definition: imp_common.h:36
packed BGR 8:8:8, 32bpp, 0BGR0BGR...
Definition: imp_common.h:125
int index
frame index
Definition: imp_common.h:55
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0 ...
Definition: imp_common.h:116
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: imp_common.h:96
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: imp_common.h:109
IMPPoint p0
Upper left corner coordinate information.
Definition: imp_common.h:161
uint32_t width
frame's width
Definition: imp_common.h:58
int outputID
output ID
Definition: imp_common.h:48
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: imp_common.h:97
int64_t timeStamp
frame time stamp
Definition: imp_common.h:66
as above, but U and V bytes are swapped
Definition: imp_common.h:103
uint32_t size
frame's occupied space
Definition: imp_common.h:61
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: imp_common.h:110
packed BGR 8:8:8, 32bpp, BGR0BGR0...
Definition: imp_common.h:126
JPEG image protocol type.
Definition: imp_common.h:83
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
Definition: imp_common.h:118
IMPPoint p1
Lower right corner coordinate information.
Definition: imp_common.h:162
IMP point coordinate information.
Definition: imp_common.h:141
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: imp_common.h:114
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: imp_common.h:92
int x
X-axis.
Definition: imp_common.h:142
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
Definition: imp_common.h:99
Video Source.
Definition: imp_common.h:31
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
Definition: imp_common.h:130
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: imp_common.h:94
number of pixel formats.
Definition: imp_common.h:135
IMP Frame time parameter.
Definition: imp_common.h:73
IMPPixelFormat
IMP image format definition.
Definition: imp_common.h:90
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: imp_common.h:128
Encoder.
Definition: imp_common.h:32
IMPCell enumeration definition.
Definition: imp_common.h:45
packed RGB 8:8:8, 32bpp, RGB0RGB0...
Definition: imp_common.h:124
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: imp_common.h:102
int groupID
Group ID.
Definition: imp_common.h:47
uint64_t plus
max to time
Definition: imp_common.h:76
Y , 8bpp.
Definition: imp_common.h:98
packed RGB 8:8:8, 32bpp, 0RGB0RGB...
Definition: imp_common.h:123
uint32_t height
frame's height
Definition: imp_common.h:59
packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1 ...
Definition: imp_common.h:121
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
Definition: imp_common.h:131
IMPDeviceID deviceID
Device ID.
Definition: imp_common.h:46
int pool_idx
frame Pool's ID
Definition: imp_common.h:56
uint32_t phyAddr
frame's physical address
Definition: imp_common.h:63
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: imp_common.h:95
packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1 ...
Definition: imp_common.h:120
IMP Rectangle area information.
Definition: imp_common.h:160