nvJPEG, how to encode NV12

NV12 is an interleaved format (for the UV plane). nvjpegEncodeYUV requires planar data. See here. Convert your interleaved format to a supported planar format with separate Y,U, and V planes. This is a matter of copying/rearranging data. No I don’t have suggestions for APIs to convert NV12 to a planar format. They may exist, I just don’t know about them offhand. If it were me, I would just write a CUDA kernel to do it.