NVMedia Warnings: Wrong Pitch

Hey there,

On AGX + Jetpack 4.4 I get the following messages when using VPI:

[WARN ] 2021-01-26 01:01:45 src/private/mem/img/Mapping_CUDAPitch_NvMediaImage.cpp:149 (cudaEGLStreamProducerReturnFrame:cudaErrorUnknown)
[WARN ] 2021-01-26 01:01:45 src/private/mem/img/Mapping_CUDAPitch_NvMediaImage.cpp:149 (cudaEGLStreamProducerReturnFrame:cudaErrorUnknown)
NVMEDIA_ARRAY:   53,  Version 2.1
NVMEDIA_VPI :  156,  Version 2.3
sValidateSurfacePitch: Pitch must be greater than or equal to 2048 and must be a multiple of 256
NvMediaEglValidateLocalTVMROutputSurface: Pitch validation failed
NvMediaEglFillLocalImageSurface: NvMediaEglValidateLocalTVMROutputSurface failed
NvMediaEglStreamConsumerAcquireCommon: Acquire: EGLExports.stream2.consumer.publicStateGet failed (4)
[NvMediaEglStreamConsumerAcquireImage:967] Consumer acquire failed: 7sValidateSurfacePitch: Pitch must be greater than or equal to 2048 and must be a multiple of 256
NvMediaEglValidateLocalTVMROutputSurface: Pitch validation failed
NvMediaEglFillLocalImageSurface: NvMediaEglValidateLocalTVMROutputSurface failed
NvMediaEglStreamConsumerAcquireCommon: Acquire: EGLExports.stream2.consumer.publicStateGet failed (4)
[NvMediaEglStreamConsumerAcquireImage:967] Consumer acquire failed: 7

I switched the input image resolution from 1280x800 to 1920x1200.

1280%256=0, but 1920%256=128, so that makes sense. However I have no idea where the error is from, what the effects are (program crashes undeterministically) or how to fix this (padding would be… very naive).

Is there any documentation on this? The VPI benchmarks also use 1920 as their resolution, so I think there should not be a fundamental problem.

Hi,

Do you meet this error when using the VPI library?
If yes, could you share a source with us to reproduce this?

This error comes from the EGL driver when mapping memory to be GPU accessible.

Thanks.

Yes I did, however I am not able to reproduce the issue at the moment. I will update this thread once I know more. I was mostly wondering if there is any documentation about that behavior. I read your response as: This is an internal error and nothing that a library consumer should have to worry about.

I did take some nasty pointer arithmetic shortcuts and my code could have been plain wrong, the crash might have been due to that as well.

Hi,

This warning occurs sometimes, but we don’t get any feedback about a real issue from the warning.
Please share the source with us if you found one.

Thanks.