From: Dominic L. <ma...@us...> - 2005-10-19 18:29:29
|
Update of /cvsroot/robotflow/RobotFlow/Devices/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21473 Modified Files: videodev.h videodev2.h Log Message: updated videodev Index: videodev2.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/videodev2.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** videodev2.h 4 Mar 2004 14:51:05 -0000 1.1 --- videodev2.h 19 Oct 2005 18:29:16 -0000 1.2 *************** *** 17,22 **** #include <linux/time.h> /* need struct timeval */ #endif ! ! #include "videodevfix.h" /* --- 17,21 ---- #include <linux/time.h> /* need struct timeval */ #endif ! #include <linux/compiler.h> /* need __user */ /* *************** *** 80,83 **** --- 79,83 ---- V4L2_TUNER_RADIO = 1, V4L2_TUNER_ANALOG_TV = 2, + V4L2_TUNER_DIGITAL_TV = 3, }; *************** *** 98,109 **** /* HD and modern captures. */ V4L2_COLORSPACE_REC709 = 3, ! /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ V4L2_COLORSPACE_BT878 = 4, ! /* These should be useful. Assume 601 extents. */ V4L2_COLORSPACE_470_SYSTEM_M = 5, V4L2_COLORSPACE_470_SYSTEM_BG = 6, ! /* I know there will be cameras that send this. So, this is * unspecified chromaticities and full 0-255 on each of the --- 98,109 ---- /* HD and modern captures. */ V4L2_COLORSPACE_REC709 = 3, ! /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ V4L2_COLORSPACE_BT878 = 4, ! /* These should be useful. Assume 601 extents. */ V4L2_COLORSPACE_470_SYSTEM_M = 5, V4L2_COLORSPACE_470_SYSTEM_BG = 6, ! /* I know there will be cameras that send this. So, this is * unspecified chromaticities and full 0-255 on each of the *************** *** 111,115 **** */ V4L2_COLORSPACE_JPEG = 7, ! /* For RGB colourspaces, this is probably a good start. */ V4L2_COLORSPACE_SRGB = 8, --- 111,115 ---- */ V4L2_COLORSPACE_JPEG = 7, ! /* For RGB colourspaces, this is probably a good start. */ V4L2_COLORSPACE_SRGB = 8, *************** *** 210,213 **** --- 210,216 ---- #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ + /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ + #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ + /* compressed formats */ #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ *************** *** 218,221 **** --- 221,225 ---- /* Vendor-specific formats */ #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ + #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ /* *************** *** 265,326 **** /* ! * C O M P R E S S I O N P A R A M E T E R S */ - #if 0 - /* ### generic compression settings don't work, there is too much - * ### codec-specific stuff. Maybe reuse that for MPEG codec settings - * ### later ... */ - struct v4l2_compression - { - __u32 quality; - __u32 keyframerate; - __u32 pframerate; - __u32 reserved[5]; - /* what we'll need for MPEG, extracted from some postings on - the v4l list (Gert Vervoort, PlasmaJohn). ! system stream: ! - type: elementary stream(ES), packatised elementary stream(s) (PES) ! program stream(PS), transport stream(TS) ! - system bitrate ! - PS packet size (DVD: 2048 bytes, VCD: 2324 bytes) ! - TS video PID ! - TS audio PID ! - TS PCR PID ! - TS system information tables (PAT, PMT, CAT, NIT and SIT) ! - (MPEG-1 systems stream vs. MPEG-2 program stream (TS not supported ! by MPEG-1 systems) ! audio: ! - type: MPEG (+Layer I,II,III), AC-3, LPCM ! - bitrate ! - sampling frequency (DVD: 48 Khz, VCD: 44.1 KHz, 32 kHz) ! - Trick Modes? (ff, rew) ! - Copyright ! - Inverse Telecine ! video: ! - picturesize (SIF, 1/2 D1, 2/3 D1, D1) and PAL/NTSC norm can be set ! through excisting V4L2 controls ! - noise reduction, parameters encoder specific? ! - MPEG video version: MPEG-1, MPEG-2 ! - GOP (Group Of Pictures) definition: ! - N: number of frames per GOP ! - M: distance between reference (I,P) frames ! - open/closed GOP ! - quantiser matrix: inter Q matrix (64 bytes) and intra Q matrix (64 bytes) ! - quantiser scale: linear or logarithmic ! - scanning: alternate or zigzag ! - bitrate mode: CBR (constant bitrate) or VBR (variable bitrate). ! - target video bitrate for CBR ! - target video bitrate for VBR ! - maximum video bitrate for VBR - min. quantiser value for VBR ! - max. quantiser value for VBR ! - adaptive quantisation value ! - return the number of bytes per GOP or bitrate for bitrate monitoring ! */ }; #endif --- 269,358 ---- + #if 1 /* ! * M P E G C O M P R E S S I O N P A R A M E T E R S ! * ! * ### WARNING: this is still work-in-progress right now, most likely ! * ### there will be some incompatible changes. ! * */ ! enum v4l2_bitrate_mode { ! V4L2_BITRATE_NONE = 0, /* not specified */ ! V4L2_BITRATE_CBR, /* constant bitrate */ ! V4L2_BITRATE_VBR, /* variable bitrate */ ! }; ! struct v4l2_bitrate { ! /* rates are specified in kbit/sec */ ! enum v4l2_bitrate_mode mode; ! __u32 min; ! __u32 target; /* use this one for CBR */ ! __u32 max; ! }; ! enum v4l2_mpeg_streamtype { ! V4L2_MPEG_SS_1, /* MPEG-1 system stream */ ! V4L2_MPEG_PS_2, /* MPEG-2 program stream */ ! V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ ! V4L2_MPEG_PS_DVD, /* MPEG-2 program stream with DVD header fixups */ ! }; ! enum v4l2_mpeg_audiotype { ! V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ ! V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ ! V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ ! V4L2_MPEG_AC3, /* AC3 */ ! V4L2_MPEG_LPCM, /* LPCM */ ! }; ! enum v4l2_mpeg_videotype { ! V4L2_MPEG_VI_1, /* MPEG-1 */ ! V4L2_MPEG_VI_2, /* MPEG-2 */ ! }; ! enum v4l2_mpeg_aspectratio { ! V4L2_MPEG_ASPECT_SQUARE = 1, /* square pixel */ ! V4L2_MPEG_ASPECT_4_3 = 2, /* 4 : 3 */ ! V4L2_MPEG_ASPECT_16_9 = 3, /* 16 : 9 */ ! V4L2_MPEG_ASPECT_1_221 = 4, /* 1 : 2,21 */ ! }; ! struct v4l2_mpeg_compression { ! /* general */ ! enum v4l2_mpeg_streamtype st_type; ! struct v4l2_bitrate st_bitrate; ! /* transport streams */ ! __u16 ts_pid_pmt; ! __u16 ts_pid_audio; ! __u16 ts_pid_video; ! __u16 ts_pid_pcr; ! ! /* program stream */ ! __u16 ps_size; ! __u16 reserved_1; /* align */ ! ! /* audio */ ! enum v4l2_mpeg_audiotype au_type; ! struct v4l2_bitrate au_bitrate; ! __u32 au_sample_rate; ! __u8 au_pesid; ! __u8 reserved_2[3]; /* align */ ! ! /* video */ ! enum v4l2_mpeg_videotype vi_type; ! enum v4l2_mpeg_aspectratio vi_aspect_ratio; ! struct v4l2_bitrate vi_bitrate; ! __u32 vi_frame_rate; ! __u16 vi_frames_per_gop; ! __u16 vi_bframes_count; ! __u8 vi_pesid; ! __u8 reserved_3[3]; /* align */ ! ! /* misc flags */ ! __u32 closed_gops:1; ! __u32 pulldown:1; ! __u32 reserved_4:30; /* align */ ! ! /* I don't expect the above being perfect yet ;) */ ! __u32 reserved_5[8]; }; #endif *************** *** 334,341 **** int APP_len; /* Length of data in JPEG APPn segment */ char APP_data[60]; /* Data in the JPEG APPn segment. */ ! int COM_len; /* Length of data in JPEG COM segment */ char COM_data[60]; /* Data in JPEG COM segment */ ! __u32 jpeg_markers; /* Which markers should go into the JPEG * output. Unless you exactly know what --- 366,373 ---- int APP_len; /* Length of data in JPEG APPn segment */ char APP_data[60]; /* Data in the JPEG APPn segment. */ ! int COM_len; /* Length of data in JPEG COM segment */ char COM_data[60]; /* Data in JPEG COM segment */ ! __u32 jpeg_markers; /* Which markers should go into the JPEG * output. Unless you exactly know what *************** *** 347,351 **** * is influenced by APP_len and COM_len * ONLY, not by this property! */ ! #define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ #define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ --- 379,383 ---- * is influenced by APP_len and COM_len * ONLY, not by this property! */ ! #define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ #define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ *************** *** 386,391 **** } m; __u32 length; ! ! __u32 reserved[2]; }; --- 418,423 ---- } m; __u32 length; ! __u32 input; ! __u32 reserved; }; *************** *** 398,401 **** --- 430,434 ---- #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ + #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ /* *************** *** 432,438 **** enum v4l2_field field; __u32 chromakey; ! struct v4l2_clip *clips; __u32 clipcount; ! void *bitmap; }; --- 465,471 ---- enum v4l2_field field; __u32 chromakey; ! struct v4l2_clip __user *clips; __u32 clipcount; ! void __user *bitmap; }; *************** *** 469,473 **** struct v4l2_cropcap { ! enum v4l2_buf_type type; struct v4l2_rect bounds; struct v4l2_rect defrect; --- 502,506 ---- struct v4l2_cropcap { ! enum v4l2_buf_type type; struct v4l2_rect bounds; struct v4l2_rect defrect; *************** *** 529,538 **** #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ V4L2_STD_NTSC_M_JP) #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ - V4L2_STD_SECAM_D |\ V4L2_STD_SECAM_G |\ V4L2_STD_SECAM_H |\ ! V4L2_STD_SECAM_K |\ ! V4L2_STD_SECAM_K1 |\ V4L2_STD_SECAM_L) --- 562,572 ---- #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ V4L2_STD_NTSC_M_JP) + #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ + V4L2_STD_SECAM_K |\ + V4L2_STD_SECAM_K1) #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ V4L2_STD_SECAM_G |\ V4L2_STD_SECAM_H |\ ! V4L2_STD_SECAM_DK |\ V4L2_STD_SECAM_L) *************** *** 544,547 **** --- 578,583 ---- V4L2_STD_PAL_Nc |\ V4L2_STD_SECAM) + #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ + V4L2_STD_ATSC_16_VSB) #define V4L2_STD_UNKNOWN 0 *************** *** 834,840 **** #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) ! #if 0 ! #define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression) ! #define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression) #endif #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) --- 870,876 ---- #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) ! #if 1 /* experimental */ ! #define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) ! #define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) #endif #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) *************** *** 872,876 **** #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency) #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency) ! #define VIDIOC_CROPCAP _IOR ('V', 58, struct v4l2_cropcap) #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop) #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop) --- 908,912 ---- #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency) #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency) ! #define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap) #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop) #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop) *************** *** 890,893 **** --- 926,930 ---- #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) + #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ Index: videodev.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/videodev.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** videodev.h 29 May 2002 20:15:47 -0000 1.1 --- videodev.h 19 Oct 2005 18:29:14 -0000 1.2 *************** *** 1,1004 **** - /* - * Video for Linux Two - * - * Header file for v4l or V4L2 drivers and applications, for - * Linux kernels 2.2.x or 2.4.x. - * - * Author: Bill Dirks <bd...@pa...> - * Justin Schoeman - * et al. - */ [...1360 lines suppressed...] ! #define VID_HARDWARE_OV511 27 #define VID_HARDWARE_ZR356700 28 /* Zoran 36700 series */ ! #define VID_HARDWARE_W9966 29 ! #define VID_HARDWARE_SE401 30 /* SE401 USB webcams */ ! #define VID_HARDWARE_PWC 31 /* Philips webcams */ ! #define VID_HARDWARE_MEYE 32 /* Sony Vaio MotionEye cameras */ ! #define VID_HARDWARE_CPIA2 33 ! #define VID_HARDWARE_VICAM 34 ! #define VID_HARDWARE_SF16FMR2 35 ! #define VID_HARDWARE_W9968CF 36 ! #define VID_HARDWARE_SAA7114H 37 ! #define VID_HARDWARE_SN9C102 38 ! #define VID_HARDWARE_ARV 39 ! #endif /* __LINUX_VIDEODEV_H */ ! /* ! * Local variables: ! * c-basic-offset: 8 ! * End: ! */ |