VPI error when I rescale a view

Hello,

I’m facing an issue when I try to rescale (vpiSubmitRescale) a view from a VPIImage (vpiImageCreateView), I receive a “fatal assertion error”. It does that with the CUDA backend of vpiSubmitRescale, but not with the CPU one.

Is it even possible to rescale a view? If no, how can I generate a new VPIImage that is a region of interest of a parent VPIImage.

thanks

Hi,

Could you share the complete error log with us?

Thanks.

Here is the code used (the images and the stream are already created):

int xroi = m_targetX - m_roiInputWidth / 2;
int yroi = m_targetY - m_roiInputHeight / 2;

VPIRectangleI w_roiRect;
w_roiRect.x = xroi;
w_roiRect.y = yroi;
w_roiRect.width = m_roiInputWidth;
w_roiRect.height = m_roiInputHeight;

CHECK_STATUS(vpiImageCreateView(m_inputNV12, &w_roiRect, VPI_BACKEND_CPU | VPI_BACKEND_CUDA, &m_imageNV12));
CHECK_STATUS(vpiSubmitRescale(m_stream, VPI_BACKEND_CUDA, m_imageNV12, m_outputNV12, VPI_INTERP_LINEAR, VPI_BORDER_CLAMP, 0));

CHECK_STATUS(vpiStreamSync(m_stream));

Here is what I got when I backtrace the error :
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140735802236928) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140735802236928) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140735802236928, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007fffedee2476 in __GI_raise (sig=sig@entry=6) at …/sysdeps/posix/raise.c:26
#4 0x00007fffedec87f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007fffef4c11fb in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#6 0x00007fffee9d491d in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#7 0x00007fffee958097 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#8 0x00007fffee943a53 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#9 0x00007fffee934318 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#10 0x00007fffee959654 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#11 0x00007fffee959885 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#12 0x00007fffeead539f in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#13 0x00007fffeea11528 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#14 0x00007fffee9fba54 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#15 0x00007fffee9f426a in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#16 0x00007fffeea0bb32 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#17 0x00007fffeea09e6a in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#18 0x00007fffef82ded4 in () at /opt/nvidia/vpi2/lib/x86_64-linux-gnu/libnvvpi.so.2
#19 0x00007fffedf34ac3 in start_thread (arg=) at ./nptl/pthread_create.c:442
#20 0x00007fffedfc6a40 in clone3 () at …/sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Hi,

We need to check this with our internal team.
Will get back to you soon.

Thanks.

Hello,

Do you have any news concerning this issue?
Thank you!

Hi,

Based on the document, the image created from the vpiImageCreateView() doesn’t own the data.
So if you want to rescale the image, please apply it to the original image and create the view corresponding.

https://docs.nvidia.com/vpi/group__VPI__Image.html#ga29f5be3a686dd856cf304b3ff661c035

Thanks.

ok, thank you. But do you have any feature in vpi library to crop an image by doing a hard copy of it?
What are my possibilities?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.