Best way to perform RGB32 to NV12 for Nvenc

Hi,

I’m developing a system that utilizes HW H.264 encoding from RGB32 and so far I’ve had success with Intel Quick Sync. I’ve just began using the NVENC SDK and the first apparent question is how to perform RGB32 to NV12 conversion for the input of the H.264 encoder? The Intel iGPU performs both these operations in video memory which is very convenient, is there any way of doing this with NVENC or I should do it with a CPU based soulution (swscale, Intel IPP, …) and then pass the NV12 buffer to the encoder?

Also interested. It’s not only a conversion. As far as I understand the data must be 32 aligned.