From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mailout2.w1.samsung.com ([210.118.77.12]:63108 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753490Ab1EYLtw (ORCPT ); Wed, 25 May 2011 07:49:52 -0400 Received: from eu_spt1 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0LLR00G2Z27377@mailout2.w1.samsung.com> for linux-media@vger.kernel.org; Wed, 25 May 2011 12:49:51 +0100 (BST) Received: from linux.samsung.com ([106.116.38.10]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LLR00CWF271JJ@spt1.w1.samsung.com> for linux-media@vger.kernel.org; Wed, 25 May 2011 12:49:50 +0100 (BST) Date: Wed, 25 May 2011 13:49:49 +0200 From: Sylwester Nawrocki Subject: Re: v4l2_mbus_framefmt and v4l2_pix_format In-reply-to: To: Guennadi Liakhovetski Cc: Scott Jiang , laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl, linux-media@vger.kernel.org Message-id: <4DDCECDD.2030304@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: List-ID: Sender: Hi Guennadi, On 05/25/2011 12:11 PM, Guennadi Liakhovetski wrote: > Hi Scott > > On Wed, 25 May 2011, Scott Jiang wrote: > >> Hi Hans and Laurent, >> >> I got fmt info from a video data source subdev, I thought there should >> be a helper function to convert these two format enums. >> However, v4l2_fill_pix_format didn't do this, why? Should I do this in >> bridge driver one by one? > > Because various camera hosts (bridges) can produce different pixel formats > in memory from the same mediabus code. However, there is a very common way > to handle such video data in the bridge: store it in RAM in a "natural" > way. This mode is called in soc-camera the pass-through mode and there is > an API to handle this mode in drivers/media/video/soc_mediabus.c. If this Sorry about getting off the topic a bit. As some media bus formats require different conversion process in the bridge to obtain specific format in memory (fourcc) I was wondering whether it would be reasonable to indicate the "natural" fourccs for the applications when enumerating formats supported by the bridge/DMA with VIDIOC_ENUM_FMT? So applications are aware what are the "natural" formats and which require lossy conversion. And in this way could choose formats that yield better quality. Now there are following flags available for struct v4l2_fmtdesc::flags V4L2_FMT_FLAG_COMPRESSED V4L2_FMT_FLAG_EMULATED I thought about something like V4L2_FMT_HW_EMULATED or V4L2_FMT_FLAG_LOW_QUALITY. I not happy with those exact names but I hope that gives a basic idea what I am talking about. Possibly I am missing other ways to achieve the same. Regards, -- Sylwester Nawrocki Samsung Poland R&D Center