We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
airockchip/librga#93
mpp解码中的内存使用内部分配模式:
mpp_buffer_group_get_internal(&m_buffer_group, MPP_BUFFER_TYPE_DRM);
解码后,通过 mpp_buffer_get_fd(mpp_frame_get_buffer(frame))拿到fd 拿到fd之后,使用importbuffer_fd可以转换成功,1920x1080 这个耗时大概5ms
mpp_buffer_get_fd(mpp_frame_get_buffer(frame))
fd
importbuffer_fd
void rga_convert_with_fd(int src_fd, int src_size, int dst_fd, int dst_size, int width, int height) { rga_buffer_t src = {}; rga_buffer_t dst = {}; im_rect src_rect = {}; im_rect dst_rect = {}; rga_buffer_handle_t src_handle, dst_handle; src_handle = importbuffer_fd(src_fd, src_size); dst_handle = importbuffer_fd(dst_fd, dst_size); if (src_handle == 0 || dst_handle == 0) { RUN_LOG_ERR("import drm fd error!"); return; } src = wrapbuffer_handle(src_handle, width, height, RK_FORMAT_YCbCr_420_SP); dst = wrapbuffer_handle(dst_handle, width, height, RK_FORMAT_BGRA_8888); int ret = imcheck(src, dst, src_rect, dst_rect); if (IM_STATUS_NOERROR != ret) { RUN_LOG_ERR("%d, check error! %s", __LINE__, imStrError((IM_STATUS)ret)); } IM_STATUS status = imcvtcolor(src, dst, src.format, dst.format); if (status != IM_STATUS_SUCCESS) { RUN_LOG_ERR("convert error %s", imStrError(status)); } }
我想尝试一下importbuffer_physicaladdr看看耗时多少,我要怎么样才能拿到mpp解码后那一帧数据的物理地址?我尝试过drmPrimeFDToHandle+drm_buf_get_phy,获取出来的地址是0
importbuffer_physicaladdr
drmPrimeFDToHandle
drm_buf_get_phy
The text was updated successfully, but these errors were encountered:
mpp 里不使用物理地址,因为没有可移植性,最多是使用映射后的 iova 地址 现在一般的非 cma 的 buffer 也是使用散列表的方式组织的,无法获取到某一个物理地址
Sorry, something went wrong.
No branches or pull requests
airockchip/librga#93
mpp解码中的内存使用内部分配模式:
mpp_buffer_group_get_internal(&m_buffer_group, MPP_BUFFER_TYPE_DRM);
解码后,通过
mpp_buffer_get_fd(mpp_frame_get_buffer(frame))
拿到fd
拿到fd之后,使用
importbuffer_fd
可以转换成功,1920x1080 这个耗时大概5ms我想尝试一下
importbuffer_physicaladdr
看看耗时多少,我要怎么样才能拿到mpp解码后那一帧数据的物理地址?我尝试过drmPrimeFDToHandle
+drm_buf_get_phy
,获取出来的地址是0The text was updated successfully, but these errors were encountered: