public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Add Mars-Semi MR97310A format
@ 2009-01-15  2:59 Kyle Guinn
  2009-01-15 11:49 ` Jean-Francois Moine
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Guinn @ 2009-01-15  2:59 UTC (permalink / raw)
  To: moinejf; +Cc: linux-media, mchehab

# HG changeset patch
# User Kyle Guinn <elyk03@gmail.com>
# Date 1231822560 21600
# Node ID 1bf7a4403e5f1cd10f12a69a9d9239f1bf4a58b6
# Parent  b09b5128742f75bb0ce4375b23feac6c5f560aec
Add Mars-Semi MR97310A format

From: Kyle Guinn <elyk03@gmail.com>

Add a pixel format for the Mars-Semi MR97310A webcam controller.

The MR97310A is a dual-mode webcam controller that provides compressed BGGR
Bayer frames.  The decompression algorithm for still images is the same as for
video, and is currently implemented in libgphoto2.

Priority: normal

Signed-off-by: Kyle Guinn <elyk03@gmail.com>

diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -344,6 +344,7 @@
 #define V4L2_PIX_FMT_SPCA508  v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */
 #define V4L2_PIX_FMT_SPCA561  v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
 #define V4L2_PIX_FMT_PAC207   v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
+#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
 #define V4L2_PIX_FMT_PJPG     v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
 #define V4L2_PIX_FMT_YVYU    v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16  YVU 4:2:2     */
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Add Mars-Semi MR97310A format
  2009-01-15  2:59 [PATCH 1/2] Add Mars-Semi MR97310A format Kyle Guinn
@ 2009-01-15 11:49 ` Jean-Francois Moine
  2009-01-16  1:20   ` Kyle Guinn
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Francois Moine @ 2009-01-15 11:49 UTC (permalink / raw)
  To: Kyle Guinn; +Cc: linux-media

On Wed, 14 Jan 2009 20:59:34 -0600
Kyle Guinn <elyk03@gmail.com> wrote:

> Add a pixel format for the Mars-Semi MR97310A webcam controller.
> 
> The MR97310A is a dual-mode webcam controller that provides
> compressed BGGR Bayer frames.  The decompression algorithm for still
> images is the same as for video, and is currently implemented in
> libgphoto2.

Hi Kyle,

What is the difference of this pixel format from the other Bayer ones?

Also, did you ask Hans de Goede to add the decoding to the v4l library?

Regards.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Add Mars-Semi MR97310A format
  2009-01-15 11:49 ` Jean-Francois Moine
@ 2009-01-16  1:20   ` Kyle Guinn
  0 siblings, 0 replies; 3+ messages in thread
From: Kyle Guinn @ 2009-01-16  1:20 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: linux-media

On Thursday 15 January 2009 05:49:46 Jean-Francois Moine wrote:
> On Wed, 14 Jan 2009 20:59:34 -0600
> Kyle Guinn <elyk03@gmail.com> wrote:
> > Add a pixel format for the Mars-Semi MR97310A webcam controller.
> >
> > The MR97310A is a dual-mode webcam controller that provides
> > compressed BGGR Bayer frames.  The decompression algorithm for still
> > images is the same as for video, and is currently implemented in
> > libgphoto2.
>
> Hi Kyle,
>
> What is the difference of this pixel format from the other Bayer ones?
>

This is a standard BGGR Bayer format which is compressed using a 
vendor-specific compression algorithm, much like V4L2_PIX_FMT_PAC207.  I 
don't believe the compression algorithm matches any of the other pixel 
formats.

The first two pixels in the first two rows are stored as raw 8-bit values (the 
top-left BGGR square), but the rest is Huffman compressed.  Take a look at 
precalc_table() and mars_decompress() in libgphoto2/camlibs/mars/mars.c for 
all of the details.  If you recognize this as an existing pixel format, 
please let me know.

> Also, did you ask Hans de Goede to add the decoding to the v4l library?
>

That is next on my TODO list.  I have a patch ready to send, but I first want 
to make sure there are no problems with adding this pixel format.

Regards,
-Kyle

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-16  1:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15  2:59 [PATCH 1/2] Add Mars-Semi MR97310A format Kyle Guinn
2009-01-15 11:49 ` Jean-Francois Moine
2009-01-16  1:20   ` Kyle Guinn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox