summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-09-17 11:49:52 +0000
committerGerd Knorr <devnull@localhost>2004-09-17 11:49:52 +0000
commitc420e9159155c873803d8fe434b3c02aa17e1072 (patch)
treef7823bd928479c6504eb05873294c19186c23565 /linux/include
parentc40a86c67942fe83a8a3461a5ae7702f7471474e (diff)
downloadmediapointer-dvb-s2-c420e9159155c873803d8fe434b3c02aa17e1072.tar.gz
mediapointer-dvb-s2-c420e9159155c873803d8fe434b3c02aa17e1072.tar.bz2
- cx88: maybe fix nicam + pal-i
- v4l2: mpeg api first cut
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/linux/videodev2.h125
1 files changed, 70 insertions, 55 deletions
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index 076dd41d5..20d234669 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -265,64 +265,79 @@ struct v4l2_timecode
/* The above is based on SMPTE timecodes */
+#if 1
/*
- * C O M P R E S S I O N P A R A M E T E R S
+ * 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_CBR, /* constant bitrate */
+ V4L2_BITRATE_VBR, /* variable bitrate */
+};
+struct v4l2_bitrate {
+ enum v4l2_bitrate_mode mode;
+ u32 min;
+ u32 target;
+ u32 max;
+};
+
+enum v4l2_mpeg_streamtype {
+ V4L2_MPEG_PS_1, /* MPEG-1 program stream */
+ V4L2_MPEG_PS_2, /* MPEG-2 program stream */
+ V4L2_MPEG_TS_2, /* MPEG-2 transport stream */
+};
+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 */
+};
+enum v4l2_mpeg_videotype {
+ V4L2_MPEG_VI_1, /* MPEG-1 */
+ V4L2_MPEG_VI_2, /* MPEG-2 */
+};
+
+struct v4l2_mpeg_compression {
+ /* FIXME: how to handle profiles? */
+
+ /* general */
+ enum v4l2_mpeg_streamtype st_type;
+
+ /* transport streams */
+ u16 ts_pid_pmt;
+ u16 ts_pid_audio;
+ u16 ts_pid_video;
+ u16 ts_pid_pcr;
+
+ /* program stream */
+ u16 ps_size;
+ u16 reserved0; /* placed here for alignment */
+
+ /* audio */
+ enum v4l2_mpeg_audiotype au_type;
+ struct v4l2_bitrate au_bitrate;
+ u32 au_sample_rate;
+
+ /* video */
+ enum v4l2_mpeg_videotype vi_type;
+ struct v4l2_bitrate vi_bitrate;
+ u32 vi_frame_rate;
+ u16 vi_frames_per_gop;
+ u16 vi_bframes_count;
+
#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
-
-*/
+ /* FIXME: found in iviv driver */
+ dnr_* // filtering? is this mpeg related at all?
+ gop_closure // whats this? sounds at least mpeg related?
+ pulldown // we probably want that one ...
+#endif
+
+ /* I don't expect the above being perfect yet ;) */
+ u32 reserved1[8];
};
#endif