aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-18 13:07:10 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-18 13:07:10 -0400
commitd7b3ae79e1f72218b1a196c3669ff2d29e9b9c11 (patch)
treeff28c0047b419e8119eb638aafe7d14cac66f932
parentb3b7ea9aa7fc7551ee283df6987ceedc709ad56d (diff)
[media] cx2341x.rst: add contents of README.vbi
Finally, adds the content of README.vbi at cx2341x.rst after its conversion to ReST format. Now, add information about this chipset and its driver is inside a single chapter at the media/v4l-drivers book. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--Documentation/media/v4l-drivers/cx2341x.rst50
-rw-r--r--Documentation/video4linux/cx2341x/README.vbi45
2 files changed, 50 insertions, 45 deletions
diff --git a/Documentation/media/v4l-drivers/cx2341x.rst b/Documentation/media/v4l-drivers/cx2341x.rst
index 15bfd345df48..e06d07ebdecd 100644
--- a/Documentation/media/v4l-drivers/cx2341x.rst
+++ b/Documentation/media/v4l-drivers/cx2341x.rst
@@ -3806,3 +3806,53 @@ Raw format c example
3806 fclose(fin); 3806 fclose(fin);
3807 return 0; 3807 return 0;
3808 } 3808 }
3809
3810
3811Format of embedded V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI data
3812---------------------------------------------------------
3813
3814Author: Hans Verkuil <hverkuil@xs4all.nl>
3815
3816
3817This section describes the V4L2_MPEG_STREAM_VBI_FMT_IVTV format of the VBI data
3818embedded in an MPEG-2 program stream. This format is in part dictated by some
3819hardware limitations of the ivtv driver (the driver for the Conexant cx23415/6
3820chips), in particular a maximum size for the VBI data. Anything longer is cut
3821off when the MPEG stream is played back through the cx23415.
3822
3823The advantage of this format is it is very compact and that all VBI data for
3824all lines can be stored while still fitting within the maximum allowed size.
3825
3826The stream ID of the VBI data is 0xBD. The maximum size of the embedded data is
38274 + 43 * 36, which is 4 bytes for a header and 2 * 18 VBI lines with a 1 byte
3828header and a 42 bytes payload each. Anything beyond this limit is cut off by
3829the cx23415/6 firmware. Besides the data for the VBI lines we also need 36 bits
3830for a bitmask determining which lines are captured and 4 bytes for a magic cookie,
3831signifying that this data package contains V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI data.
3832If all lines are used, then there is no longer room for the bitmask. To solve this
3833two different magic numbers were introduced:
3834
3835'itv0': After this magic number two unsigned longs follow. Bits 0-17 of the first
3836unsigned long denote which lines of the first field are captured. Bits 18-31 of
3837the first unsigned long and bits 0-3 of the second unsigned long are used for the
3838second field.
3839
3840'ITV0': This magic number assumes all VBI lines are captured, i.e. it implicitly
3841implies that the bitmasks are 0xffffffff and 0xf.
3842
3843After these magic cookies (and the 8 byte bitmask in case of cookie 'itv0') the
3844captured VBI lines start:
3845
3846For each line the least significant 4 bits of the first byte contain the data type.
3847Possible values are shown in the table below. The payload is in the following 42
3848bytes.
3849
3850Here is the list of possible data types:
3851
3852.. code-block:: c
3853
3854 #define IVTV_SLICED_TYPE_TELETEXT 0x1 // Teletext (uses lines 6-22 for PAL)
3855 #define IVTV_SLICED_TYPE_CC 0x4 // Closed Captions (line 21 NTSC)
3856 #define IVTV_SLICED_TYPE_WSS 0x5 // Wide Screen Signal (line 23 PAL)
3857 #define IVTV_SLICED_TYPE_VPS 0x7 // Video Programming System (PAL) (line 16)
3858
diff --git a/Documentation/video4linux/cx2341x/README.vbi b/Documentation/video4linux/cx2341x/README.vbi
deleted file mode 100644
index 5807cf156173..000000000000
--- a/Documentation/video4linux/cx2341x/README.vbi
+++ /dev/null
@@ -1,45 +0,0 @@
1
2Format of embedded V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI data
3=========================================================
4
5This document describes the V4L2_MPEG_STREAM_VBI_FMT_IVTV format of the VBI data
6embedded in an MPEG-2 program stream. This format is in part dictated by some
7hardware limitations of the ivtv driver (the driver for the Conexant cx23415/6
8chips), in particular a maximum size for the VBI data. Anything longer is cut
9off when the MPEG stream is played back through the cx23415.
10
11The advantage of this format is it is very compact and that all VBI data for
12all lines can be stored while still fitting within the maximum allowed size.
13
14The stream ID of the VBI data is 0xBD. The maximum size of the embedded data is
154 + 43 * 36, which is 4 bytes for a header and 2 * 18 VBI lines with a 1 byte
16header and a 42 bytes payload each. Anything beyond this limit is cut off by
17the cx23415/6 firmware. Besides the data for the VBI lines we also need 36 bits
18for a bitmask determining which lines are captured and 4 bytes for a magic cookie,
19signifying that this data package contains V4L2_MPEG_STREAM_VBI_FMT_IVTV VBI data.
20If all lines are used, then there is no longer room for the bitmask. To solve this
21two different magic numbers were introduced:
22
23'itv0': After this magic number two unsigned longs follow. Bits 0-17 of the first
24unsigned long denote which lines of the first field are captured. Bits 18-31 of
25the first unsigned long and bits 0-3 of the second unsigned long are used for the
26second field.
27
28'ITV0': This magic number assumes all VBI lines are captured, i.e. it implicitly
29implies that the bitmasks are 0xffffffff and 0xf.
30
31After these magic cookies (and the 8 byte bitmask in case of cookie 'itv0') the
32captured VBI lines start:
33
34For each line the least significant 4 bits of the first byte contain the data type.
35Possible values are shown in the table below. The payload is in the following 42
36bytes.
37
38Here is the list of possible data types:
39
40#define IVTV_SLICED_TYPE_TELETEXT 0x1 // Teletext (uses lines 6-22 for PAL)
41#define IVTV_SLICED_TYPE_CC 0x4 // Closed Captions (line 21 NTSC)
42#define IVTV_SLICED_TYPE_WSS 0x5 // Wide Screen Signal (line 23 PAL)
43#define IVTV_SLICED_TYPE_VPS 0x7 // Video Programming System (PAL) (line 16)
44
45Hans Verkuil <hverkuil@xs4all.nl>