Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other
Target Operating System
Linux
QNX
other
Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other
SDK Manager Version
1.7.1.8928
other
Host Machine Version
native Ubuntu 18.04
other
Dear Nvidia,
I am reading the nvstream unicast sample code, and could not understand the below code, 1. first question is : why mapped_ptr only add pitch size? the pitch size seems even smaller than the loop length (inp_surfaceMap.width * nWidth), so there are overlap and will be re-written in the next loop.
2. second question is: does here the pitch*surfaceMap.height determinate the IPC shared buffer size? or is it the same with consumer side received buffer size?
Thanks!
CHECK_NVMEDIAERR(NvMediaImageLock(nvmimg_in[i],
NVMEDIA_IMAGE_ACCESS_WRITE,
&inp_surfaceMap));
// Fill predefined data
uint32_t nWidth = 4U;
// This code assumes YUV 422 PL images with cpu mapping pointers
mapped_ptr = (uint8_t*)inp_surfaceMap.surface[0].mapping;
for (uint32_t y = 0U; y < inp_surfaceMap.height; y++) {
for (uint32_t x = 0U; x < inp_surfaceMap.width * nWidth; x++) {
mapped_ptr[x] = (i + ((x % 32)+ (y % 32) )) % (1 << 8);
}
mapped_ptr += **inp_surfaceMap.surface[0].pitch**;
}
NvMediaImageUnlock(nvmimg_in[i]);