Nvenc encoder cannot encode U/V channels on IYUV 420 input

I am working on a project where we have been encoding live camera streams outputting a YUV420 video stream with the Cuda encoder (nvcuvid). This has been running fine for some years. Recently, we have upgraded to nvenc to replace the discontinued nvcuvid technology, and the result is that no matter what configuration settings I have tried, nvenc always outputs the image without the U/V channels (the chroma information). The bufferFmt on the EncodeBuffer.stInputBfr is set to NV_ENC_BUFFER_FORMAT_IYUV_PL.

I have compared the output of nvcuvid and nvenc and the channel information is always missing, resulting in incorrect color space information for the stream.

I have searched the web to determine whether nvenc has issues encoding yuv420, but from the little I found on this subject, it seems that nvenc supports yuv420 input (as NV12 is).

My question to anyone who has experience with this, is my problem the input format (which previously worked with nvcuvid) or is there some configuration parameter/s I am missing in nvenc that result in this behavior?

Thanks in advance.

Just a correction to the description above. I meant “NVIDIA CUDA VIDEO ENCODER” (nvcuvenc) instead of nvcuvid, which is actually the decoder we are are using.