Unexpected results from 960x540 YUV 422 NvBuffer and conversion failure

Hi, in our system we ingest various video inputs via hardware V4L2 inputs and have them written into DMA buffers we allocate prior to ingest beginning (We have methods for JetPack 4 and 5). These DMA buffers then have their frames scaled, their colour spaces converted to YUV420 during the NvBufferTransform or NvTransform calls. Things get shuffled around a bit more, and eventually the video frames are rendered on the screen directly from DMA with EGL.

The problem I’m facing is when the resolutions we’re ingesting are between 856x480 to 960x540 (that we’ve tried to far) where there appears to be a buffer pitch mismatch and the frame looks fragmented and incorrect. Other resolutions of 1920x1080, 1280x720, 640x360, and a few other lower ones all work and display fine (again all the input colourspaces are YUV 422). The only difference I can see is when inspecting the NvBufferParams (or the equivalent on JP5) and seeing how the pitch is over 2x the width whereas all other resolutions are 2x exactly. For example for 640x360 the pitch is 1280, and for 1920 it’s 3840, however for 960 it’s 2048 instead of the expected 1920. This is the only lead I have as to why the frame wouldn’t be correct for these specific resolutions.

We’re also seeing issues with NV12 at all resolutions however 1280x720 has a correct pitch of 1280 and the luminance looks correct but chrominance looks wrong.

Do you know any reason why the 960 pitch acts like this? Is there anything we can do to try adjust the pitches back?

Bumping this with an update, I’m seeing the same behaviour in the jetson_multimedia_api 12_camera_v4l2_cuda sample with the launch string of ./camera_v4l2_cuda -d /dev/video0 -s 960x540 -f YUYV -v
Occurs on Jetpack 4.6 and Jetpack 5.1.2