From patchwork Fri Aug 25 11:22:47 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: 4835 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp327827jao; Fri, 25 Aug 2017 04:30:39 -0700 (PDT) X-Received: by 10.28.215.142 with SMTP id o136mr1155937wmg.40.1503660639597; Fri, 25 Aug 2017 04:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503660639; cv=none; d=google.com; s=arc-20160816; b=OVZVButrBYqPiwVHALYWome82b381p++l2EDcPNQIYE7tA8zjAXqdVxdgcuBEr6CDf N61S/VSNA4fGn1IodBNg2ISbRpgXnEa1CMG500NkSjSnAIbuGSAUWe1dUIX2pS+csg8W M4ra2zcyt5GwAivm8rNj134x1Mwb+VxtFOEDUM044beOXGdBuG/yf+Q5E9IFhXLcAzk2 JvSWNETZN5e6mO2YLM3b6qzSa5Bzu1ptp/MGNtqUdcKkIhjswbgzEwAbzxgEwqbfwLJj X/mkQLVmBsVbqjPl3sDNExyPKG95M/LY8X8kHb2AkIwNLIE5qgwApSvPtHKFhdPhAaEV TbVg== 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=p1+g8WmxubP9MCUeF4oho7VDIjWbQAKPNrpi1y7o1s8=; b=VhBuqAWtiDvUyAN7BoMK7G3Eut4Sa8kFJrp7NWw+ZfYH9apZXtt5N2vb0I6mO2KHME F0/NBSR4PeYXz7TG6//7l0oeW96HnqYDfWUWeaE0PLvS/kKA3fNi3OYf1C3qgxc9WfH9 OT+KCZCsPm3Hl88OEMdFjdkyVFeBBUd5poQ1yy8alVF+nS2toZHIPPRhrXSofuAYTgPg ICjYzfBhHtjLPS7LR3m/Hjl+n8oYRla/kxMZRWoB49EYz8pOvK+CNRVEFNOrVX5X66HO At7Patoz96lZTsy2vXkNyJBKu7XwuZ294FtO7Jfhft8YK8ieAO75SVCPp/r2ukdSFWnY aknA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hT9EcntE; 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 i4si1190675wme.275.2017.08.25.04.30.39; Fri, 25 Aug 2017 04:30:39 -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=hT9EcntE; 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 6B03C689AC9; Fri, 25 Aug 2017 14:30:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0228F68972C for ; Fri, 25 Aug 2017 14:30:22 +0300 (EEST) Received: by mail-wr0-f169.google.com with SMTP id z91so6504555wrc.1 for ; Fri, 25 Aug 2017 04:30:30 -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=78+/MmjJMtujOxGPEAyN+GwWiNFU8KZa1xf5UqWu+6w=; b=hT9EcntEtNMo4xTHHlbk80V+julMEBfyMKjYVAJp/kdvnArftlZBNG15B42FQrDns4 0o8ywLLf1VHy1p8Sz0D6DIobjyHbRwTVfeefu0fv9Igg1F6YG4xV6wYLvCM1M1R9Fygc ggrHZ9YqO0+LkFYa2a9QVN6m1l/HuOPXUkQt0= 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=78+/MmjJMtujOxGPEAyN+GwWiNFU8KZa1xf5UqWu+6w=; b=e8+qMLy1Ay3YwsGmhY9oBQTY34Ki34o/ZulET/x5JTXofMcA/YnyA7jvuptpUQKtLT npTHMlKKLcC9MqrNnb27hppMMSsizySR+Ma7LmOxwgsNP/hXLKypi8PjAcUZ6sv7levB mLvksTkfkRcDlIBbVX3srBXxxXbwMywJXO4JDhhgxZgOoN7ciMo2OEERo/xyYHrfNspn YEDjYL/g/My8yBJjwCOYLZoxWfqzSH+gkkbZzBfY1R1zKCdH66ptpznt5TKbaHV00Dly 7DhCRVg/E91ZlrPx8bGso7x6Fy4rxT0R/umqgl/M9N1YQYc12s37wg3Rqs9uz2amjUfl fplQ== X-Gm-Message-State: AHYfb5garDO9pQI0q2UJkVFdaNTOKHDmrAuvWpBW9XyJWOb3L/TliYql 4Z2W9FJOaHz6X10o X-Received: by 10.223.141.212 with SMTP id o78mr7011130wrb.215.1503660179189; Fri, 25 Aug 2017 04:22:59 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Aug 2017 04:22:58 -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:47 +0200 Message-Id: <1503660168-24757-4-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 3/4] libavcodec: v4l2: add codec formats 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" In addition, enable the multi planar raw formats. Reviewed-by: Jorge Ramirez Tested-by: Jorge Ramirez --- libavcodec/v4l2_fmt.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/libavcodec/v4l2_fmt.c b/libavcodec/v4l2_fmt.c index 855cc64..2cda6b2 100644 --- a/libavcodec/v4l2_fmt.c +++ b/libavcodec/v4l2_fmt.c @@ -58,7 +58,43 @@ const struct v4l_fmt_map avpriv_v4l_fmt_conversion_table[] = { { 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 }, +#ifdef V4L2_PIX_FMT_NV12M + { AV_PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12M , FF_V4L_PACK_AVFRAME }, +#endif +#ifdef V4L2_PIX_FMT_NV21M + { AV_PIX_FMT_NV21, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV21M , FF_V4L_PACK_AVFRAME }, +#endif +#ifdef V4L2_PIX_FMT_YUV420M + { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420M , FF_V4L_PACK_AVFRAME }, +#endif +#ifdef V4L2_PIX_FMT_NV16M + { AV_PIX_FMT_NV16, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV16M , FF_V4L_PACK_AVFRAME }, +#endif +#ifdef V4L2_PIX_FMT_DV + { AV_PIX_FMT_NONE, AV_CODEC_ID_DVVIDEO, V4L2_PIX_FMT_DV , FF_V4L_PACK_AVPACKET }, +#endif +#ifdef V4L2_PIX_FMT_H263 + { AV_PIX_FMT_NONE, AV_CODEC_ID_H263, V4L2_PIX_FMT_H263 , FF_V4L_PACK_AVPACKET }, +#endif +#ifdef V4L2_PIX_FMT_MPEG1 + { AV_PIX_FMT_NONE, AV_CODEC_ID_MPEG1VIDEO, V4L2_PIX_FMT_MPEG1 , FF_V4L_PACK_AVPACKET }, +#endif +#ifdef V4L2_PIX_FMT_MPEG2 + { AV_PIX_FMT_NONE, AV_CODEC_ID_MPEG2VIDEO, V4L2_PIX_FMT_MPEG2 , FF_V4L_PACK_AVPACKET }, +#endif +#ifdef V4L2_PIX_FMT_VC1_ANNEX_G + { AV_PIX_FMT_NONE, AV_CODEC_ID_VC1, V4L2_PIX_FMT_VC1_ANNEX_G, FF_V4L_PACK_AVPACKET }, +#endif +#ifdef V4L2_PIX_FMT_VP8 + { AV_PIX_FMT_NONE, AV_CODEC_ID_VP8, V4L2_PIX_FMT_VP8 , FF_V4L_PACK_AVPACKET }, +#endif +#ifdef V4L2_PIX_FMT_HEVC + { AV_PIX_FMT_NONE, AV_CODEC_ID_HEVC, V4L2_PIX_FMT_HEVC , FF_V4L_PACK_AVPACKET}, +#endif +#ifdef V4L2_PIX_FMT_VP9 + { AV_PIX_FMT_NONE, AV_CODEC_ID_VP9, V4L2_PIX_FMT_VP9 , FF_V4L_PACK_AVPACKET }, +#endif + { AV_PIX_FMT_NONE, AV_CODEC_ID_NONE, 0 , FF_V4L_PACK_AVPACKET | FF_V4L_PACK_AVFRAME }, }; uint32_t avpriv_v4l_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id, int pack_flags)