aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r--Documentation/video4linux/gspca.txt34
-rw-r--r--Documentation/video4linux/sh_mobile_ceu_camera.txt157
-rw-r--r--Documentation/video4linux/v4l2-framework.txt16
3 files changed, 195 insertions, 12 deletions
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index 319d9838e87e..1800a62cf135 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -12,6 +12,7 @@ m5602 0402:5602 ALi Video Camera Controller
12spca501 040a:0002 Kodak DVC-325 12spca501 040a:0002 Kodak DVC-325
13spca500 040a:0300 Kodak EZ200 13spca500 040a:0300 Kodak EZ200
14zc3xx 041e:041e Creative WebCam Live! 14zc3xx 041e:041e Creative WebCam Live!
15ov519 041e:4003 Video Blaster WebCam Go Plus
15spca500 041e:400a Creative PC-CAM 300 16spca500 041e:400a Creative PC-CAM 300
16sunplus 041e:400b Creative PC-CAM 600 17sunplus 041e:400b Creative PC-CAM 600
17sunplus 041e:4012 PC-Cam350 18sunplus 041e:4012 PC-Cam350
@@ -168,10 +169,14 @@ sunplus 055f:c650 Mustek MDC5500Z
168zc3xx 055f:d003 Mustek WCam300A 169zc3xx 055f:d003 Mustek WCam300A
169zc3xx 055f:d004 Mustek WCam300 AN 170zc3xx 055f:d004 Mustek WCam300 AN
170conex 0572:0041 Creative Notebook cx11646 171conex 0572:0041 Creative Notebook cx11646
172ov519 05a9:0511 Video Blaster WebCam 3/WebCam Plus, D-Link USB Digital Video Camera
173ov519 05a9:0518 Creative WebCam
171ov519 05a9:0519 OV519 Microphone 174ov519 05a9:0519 OV519 Microphone
172ov519 05a9:0530 OmniVision 175ov519 05a9:0530 OmniVision
176ov519 05a9:2800 OmniVision SuperCAM
173ov519 05a9:4519 Webcam Classic 177ov519 05a9:4519 Webcam Classic
174ov519 05a9:8519 OmniVision 178ov519 05a9:8519 OmniVision
179ov519 05a9:a511 D-Link USB Digital Video Camera
175ov519 05a9:a518 D-Link DSB-C310 Webcam 180ov519 05a9:a518 D-Link DSB-C310 Webcam
176sunplus 05da:1018 Digital Dream Enigma 1.3 181sunplus 05da:1018 Digital Dream Enigma 1.3
177stk014 05e1:0893 Syntek DV4000 182stk014 05e1:0893 Syntek DV4000
@@ -187,7 +192,7 @@ ov534 06f8:3002 Hercules Blog Webcam
187ov534 06f8:3003 Hercules Dualpix HD Weblog 192ov534 06f8:3003 Hercules Dualpix HD Weblog
188sonixj 06f8:3004 Hercules Classic Silver 193sonixj 06f8:3004 Hercules Classic Silver
189sonixj 06f8:3008 Hercules Deluxe Optical Glass 194sonixj 06f8:3008 Hercules Deluxe Optical Glass
190pac7311 06f8:3009 Hercules Classic Link 195pac7302 06f8:3009 Hercules Classic Link
191spca508 0733:0110 ViewQuest VQ110 196spca508 0733:0110 ViewQuest VQ110
192spca501 0733:0401 Intel Create and Share 197spca501 0733:0401 Intel Create and Share
193spca501 0733:0402 ViewQuest M318B 198spca501 0733:0402 ViewQuest M318B
@@ -199,6 +204,7 @@ sunplus 0733:2221 Mercury Digital Pro 3.1p
199sunplus 0733:3261 Concord 3045 spca536a 204sunplus 0733:3261 Concord 3045 spca536a
200sunplus 0733:3281 Cyberpix S550V 205sunplus 0733:3281 Cyberpix S550V
201spca506 0734:043b 3DeMon USB Capture aka 206spca506 0734:043b 3DeMon USB Capture aka
207ov519 0813:0002 Dual Mode USB Camera Plus
202spca500 084d:0003 D-Link DSC-350 208spca500 084d:0003 D-Link DSC-350
203spca500 08ca:0103 Aiptek PocketDV 209spca500 08ca:0103 Aiptek PocketDV
204sunplus 08ca:0104 Aiptek PocketDVII 1.3 210sunplus 08ca:0104 Aiptek PocketDVII 1.3
@@ -236,15 +242,15 @@ pac7311 093a:2603 Philips SPC 500 NC
236pac7311 093a:2608 Trust WB-3300p 242pac7311 093a:2608 Trust WB-3300p
237pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350 243pac7311 093a:260e Gigaware VGA PC Camera, Trust WB-3350p, SIGMA cam 2350
238pac7311 093a:260f SnakeCam 244pac7311 093a:260f SnakeCam
239pac7311 093a:2620 Apollo AC-905 245pac7302 093a:2620 Apollo AC-905
240pac7311 093a:2621 PAC731x 246pac7302 093a:2621 PAC731x
241pac7311 093a:2622 Genius Eye 312 247pac7302 093a:2622 Genius Eye 312
242pac7311 093a:2624 PAC7302 248pac7302 093a:2624 PAC7302
243pac7311 093a:2626 Labtec 2200 249pac7302 093a:2626 Labtec 2200
244pac7311 093a:2628 Genius iLook 300 250pac7302 093a:2628 Genius iLook 300
245pac7311 093a:2629 Genious iSlim 300 251pac7302 093a:2629 Genious iSlim 300
246pac7311 093a:262a Webcam 300k 252pac7302 093a:262a Webcam 300k
247pac7311 093a:262c Philips SPC 230 NC 253pac7302 093a:262c Philips SPC 230 NC
248jeilinj 0979:0280 Sakar 57379 254jeilinj 0979:0280 Sakar 57379
249zc3xx 0ac8:0302 Z-star Vimicro zc0302 255zc3xx 0ac8:0302 Z-star Vimicro zc0302
250vc032x 0ac8:0321 Vimicro generic vc0321 256vc032x 0ac8:0321 Vimicro generic vc0321
@@ -259,6 +265,7 @@ vc032x 0ac8:c002 Sony embedded vimicro
259vc032x 0ac8:c301 Samsung Q1 Ultra Premium 265vc032x 0ac8:c301 Samsung Q1 Ultra Premium
260spca508 0af9:0010 Hama USB Sightcam 100 266spca508 0af9:0010 Hama USB Sightcam 100
261spca508 0af9:0011 Hama USB Sightcam 100 267spca508 0af9:0011 Hama USB Sightcam 100
268ov519 0b62:0059 iBOT2 Webcam
262sonixb 0c45:6001 Genius VideoCAM NB 269sonixb 0c45:6001 Genius VideoCAM NB
263sonixb 0c45:6005 Microdia Sweex Mini Webcam 270sonixb 0c45:6005 Microdia Sweex Mini Webcam
264sonixb 0c45:6007 Sonix sn9c101 + Tas5110D 271sonixb 0c45:6007 Sonix sn9c101 + Tas5110D
@@ -318,8 +325,10 @@ sn9c20x 0c45:62b3 PC Camera (SN9C202 + OV9655)
318sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660) 325sn9c20x 0c45:62bb PC Camera (SN9C202 + OV7660)
319sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R) 326sn9c20x 0c45:62bc PC Camera (SN9C202 + HV7131R)
320sunplus 0d64:0303 Sunplus FashionCam DXG 327sunplus 0d64:0303 Sunplus FashionCam DXG
328ov519 0e96:c001 TRUST 380 USB2 SPACEC@M
321etoms 102c:6151 Qcam Sangha CIF 329etoms 102c:6151 Qcam Sangha CIF
322etoms 102c:6251 Qcam xxxxxx VGA 330etoms 102c:6251 Qcam xxxxxx VGA
331ov519 1046:9967 W9967CF/W9968CF WebCam IC, Video Blaster WebCam Go
323zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128 332zc3xx 10fd:0128 Typhoon Webshot II USB 300k 0x0128
324spca561 10fd:7e50 FlyCam Usb 100 333spca561 10fd:7e50 FlyCam Usb 100
325zc3xx 10fd:8050 Typhoon Webshot II USB 300k 334zc3xx 10fd:8050 Typhoon Webshot II USB 300k
@@ -332,7 +341,12 @@ spca501 1776:501c Arowana 300K CMOS Camera
332t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops 341t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops
333vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC 342vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC
334pac207 2001:f115 D-Link DSB-C120 343pac207 2001:f115 D-Link DSB-C120
344sq905c 2770:9050 sq905c
345sq905c 2770:905c DualCamera
346sq905 2770:9120 Argus Digital Camera DC1512
347sq905c 2770:913d sq905c
335spca500 2899:012c Toptro Industrial 348spca500 2899:012c Toptro Industrial
349ov519 8020:ef04 ov519
336spca508 8086:0110 Intel Easy PC Camera 350spca508 8086:0110 Intel Easy PC Camera
337spca500 8086:0630 Intel Pocket PC Camera 351spca500 8086:0630 Intel Pocket PC Camera
338spca506 99fa:8988 Grandtec V.cap 352spca506 99fa:8988 Grandtec V.cap
diff --git a/Documentation/video4linux/sh_mobile_ceu_camera.txt b/Documentation/video4linux/sh_mobile_ceu_camera.txt
new file mode 100644
index 000000000000..2ae16349a78d
--- /dev/null
+++ b/Documentation/video4linux/sh_mobile_ceu_camera.txt
@@ -0,0 +1,157 @@
1 Cropping and Scaling algorithm, used in the sh_mobile_ceu_camera driver
2 =======================================================================
3
4Terminology
5-----------
6
7sensor scales: horizontal and vertical scales, configured by the sensor driver
8host scales: -"- host driver
9combined scales: sensor_scale * host_scale
10
11
12Generic scaling / cropping scheme
13---------------------------------
14
15-1--
16|
17-2-- -\
18| --\
19| --\
20+-5-- -\ -- -3--
21| ---\
22| --- -4-- -\
23| -\
24| - -6--
25|
26| - -6'-
27| -/
28| --- -4'- -/
29| ---/
30+-5'- -/
31| -- -3'-
32| --/
33| --/
34-2'- -/
35|
36|
37-1'-
38
39Produced by user requests:
40
41S_CROP(left / top = (5) - (1), width / height = (5') - (5))
42S_FMT(width / height = (6') - (6))
43
44Here:
45
46(1) to (1') - whole max width or height
47(1) to (2) - sensor cropped left or top
48(2) to (2') - sensor cropped width or height
49(3) to (3') - sensor scale
50(3) to (4) - CEU cropped left or top
51(4) to (4') - CEU cropped width or height
52(5) to (5') - reverse sensor scale applied to CEU cropped width or height
53(2) to (5) - reverse sensor scale applied to CEU cropped left or top
54(6) to (6') - CEU scale - user window
55
56
57S_FMT
58-----
59
60Do not touch input rectangle - it is already optimal.
61
621. Calculate current sensor scales:
63
64 scale_s = ((3') - (3)) / ((2') - (2))
65
662. Calculate "effective" input crop (sensor subwindow) - CEU crop scaled back at
67current sensor scales onto input window - this is user S_CROP:
68
69 width_u = (5') - (5) = ((4') - (4)) * scale_s
70
713. Calculate new combined scales from "effective" input window to requested user
72window:
73
74 scale_comb = width_u / ((6') - (6))
75
764. Calculate sensor output window by applying combined scales to real input
77window:
78
79 width_s_out = ((2') - (2)) / scale_comb
80
815. Apply iterative sensor S_FMT for sensor output window.
82
83 subdev->video_ops->s_fmt(.width = width_s_out)
84
856. Retrieve sensor output window (g_fmt)
86
877. Calculate new sensor scales:
88
89 scale_s_new = ((3')_new - (3)_new) / ((2') - (2))
90
918. Calculate new CEU crop - apply sensor scales to previously calculated
92"effective" crop:
93
94 width_ceu = (4')_new - (4)_new = width_u / scale_s_new
95 left_ceu = (4)_new - (3)_new = ((5) - (2)) / scale_s_new
96
979. Use CEU cropping to crop to the new window:
98
99 ceu_crop(.width = width_ceu, .left = left_ceu)
100
10110. Use CEU scaling to scale to the requested user window:
102
103 scale_ceu = width_ceu / width
104
105
106S_CROP
107------
108
109If old scale applied to new crop is invalid produce nearest new scale possible
110
1111. Calculate current combined scales.
112
113 scale_comb = (((4') - (4)) / ((6') - (6))) * (((2') - (2)) / ((3') - (3)))
114
1152. Apply iterative sensor S_CROP for new input window.
116
1173. If old combined scales applied to new crop produce an impossible user window,
118adjust scales to produce nearest possible window.
119
120 width_u_out = ((5') - (5)) / scale_comb
121
122 if (width_u_out > max)
123 scale_comb = ((5') - (5)) / max;
124 else if (width_u_out < min)
125 scale_comb = ((5') - (5)) / min;
126
1274. Issue G_CROP to retrieve actual input window.
128
1295. Using actual input window and calculated combined scales calculate sensor
130target output window.
131
132 width_s_out = ((3') - (3)) = ((2') - (2)) / scale_comb
133
1346. Apply iterative S_FMT for new sensor target output window.
135
1367. Issue G_FMT to retrieve the actual sensor output window.
137
1388. Calculate sensor scales.
139
140 scale_s = ((3') - (3)) / ((2') - (2))
141
1429. Calculate sensor output subwindow to be cropped on CEU by applying sensor
143scales to the requested window.
144
145 width_ceu = ((5') - (5)) / scale_s
146
14710. Use CEU cropping for above calculated window.
148
14911. Calculate CEU scales from sensor scales from results of (10) and user window
150from (3)
151
152 scale_ceu = calc_scale(((5') - (5)), &width_u_out)
153
15412. Apply CEU scales.
155
156--
157Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index b806edaf3e75..74d677c8b036 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -561,6 +561,8 @@ video_device helper functions
561 561
562There are a few useful helper functions: 562There are a few useful helper functions:
563 563
564- file/video_device private data
565
564You can set/get driver private data in the video_device struct using: 566You can set/get driver private data in the video_device struct using:
565 567
566void *video_get_drvdata(struct video_device *vdev); 568void *video_get_drvdata(struct video_device *vdev);
@@ -575,8 +577,7 @@ struct video_device *video_devdata(struct file *file);
575 577
576returns the video_device belonging to the file struct. 578returns the video_device belonging to the file struct.
577 579
578The final helper function combines video_get_drvdata with 580The video_drvdata function combines video_get_drvdata with video_devdata:
579video_devdata:
580 581
581void *video_drvdata(struct file *file); 582void *video_drvdata(struct file *file);
582 583
@@ -584,6 +585,17 @@ You can go from a video_device struct to the v4l2_device struct using:
584 585
585struct v4l2_device *v4l2_dev = vdev->v4l2_dev; 586struct v4l2_device *v4l2_dev = vdev->v4l2_dev;
586 587
588- Device node name
589
590The video_device node kernel name can be retrieved using
591
592const char *video_device_node_name(struct video_device *vdev);
593
594The name is used as a hint by userspace tools such as udev. The function
595should be used where possible instead of accessing the video_device::num and
596video_device::minor fields.
597
598
587video buffer helper functions 599video buffer helper functions
588----------------------------- 600-----------------------------
589 601