Hardware encoder h264 in khadas vim3L


i have khadas vim3L board having ubuntu 20.04 os (linux 4.9.). I have webcam (Logitech C-920 pro) which gives mjpeg and YUYV-4-2-2. I want encode raw(YUYV4-2-2) from webcam.

there are demo of h264 hardware encoder
Hardware Encoding | Khadas Documentation

is this demo encode YUY420 (nv12 or nv21) only ?
if yes , are there any way to encode from webcam which has yuv422 output ?

Yes, the demo is only for YUV420 & RGB, for other formats you need to modify the source code.