teerytko / python-video4linux2

Automatically exported from code.google.com/p/python-video4linux2
0 stars 0 forks source link

pyv4l2.py code breaks big-endian platforms #25

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The strings in the 'pixelformats' tuple are only valid for little-endian 
systems. The code should implement the same functionality as the C-macro 
used in the V4L2 headers:

#define v4l2_fourcc(a,b,c,d)\
    (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)
(d)<<24))

...
#define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R','G','B','4') /* 32  
RGB-8-8-8-8   */
...

Original issue reported on code.google.com by djan...@gmail.com on 21 Apr 2009 at 6:48