load_image_to_cbuf (AIPP)
功能说明
AIPP是AI ore中的输入图像预处理模块。
在AI核心中使用AIPP对SoC有以下好处:
- 如果输入图像数据格式为YUV420,与RGb888相比,可以减少一半的带宽消耗。
- 如果输入图像数据格式为YUV420,与RGb888相比,可以减少一半的L2/DDR内存占用。
接口原型
// 相同接口的不同原型区别在于源地址和目的地址的数据类型不同 void load_image_to_cbuf(__cbuf__ half *dst, uint16_t horSize, uint16_t verSize, uint16_t horStartP, uint16_t verStartP, uint16_t sHorRes, uint8_t topPadSize, uint8_t botPadSize, uint16_t lPadSize, uint16_t rPadSize, uint8_t sid); void load_image_to_cbuf(__cbuf__ int8_t *dst, uint16_t horSize, uint16_t verSize, uint16_t horStartP, uint16_t verStartP, uint16_t sHorRes, uint8_t topPadSize, uint8_t botPadSize, uint16_t lPadSize, uint16_t rPadSize, uint8_t sid);
参数说明
参数名 |
说明 |
取值范围 |
单位 |
|---|---|---|---|
dst |
在L1中的目标地址。 |
/ |
/ |
horSize |
加载图像的水平尺寸。 |
[0, 2^14-1] |
像素 |
verSize |
加载图像的竖直尺寸。 |
[0, 2^14-1] |
像素 |
horStartP |
源图像中的水平起始位置。 |
[0, 2^13-1] |
像素 |
verStartP |
源图像中的竖直起始位置。 |
[0, 2^13-1] |
像素 |
sHorRes |
源图像水平分辨率(对于YUV420/YUV422半平面格式和YUYV格式,必须是偶数)。 |
[0, 2^17-1] |
像素 |
topPadSize |
顶部padding尺寸。 |
[0, 32] |
像素 |
botPadSize |
底部padding尺寸。 |
[0, 32] |
像素 |
lPadSize |
左边padding尺寸。 |
[0, 32] |
像素 |
rPadSize |
右边padding尺寸。 |
[0, 32] |
像素 |
sid |
用于SMMU TLB预取提示的,一般设为0。 |
/ |
/ |
流水类型
PIPE_MTE2
父主题: 图像输入预处理搬入