Skip to contentSkip to conversation

PATCH: libv

PATCH Hans de Goede 2 participants 4 messages Jul 3, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi All,

This patch adds support to libv4l for the compressed bayer format emitted by pac207 based cams.

Regards,

Hans

This patch adds support to libv4l for the compressed bayer format emitted by pac207 based cams.

v4l2-apps/lib/libv4l/libv4lconvert/Makefile +1 -1
diff -r faf96cf9a97c v4l2-apps/lib/libv4l/libv4lconvert/Makefile
@@ -9,7 +9,7 @@
 LDFLAGS       = -shared
 
 CONVERT_LIB   = libv4lconvert.so
-CONVERT_OBJS  = libv4lconvert.o tinyjpeg.o sn9c10x.o \
+CONVERT_OBJS  = libv4lconvert.o tinyjpeg.o sn9c10x.o pac207.o \
 		jidctflt.o spca561-decompress.o rgbyuv.o spca501.o bayer.o
 TARGETS       = $(CONVERT_LIB)
 INCLUDES      = ../include/libv4lconvert.h
v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h +7 -0
diff -r faf96cf9a97c v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert-priv.h
@@ -31,6 +31,10 @@
 #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S','5','6','1')
 #endif
 
+#ifndef V4L2_PIX_FMT_PAC207
+#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P','2','0','7')
+#endif
+
 #ifndef V4L2_PIX_FMT_SGBRG8
 #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G','B','R','G')
 #endif
@@ -74,6 +78,9 @@
 void v4lconvert_decode_sn9c10x(const unsigned char *src, unsigned char *dst,
   int width, int height);
 
+void v4lconvert_decode_pac207(const unsigned char *src, unsigned char *dst,
+  int width, int height);
+
 void v4lconvert_bayer_to_bgr24(const unsigned char *bayer,
   unsigned char *rgb, int width, int height, unsigned int pixfmt);
 
v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c +7 -0
diff -r faf96cf9a97c v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c
@@ -38,6 +38,7 @@
   V4L2_PIX_FMT_SPCA501,
   V4L2_PIX_FMT_SPCA561,
   V4L2_PIX_FMT_SN9C10X,
+  V4L2_PIX_FMT_PAC207,
   -1
 };
 
@@ -318,6 +319,7 @@
     /* compressed bayer formats */
     case V4L2_PIX_FMT_SPCA561:
     case V4L2_PIX_FMT_SN9C10X:
+    case V4L2_PIX_FMT_PAC207:
     {
       unsigned char tmpbuf[dest_fmt->fmt.pix.width*dest_fmt->fmt.pix.height];
       unsigned int bayer_fmt;
@@ -332,6 +334,11 @@
 	  v4lconvert_decode_sn9c10x(src, tmpbuf, dest_fmt->fmt.pix.width,
 				    dest_fmt->fmt.pix.height);
 	  bayer_fmt = V4L2_PIX_FMT_SGBRG8;
+	  break;
+	case V4L2_PIX_FMT_PAC207:
+	  v4lconvert_decode_pac207(src, tmpbuf, dest_fmt->fmt.pix.width,
+				    dest_fmt->fmt.pix.height);
+	  bayer_fmt = V4L2_PIX_FMT_SBGGR8;
 	  break;
       }
 
v4l2-apps/lib/libv4l/libv4lconvert/pac207.c new file +421 -0

421 lines not on this page · raw message

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#1 lore raw
Quoted 11 lines · Hans de Goede

Hi All,

This patch adds support to libv4l for the compressed bayer format emitted by
pac207 based cams.

Regards,

Hans

Applied on http://www.linuxtv.org/hg/~tmerle/v4l2-library
Is it necessary to add the emails about license authorizations in the sources?
Only a public agreement on the ML, and the GNU LGPL should be sufficient.

Regards,
Thierry

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#2 lore raw
Quoted 7 lines · Thierry Merle
Quoted 6 lines · Hans de Goede

Hi All,

This patch adds support to libv4l for the compressed bayer format emitted by
pac207 based cams.

Quoted 8 lines
Quoted 5 lines

Regards,

Hans

Applied on http://www.linuxtv.org/hg/~tmerle/v4l2-library
Is it necessary to add the emails about license authorizations in the sources?

I dunno IANAL, but within Fedora (where I'm a packager) the guy responsible for the legal stuff, in case of license changes always wants a "written" (email is ok) permission notice bundled with the sources, so I followed this example, we could put the permission notices in some other file, but I think its good practice to keep them around bundled with the sources. I deliberately put them at the end so that with normal editing they don't get in the way.

Actually I'm about to submit a patch to add a permission notice for the sn9c10x decompression algorithm as I didn't write that myself.

Regards,

Hans

p.s.

Sorry about the semi missing subject last mail.

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#3 lore raw
Quoted 17 lines · Hans de Goede
Quoted 7 lines · Thierry Merle
Quoted 6 lines · Hans de Goede

Hi All,

This patch adds support to libv4l for the compressed bayer format emitted by
pac207 based cams.

Quoted 8 lines
Quoted 5 lines

Regards,

Hans

Applied on http://www.linuxtv.org/hg/~tmerle/v4l2-library
Is it necessary to add the emails about license authorizations in the sources?

Quoted 8 lines

I dunno IANAL, but within Fedora (where I'm a packager) the guy responsible for the legal stuff, in case of license changes always wants a "written" (email is ok) permission notice bundled with the sources, so I followed this example, we could put the permission notices in some other file, but I think its good practice to keep them around bundled with the sources. I deliberately put them at the end so that with normal editing they don't get in the way.

OK if it is mandatory, continue to put it at the closest place from the concerned source code.

Quoted 3 lines

Actually I'm about to submit a patch to add a permission notice for the sn9c10x decompression algorithm as I didn't write that myself.

OK

Quoted 8 lines

Regards,

Hans

p.s.

Sorry about the semi missing subject last mail.

I corrected it by myself :)

Thierry

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list