Skip to content

Commit

Permalink
#43 debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tomskikh committed Jan 12, 2023
1 parent 102f511 commit 3d4fd3a
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions libs/opencv/savant/src/savant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,31 @@ namespace cv {
auto * nvsurface = (NvBufSurface *)(map_info.data);
gst_buffer_unmap(buffer, &map_info);
const NvBufSurfaceParams &surface = nvsurface->surfaceList[batch_id];
std::cout << "nvsurface->memType :" << nvsurface->memType << std::endl;
std::cout << "surface.height :" << surface.height << std::endl;
std::cout << "surface.width :" << surface.width << std::endl;
std::cout << "surface.bufferDesc :" << surface.bufferDesc << std::endl;
std::cout << "surface.dataPtr :" << surface.dataPtr << std::endl;
std::cout << "surface.dataSize :" << surface.dataSize << std::endl;
std::cout << "nvsurface->memType : " << nvsurface->memType << std::endl;
std::cout << "surface.height : " << surface.height << std::endl;
std::cout << "surface.width : " << surface.width << std::endl;
std::cout << "surface.bufferDesc : " << surface.bufferDesc << std::endl;
std::cout << "surface.dataPtr : " << surface.dataPtr << std::endl;
std::cout << "surface.dataSize : " << surface.dataSize << std::endl;
std::cout << "surface.mappedAddr.addr : " << surface.mappedAddr.addr << std::endl;
std::cout << "surface.mappedAddr.eglImage: " << surface.mappedAddr.eglImage << std::endl;
std::cout << std::endl;

#ifdef __aarch64__
int ret = NvBufSurfaceMapEglImage(nvsurface, batch_id);
std::cout << "ret=" << ret << std::endl;
#endif // __aarch64__

std::cout << "nvsurface->memType : " << nvsurface->memType << std::endl;
std::cout << "surface.height : " << surface.height << std::endl;
std::cout << "surface.width : " << surface.width << std::endl;
std::cout << "surface.bufferDesc : " << surface.bufferDesc << std::endl;
std::cout << "surface.dataPtr : " << surface.dataPtr << std::endl;
std::cout << "surface.dataSize : " << surface.dataSize << std::endl;
std::cout << "surface.mappedAddr.addr : " << surface.mappedAddr.addr << std::endl;
std::cout << "surface.mappedAddr.eglImage: " << surface.mappedAddr.eglImage << std::endl;
std::cout << std::endl;

cv::cuda::GpuMat gpuMat(surface.height, surface.width, CV_8UC4, (void *)surface.dataPtr);
return gpuMat;
}
Expand Down

0 comments on commit 3d4fd3a

Please sign in to comment.