mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-10 09:33:43 +00:00
Add Support for YUV420 and YVU variants. (#276)
* Add Support fo YUV420 and 410 and YVU variants. * Add new formats to the help messaging * Remove YUV410 supprt since M2M encoder on Pi cannot convert it * Cleanups requested by @mdevaev * Change to use u8 per @mdevaev
This commit is contained in:
@@ -82,6 +82,8 @@ bool us_frame_compare(const us_frame_s *a, const us_frame_s *b) {
|
||||
uint us_frame_get_padding(const us_frame_s *frame) {
|
||||
uint bytes_per_pixel = 0;
|
||||
switch (frame->format) {
|
||||
case V4L2_PIX_FMT_YVU420:
|
||||
case V4L2_PIX_FMT_YUV420: bytes_per_pixel = 1; break;
|
||||
case V4L2_PIX_FMT_YUYV:
|
||||
case V4L2_PIX_FMT_YVYU:
|
||||
case V4L2_PIX_FMT_UYVY:
|
||||
|
||||
Reference in New Issue
Block a user