From 97ce6b8422c702b24ab705449b6694e17e8624b8 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Tue, 25 Sep 2018 09:09:45 +0300 Subject: [PATCH] enabled OMX YUYV and RGB656 --- src/omx/encoder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/omx/encoder.c b/src/omx/encoder.c index 35175a4..326ef92 100644 --- a/src/omx/encoder.c +++ b/src/omx/encoder.c @@ -283,9 +283,11 @@ static int _omx_setup_input(struct omx_encoder_t *omx, struct device_t *dev) { switch (dev->run->format) { // https://www.fourcc.org/yuv.php - //case V4L2_PIX_FMT_YUYV: ??? // FIXME + // Also see comments inside OMX_IVCommon.h + case V4L2_PIX_FMT_YUYV: portdef.format.image.eColorFormat = OMX_COLOR_FormatYCbYCr; break; case V4L2_PIX_FMT_UYVY: portdef.format.image.eColorFormat = OMX_COLOR_FormatCbYCrY; break; - //case V4L2_PIX_FMT_RGB565: format = OMX_COLOR_Format16bitRGB565; break; // FIXME + case V4L2_PIX_FMT_RGB565: portdef.format.image.eColorFormat = OMX_COLOR_Format16bitRGB565; break; + // TODO: Check RGB565 + OMX. I don't have any USB devices which supports it. default: assert(0 && "Unsupported input format for OMX JPEG compressor"); }