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,
167 static inline int calc_pic_size(
int width,
int height,
IMPPixelFormat imp_pixfmt)
169 int bpp1 = 0, bpp2 = 1,size;
171 #define BPP(FMT, A, B) case FMT: bpp1 = A;bpp2 = B;break
172 switch (imp_pixfmt) {
179 BPP(PIX_FMT_HSV, 4, 1);
184 size = width * height * bpp1 / bpp2;
189 static inline const char *fmt_to_string(
IMPPixelFormat imp_pixfmt)
191 static const char *nv12 =
"nv12";
192 static const char *yuyv422 =
"yuyv422";
194 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
时间
Definition: imp_common.h:74
解码器
Definition: imp_common.h:33
int y
纵坐标
Definition: imp_common.h:145
图像叠加
Definition: imp_common.h:35
H264视频协议类型
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
帧的虚拟地址
Definition: imp_common.h:64
uint32_t pixfmt
帧的图像格式
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
编解码协议类型
Definition: imp_common.h:82
IMPDeviceID
IMP 设备ID枚举定义.
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
下限
Definition: imp_common.h:75
IMP帧图像信息定义.
Definition: imp_common.h:54
算法
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
帧序号
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
左上角点坐标信息
Definition: imp_common.h:163
uint32_t width
帧宽
Definition: imp_common.h:58
int outputID
输出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
帧的时间戳
Definition: imp_common.h:66
as above, but U and V bytes are swapped
Definition: imp_common.h:103
uint32_t size
帧所占用空间大小
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图像协议类型
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
右下角点坐标信息
Definition: imp_common.h:164
IMP点坐标信息.
Definition: imp_common.h:143
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
横坐标
Definition: imp_common.h:144
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
视频源
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:137
IMP帧时间参数.
Definition: imp_common.h:73
IMPPixelFormat
IMP图像格式定义.
Definition: imp_common.h:90
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: imp_common.h:128
编码器
Definition: imp_common.h:32
IMPCell枚举定义.
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
组ID
Definition: imp_common.h:47
uint64_t plus
上限
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
帧高
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
设备ID
Definition: imp_common.h:46
int pool_idx
帧所在的Pool的ID
Definition: imp_common.h:56
uint32_t phyAddr
帧的物理地址
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 矩形区域信息.
Definition: imp_common.h:162