*** Please note that this reply is generated by LLM automatically ***
Based on the provided context, it appears that the VIC-based nvvidconv on Jetson supports various RAW-YUV input formats for scaling, including I420, UYVY, YUY2, YVYU, NV12, NV16, NV24, P010_10LE, GRAY8, BGRx, RGBA, and Y42B. However, there is no explicit mention of YUV400 (grayscale) as a supported format.
GRAY8 is mentioned as a supported format, which is an 8-bit grayscale format. This might be the closest match to what you’re looking for. However, it’s essential to note that GRAY8 is not the same as YUV400, as YUV400 would typically imply a 4:0:0 chroma subsampling, whereas GRAY8 is a single-component format.
If you’re currently inputting YUV420 with zeroed U and V planes, it’s likely that the encoder is ignoring the chroma information and only using the luma (Y) plane. In this case, using GRAY8 as the input format might be a more efficient and straightforward approach.
As for the performance comparison, it’s difficult to provide a definitive answer without more information about your specific use case and hardware configuration. However, in general, using a native grayscale format like GRAY8 might be faster than using a YUV format with zeroed chroma planes, as it eliminates the need for the encoder to process and ignore the chroma information.
To confirm whether GRAY8 is a suitable replacement for your current YUV420 input, you can try modifying your pipeline to use GRAY8 as the input format and compare the performance with your current setup. You can use the following pipeline as a starting point:
gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)GRAY8, width=(int)1280, height=(int)720' ! nvvidconv ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)GRAY8' ! nvv4l2h264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location=test.mp4 -e
Keep in mind that this is just a suggestion, and you should verify that the GRAY8 format is compatible with your specific use case and requirements.
*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***