|
发表于 2022-4-25 05:01:32
|
显示全部楼层
请问我想将摄像头获取的两帧数据做异或运算。执行improcess_t报错Device or resource busy,请问是什么情况?执行imstatus = imcopy(rga_pre,rga_out);也会有同样的报错。
以下是错误打印:
RgaBlit(1387) RGA_BLIT fail: Device or resource busy
RgaBlit(1388) RGA_BLIT fail: Device or resource busy
fd-vir-phy-hnd-format[10, (nil), (nil), (nil), 0]
rect[0, 0, 1920, 1080, 1920, 1080, 512, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[17, (nil), (nil), (nil), 0]
rect[0, 0, 1920, 1080, 1920, 1080, 512, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail
srect[x,y,w,h] = [0, 0, 0, 0] src[w,h,ws,hs] = [1920, 1080, 1920, 1080]
drect[x,y,w,h] = [0, 0, 0, 0] dst[w,h,ws,hs] = [1920, 1080, 1920, 1080]
usage[0x80000]
以下是代码:
cam_frm_idx = camera_source_get_frame(pcam);
printf("ncap:%u %d %d\n",Time_GetTickCount(),++ncap,cam_frm_idx);
if(cam_frm_idx_pre != -1)
{
if(outbuffer == NULL)
mpp_buffer_get(group,&outbuffer,pfmt->fmt.pix.width*pfmt->fmt.pix.height*3);
MppBuffer prebuffer = camera_frame_to_buf(pcam, cam_frm_idx_pre);
MppBuffer curbuffer = camera_frame_to_buf(pcam, cam_frm_idx);
int pre_fd = mpp_buffer_get_fd(prebuffer);
int cur_fd = mpp_buffer_get_fd(curbuffer);
int out_fd = mpp_buffer_get_fd(outbuffer);
rga_buffer_t rga_pre = wrapbuffer_fd(pre_fd, pfmt->fmt.pix.width,pfmt->fmt.pix.height, RK_FORMAT_RGB_888);
rga_buffer_t rga_cur = wrapbuffer_fd(cur_fd, pfmt->fmt.pix.width,pfmt->fmt.pix.height, RK_FORMAT_RGB_888);
rga_buffer_t rga_out = wrapbuffer_fd(out_fd, pfmt->fmt.pix.width,pfmt->fmt.pix.height, RK_FORMAT_RGB_888);
IM_STATUS imstatus;
{
im_opt_t opt;
int out_fence_fd;
im_rect srect;
im_rect drect;
im_rect prect;
empty_structure(NULL, NULL, NULL, &srect, &drect, &prect, &opt);
imstatus = improcess_t(rga_pre, rga_cur, rga_out, srect, drect, prect, -1, &out_fence_fd, &opt, IM_ALPHA_BLEND_XOR);
}
printf("imstatus xor:%u %d\n",Time_GetTickCount(),imstatus);
printf("push back:%d\n",cam_frm_idx_pre);
camera_source_put_frame(pcam, cam_frm_idx_pre);
} |
|