Yuv422 encode h264 error

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
[*] other

Target Operating System
Linux
[*] QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
[*] other

SDK Manager Version
1.8.3.10426
[*] other

Host Machine Version
native Ubuntu 18.04
[*] other

Hello
I’m trying to use yuv422(yuyv422) images for h264 encoding,but I’m getting the following error when calling NvMediaIEPCreate().

I tried several different surfFormatAttrs implementations, all of which returned the same error
NVM_SURF_FMT_SET_ATTR_YUV(surfFormatAttrs,YUYV,422,PACKED,UINT,8,PL);
NVM_SURF_FMT_SET_ATTR_YUV(surfFormatAttrs,YUV,422,PLANAR,UINT,8,PL)

nvmedia: ERROR: main: NvMediaIEPCreate failed
nvmedia: ERROR: main: NvMediaIEPImageUnRegister failed

I can’t find any documents about the right combinations. Please help me understand the error.

Thank you!

Dear @Somi,
Could you please confirm if the platform is DRIVE AGX?