environment: jetson orin NX ,Jetpack 35.6
when I run NvBufSurfTransform,
static bool
nvBufSurfaceCropWithBufSurface(NvBufSurface *srcNvBufSurf, NvBufSurface *dstNvBufSurf, uint32_t startX,
uint32_t startY,
uint32_t width, uint32_t height,
NvBufSurfTransformConfigParams &transformConfigParams) {
if (NvBufSurfTransformSetSessionParams(&transformConfigParams) != NvBufSurfTransformError_Success) {
spdlog::error(
"NvBufSurfTransformSetSessionParams failed with error in nvBufSurfaceCropWithBufSurface\n");
}
NvBufSurfTransformParams cropTransParams;
memset(&cropTransParams, 0, sizeof(cropTransParams));
cropTransParams.transform_flag = NVBUFSURF_TRANSFORM_CROP_SRC | NVBUFSURF_TRANSFORM_CROP_DST;
cropTransParams.transform_filter = NvBufSurfTransformInter_Algo3;
NvBufSurfTransformRect srcRect = {startY,startX, width, height};
NvBufSurfTransformRect destRect = {0, 0, dstNvBufSurf->surfaceList[0].width,
dstNvBufSurf->surfaceList[0].height};
// Set the transform parameters
cropTransParams.src_rect = &srcRect;
cropTransParams.dst_rect = &destRect;
if (NvBufSurfTransform(srcNvBufSurf, dstNvBufSurf, &cropTransParams)) {
spdlog::error("Failed to convert the crop buffer in nvBufSurfaceCropWithBufSurface, {}, {}\n", srcNvBufSurf->surfaceList[0].bufferDesc, dstNvBufSurf->surfaceList[0].bufferDesc);
return false;
}
return true;
}
NVMAP_IOC_GET_FD failed: Bad address
NVMAP_IOC_GET_FD failed: Bad address
NVMAP_IOC_GET_FD failed: Bad address
NvRmStream: Channel submission failed (err=196623)
NvRmStream: Flush failed (err=196623)
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4594: => NvVicCompose Failed
[2025-01-23 06:11:29.597] [error] Failed to convert the crop buffer in nvBufSurfaceCropWithBufSurface, 314, 562
NVMAP_IOC_GET_FD failed: Bad address
PosixMemMap:74 FD from Handle failed : Bad address
NvRmStream: Buffer mapping failed (err=196611)
Couldn't create nvvic Session: Cannot allocate memory