From patchwork Fri Aug 25 11:22:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 4836 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp328167jao; Fri, 25 Aug 2017 04:31:16 -0700 (PDT) X-Received: by 10.28.179.85 with SMTP id c82mr1300299wmf.189.1503660676851; Fri, 25 Aug 2017 04:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503660676; cv=none; d=google.com; s=arc-20160816; b=KNByMPcgikoFS4l7E3zFXns4ZIc3gHA/JMsqadNYLpNwATXjKncfoGznSfZ43OmsFW fKd6JlNjPo/3LfZDBMTXAQukxqzN1RZHC16IM1aQtMSzObHL2kTyIUTy4Dsk9zbgv9CB MsaWUyRytmGoErcBkI98LwKG7GPdqN+K6j1jFdvyvy+aIT2wVsqZWPcSCPWl3Xfyesfa vVOKovMrYa3grV9sA0I4f2w0og/4hkbu1yUpHjC2jgeWW1CNQz7907mKbC8q6SGdxwmO ept9b4u1riDQN4mNOhrJ8I80wiro95TYe4HDGMwvxQhqszeRvbAOdk8M9v23BMe5tlmy nvxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=OBvDydqWTjoR7De+VJ7S9RHE93QwMqOM+QHwOcAXIvk=; b=C4ORsP3NlAe0iViY/EJVO4LsM06GgwkNPTOSZIFbnPnv853riAajsPAr3L7v/SJkbE CRPKRig9L4qJDYzIEcGNHWeVOUsF+q+AXTHmYoMWtYQjl4SWrVNPhPql60HONLQRPNzV I1tCHh/+s8SbuZRP5yiA6bdNwS6UTUAsASY5ZdsDSG78KuBH4FvB8qimvfhsHFLkoUtf Hjpm07HbPSvTlQZXoOScy9xIipiSomlzSDcP13vVM85MSB/+1ZBY8V02Xw4sw0n7o2zX 8+quW0Oe9JFpPuAzJvRaqjwNNiAlj7LrzqqtuTPt6Zy8IxLewT6qqatLfD1/3BSJMx6g ekdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VlCE7/Q4; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 92si5174035wrq.350.2017.08.25.04.31.16; Fri, 25 Aug 2017 04:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VlCE7/Q4; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A57AE689B80; Fri, 25 Aug 2017 14:30:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02001689B24 for ; Fri, 25 Aug 2017 14:30:57 +0300 (EEST) Received: by mail-wr0-f171.google.com with SMTP id p8so6539421wrf.2 for ; Fri, 25 Aug 2017 04:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fNbvVdmxYdanApETpXh1yHVslLYNvvNrHSyUCCQAN1U=; b=VlCE7/Q4ShJhzHpx/qtI35vbrEDV5e4eV6IkbvEz8ys5p9W+LrItw5ap+/bs3xisbv dG4G3sec2XuMxyZPs0SGXZygjApVBnhh9qDjzGPyN1+ENSsh3mi2KAOEg2WI1l7L4/Gz rERPcd8YJcQp3vLiKtVb401q4jZ/fIkruvUHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fNbvVdmxYdanApETpXh1yHVslLYNvvNrHSyUCCQAN1U=; b=EDRIZcrZG5ZwHwEYqja7bWyjvIxByoZk9UiXoVyXVOySgKSqbbH2l+AEqtWw9Guknm PQyDjDFgUBOeB1g+gLgrssZGAfv9/qrjX6mXKTx8PGOexw56y61qLkUl6tPGhNGJ/vIF 3ovx7k/PKWy5VhbMUby/Wl9VD7bXSGHTegS2i/OssjIGJCI5QhVFVq6ixg7JGANqyJYs qhpqQDDruNrsIphhtnDR7ihwsh9/jwijM8rOQCS4oT+KTBqkhqPpZq1GyxQtAv7MtgKk OXJwhSYvLcoqJjch03HhQZzlnahyUmPwvmm19aV5FrJxgb9vvk4AZtKUoTl6fG7S1Saq 1BGQ== X-Gm-Message-State: AHYfb5hKxvVhvqMiGJm7PxYBZ2kUOn5PIvjfa+Z/oXhN6uDX715EsNvW MGzB3gliL/0iucwL X-Received: by 10.223.165.138 with SMTP id g10mr5692276wrc.167.1503660177297; Fri, 25 Aug 2017 04:22:57 -0700 (PDT) Received: from igloo.80.58.61.254 (1.red-88-10-92.dynamicip.rima-tde.net. [88.10.92.1]) by smtp.gmail.com with ESMTPSA id 134sm1107567wmw.24.2017.08.25.04.22.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Aug 2017 04:22:56 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, sw@jkqxz.net, ffmpeg-devel@ffmpeg.org, michael@niedermayer.cc Date: Fri, 25 Aug 2017 13:22:46 +0200 Message-Id: <1503660168-24757-3-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503660168-24757-1-git-send-email-jorge.ramirez-ortiz@linaro.org> References: <1503660168-24757-1-git-send-email-jorge.ramirez-ortiz@linaro.org> Subject: [FFmpeg-devel] [PATCHv6 2/4] libavcodec: v4l2: add pack_flags to the conversion tables X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: nicolas.dechesne@linaro.org, stanimir.varbanov@linaro.org, aballier@gentoo.org MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Alexis Ballier Extend the mapping function to use the v4l2 conversion tables. Reviewed-by: Jorge Ramirez Tested-by: Jorge Ramirez --- libavcodec/v4l2_fmt.c | 63 ++++++++++++++++++++++++++------------------------- libavcodec/v4l2_fmt.h | 17 +++++++++----- libavdevice/v4l2.c | 2 +- libavdevice/v4l2enc.c | 2 +- 4 files changed, 45 insertions(+), 39 deletions(-) diff --git a/libavcodec/v4l2_fmt.c b/libavcodec/v4l2_fmt.c index 322f595..855cc64 100644 --- a/libavcodec/v4l2_fmt.c +++ b/libavcodec/v4l2_fmt.c @@ -19,49 +19,49 @@ #include "v4l2_fmt.h" const struct v4l_fmt_map avpriv_v4l_fmt_conversion_table[] = { - //ff_fmt codec_id v4l2_fmt - { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 }, - { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU420 }, - { AV_PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P }, - { AV_PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV }, - { AV_PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY }, - { AV_PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P }, - { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 }, - { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU410 }, - { AV_PIX_FMT_RGB555LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 }, - { AV_PIX_FMT_RGB555BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555X }, - { AV_PIX_FMT_RGB565LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 }, - { AV_PIX_FMT_RGB565BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565X }, - { AV_PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 }, - { AV_PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 }, - { AV_PIX_FMT_BGR0, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 }, - { AV_PIX_FMT_0RGB, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB32 }, - { AV_PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY }, + /* ff_fmt codec_id v4l2_fmt pack_flags */ + { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU420 , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU410 , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_RGB555LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_RGB555BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555X , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_RGB565LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_RGB565BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565X , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_BGR0, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_0RGB, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB32 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, #ifdef V4L2_PIX_FMT_Y16 - { AV_PIX_FMT_GRAY16LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_Y16 }, + { AV_PIX_FMT_GRAY16LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_Y16 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, #endif - { AV_PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 }, - { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG }, - { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG }, + { AV_PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG , FF_V4L_PACK_AVPACKET }, + { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG , FF_V4L_PACK_AVPACKET }, #ifdef V4L2_PIX_FMT_H264 - { AV_PIX_FMT_NONE, AV_CODEC_ID_H264, V4L2_PIX_FMT_H264 }, + { AV_PIX_FMT_NONE, AV_CODEC_ID_H264, V4L2_PIX_FMT_H264 , FF_V4L_PACK_AVPACKET }, #endif #ifdef V4L2_PIX_FMT_MPEG4 - { AV_PIX_FMT_NONE, AV_CODEC_ID_MPEG4, V4L2_PIX_FMT_MPEG4 }, + { AV_PIX_FMT_NONE, AV_CODEC_ID_MPEG4, V4L2_PIX_FMT_MPEG4 , FF_V4L_PACK_AVPACKET }, #endif #ifdef V4L2_PIX_FMT_CPIA1 - { AV_PIX_FMT_NONE, AV_CODEC_ID_CPIA, V4L2_PIX_FMT_CPIA1 }, + { AV_PIX_FMT_NONE, AV_CODEC_ID_CPIA, V4L2_PIX_FMT_CPIA1 , FF_V4L_PACK_AVPACKET }, #endif #ifdef V4L2_PIX_FMT_SRGGB8 - { AV_PIX_FMT_BAYER_BGGR8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SBGGR8 }, - { AV_PIX_FMT_BAYER_GBRG8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SGBRG8 }, - { AV_PIX_FMT_BAYER_GRBG8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SGRBG8 }, - { AV_PIX_FMT_BAYER_RGGB8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SRGGB8 }, + { AV_PIX_FMT_BAYER_BGGR8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SBGGR8 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_BAYER_GBRG8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SGBRG8 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_BAYER_GRBG8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SGRBG8 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, + { AV_PIX_FMT_BAYER_RGGB8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_SRGGB8 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, #endif { AV_PIX_FMT_NONE, AV_CODEC_ID_NONE, 0 }, }; -uint32_t avpriv_v4l_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id) +uint32_t avpriv_v4l_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id, int pack_flags) { int i; @@ -69,7 +69,8 @@ uint32_t avpriv_v4l_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_ if ((codec_id == AV_CODEC_ID_NONE || avpriv_v4l_fmt_conversion_table[i].codec_id == codec_id) && (pix_fmt == AV_PIX_FMT_NONE || - avpriv_v4l_fmt_conversion_table[i].ff_fmt == pix_fmt)) { + avpriv_v4l_fmt_conversion_table[i].ff_fmt == pix_fmt) && + (avpriv_v4l_fmt_conversion_table[i].pack_flags & pack_flags)) { return avpriv_v4l_fmt_conversion_table[i].v4l2_fmt; } } diff --git a/libavcodec/v4l2_fmt.h b/libavcodec/v4l2_fmt.h index 91dc502..7b4eeb1 100644 --- a/libavcodec/v4l2_fmt.h +++ b/libavcodec/v4l2_fmt.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_V4L2_COMMON_H -#define AVCODEC_V4L2_COMMON_H +#ifndef AVCODEC_V4L2_FMT_H +#define AVCODEC_V4L2_FMT_H #undef __STRICT_ANSI__ //workaround due to broken kernel headers #include "config.h" @@ -33,8 +33,8 @@ #include "libavutil/imgutils.h" #include "libavutil/log.h" #include "libavutil/opt.h" -#include "avdevice.h" -#include "timefilter.h" +#include "libavdevice/avdevice.h" +#include "libavdevice/timefilter.h" #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "libavutil/time.h" @@ -42,16 +42,21 @@ #include "libavutil/pixfmt.h" #include "libavcodec/avcodec.h" +/* for v4l_fmt_map.pack_flags */ +#define FF_V4L_PACK_AVPACKET (1 << 0) +#define FF_V4L_PACK_AVFRAME (1 << 1) + struct v4l_fmt_map { enum AVPixelFormat ff_fmt; enum AVCodecID codec_id; uint32_t v4l2_fmt; + int pack_flags; }; extern const struct v4l_fmt_map avpriv_v4l_fmt_conversion_table[]; -uint32_t avpriv_v4l_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id); +uint32_t avpriv_v4l_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id, int pack_flags); enum AVPixelFormat avpriv_v4l_fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id); enum AVCodecID avpriv_v4l_fmt_v4l2codec(uint32_t v4l2_fmt); -#endif /* AVCODEC_V4L2_COMMON_H */ +#endif /* AVCODEC_V4L2_FMT_H */ diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 1585800..8663bb2 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -781,7 +781,7 @@ static int device_try_init(AVFormatContext *ctx, { int ret, i; - *desired_format = avpriv_v4l_fmt_ff2v4l(pix_fmt, ctx->video_codec_id); + *desired_format = avpriv_v4l_fmt_ff2v4l(pix_fmt, ctx->video_codec_id, FF_V4L_PACK_AVPACKET); if (*desired_format) { ret = device_init(ctx, width, height, *desired_format); diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c index 24ca32b..c84650a 100644 --- a/libavdevice/v4l2enc.c +++ b/libavdevice/v4l2enc.c @@ -64,7 +64,7 @@ static av_cold int write_header(AVFormatContext *s1) par = s1->streams[0]->codecpar; - v4l2_pixfmt = avpriv_v4l_fmt_ff2v4l(par->format, AV_CODEC_ID_RAWVIDEO); + v4l2_pixfmt = avpriv_v4l_fmt_ff2v4l(par->format, AV_CODEC_ID_RAWVIDEO, FF_V4L_PACK_AVPACKET); if (!v4l2_pixfmt) { // XXX: try to force them one by one? av_log(s1, AV_LOG_ERROR, "Unknown V4L2 pixel format equivalent for %s\n", av_get_pix_fmt_name(par->format));