Skip to content

Commit 27c053a

Browse files
committed
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: "This series contains: - Exynos s5p-mfc driver got support for VP8 encoder - Some SoC drivers gained support for asynchronous registration (needed for DT) - The RC subsystem gained support for RC activity LED; - New drivers added: a video decoder(adv7842), a video encoder (adv7511), a new GSPCA driver (stk1135) and support for Renesas R-Car (vsp1) - the first SDR kernel driver: mirics msi3101. Due to some troubles with the driver, and because the API is still under discussion, it will be merged at staging for 3.12. Need to rework on it - usual new boards additions, fixes, cleanups and driver improvements" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (242 commits) [media] cx88: Fix regression: CX88_AUDIO_WM8775 can't be 0 [media] exynos4-is: Fix entity unregistration on error path [media] exynos-gsc: Register v4l2 device [media] exynos4-is: Fix fimc-lite bayer formats [media] em28xx: fix assignment of the eeprom data [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe() [media] usbtv: Throw corrupted frames away [media] usbtv: Fix deinterlacing [media] v4l2: added missing mutex.h include to v4l2-ctrls.h [media] DocBook: upgrade media_api DocBook version to 4.2 [media] ml86v7667: fix compile warning: 'ret' set but not used [media] s5p-g2d: Fix registration failure [media] media: coda: Fix DT driver data pointer for i.MX27 [media] s5p-mfc: Fix input/output format reporting [media] v4l: vsp1: Fix mutex double lock at streamon time [media] v4l: vsp1: Add support for RT clock [media] v4l: vsp1: Initialize media device bus_info field [media] davinci: vpif_capture: fix error return code in vpif_probe() [media] davinci: vpif_display: fix error return code in vpif_probe() [media] MAINTAINERS: add entries for adv7511 and adv7842 ...
2 parents a09e9a7 + f66b2a1 commit 27c053a

216 files changed

Lines changed: 18958 additions & 2632 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/DocBook/media/v4l/controls.xml‎

Lines changed: 163 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -722,17 +722,22 @@ for more details.</para>
722722
</section>
723723

724724
<section id="mpeg-controls">
725-
<title>MPEG Control Reference</title>
725+
<title>Codec Control Reference</title>
726726

727-
<para>Below all controls within the MPEG control class are
727+
<para>Below all controls within the Codec control class are
728728
described. First the generic controls, then controls specific for
729729
certain hardware.</para>
730730

731+
<para>Note: These controls are applicable to all codecs and
732+
not just MPEG. The defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG
733+
as the controls were originally made for MPEG codecs and later
734+
extended to cover all encoding formats.</para>
735+
731736
<section>
732-
<title>Generic MPEG Controls</title>
737+
<title>Generic Codec Controls</title>
733738

734739
<table pgwide="1" frame="none" id="mpeg-control-id">
735-
<title>MPEG Control IDs</title>
740+
<title>Codec Control IDs</title>
736741
<tgroup cols="4">
737742
<colspec colname="c1" colwidth="1*" />
738743
<colspec colname="c2" colwidth="6*" />
@@ -752,7 +757,7 @@ certain hardware.</para>
752757
<row>
753758
<entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant>&nbsp;</entry>
754759
<entry>class</entry>
755-
</row><row><entry spanname="descr">The MPEG class
760+
</row><row><entry spanname="descr">The Codec class
756761
descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
757762
description of this control class. This description can be used as the
758763
caption of a Tab page in a GUI, for example.</entry>
@@ -3009,6 +3014,159 @@ in by the application. 0 = do not insert, 1 = insert packets.</entry>
30093014
</tgroup>
30103015
</table>
30113016
</section>
3017+
3018+
<section>
3019+
<title>VPX Control Reference</title>
3020+
3021+
<para>The VPX controls include controls for encoding parameters
3022+
of VPx video codec.</para>
3023+
3024+
<table pgwide="1" frame="none" id="vpx-control-id">
3025+
<title>VPX Control IDs</title>
3026+
3027+
<tgroup cols="4">
3028+
<colspec colname="c1" colwidth="1*" />
3029+
<colspec colname="c2" colwidth="6*" />
3030+
<colspec colname="c3" colwidth="2*" />
3031+
<colspec colname="c4" colwidth="6*" />
3032+
<spanspec namest="c1" nameend="c2" spanname="id" />
3033+
<spanspec namest="c2" nameend="c4" spanname="descr" />
3034+
<thead>
3035+
<row>
3036+
<entry spanname="id" align="left">ID</entry>
3037+
<entry align="left">Type</entry>
3038+
</row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3039+
</row>
3040+
</thead>
3041+
<tbody valign="top">
3042+
<row><entry></entry></row>
3043+
3044+
<row><entry></entry></row>
3045+
<row id="v4l2-vpx-num-partitions">
3046+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS</constant></entry>
3047+
<entry>enum v4l2_vp8_num_partitions</entry>
3048+
</row>
3049+
<row><entry spanname="descr">The number of token partitions to use in VP8 encoder.
3050+
Possible values are:</entry>
3051+
</row>
3052+
<row>
3053+
<entrytbl spanname="descr" cols="2">
3054+
<tbody valign="top">
3055+
<row>
3056+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION</constant></entry>
3057+
<entry>1 coefficient partition</entry>
3058+
</row>
3059+
<row>
3060+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS</constant></entry>
3061+
<entry>2 coefficient partitions</entry>
3062+
</row>
3063+
<row>
3064+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS</constant></entry>
3065+
<entry>4 coefficient partitions</entry>
3066+
</row>
3067+
<row>
3068+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS</constant></entry>
3069+
<entry>8 coefficient partitions</entry>
3070+
</row>
3071+
</tbody>
3072+
</entrytbl>
3073+
</row>
3074+
3075+
<row><entry></entry></row>
3076+
<row>
3077+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4</constant></entry>
3078+
<entry>boolean</entry>
3079+
</row>
3080+
<row><entry spanname="descr">Setting this prevents intra 4x4 mode in the intra mode decision.</entry>
3081+
</row>
3082+
3083+
<row><entry></entry></row>
3084+
<row id="v4l2-vpx-num-ref-frames">
3085+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES</constant></entry>
3086+
<entry>enum v4l2_vp8_num_ref_frames</entry>
3087+
</row>
3088+
<row><entry spanname="descr">The number of reference pictures for encoding P frames.
3089+
Possible values are:</entry>
3090+
</row>
3091+
<row>
3092+
<entrytbl spanname="descr" cols="2">
3093+
<tbody valign="top">
3094+
<row>
3095+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME</constant></entry>
3096+
<entry>Last encoded frame will be searched</entry>
3097+
</row>
3098+
<row>
3099+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME</constant></entry>
3100+
<entry>Two frames will be searched among the last encoded frame, the golden frame
3101+
and the alternate reference (altref) frame. The encoder implementation will decide which two are chosen.</entry>
3102+
</row>
3103+
<row>
3104+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME</constant></entry>
3105+
<entry>The last encoded frame, the golden frame and the altref frame will be searched.</entry>
3106+
</row>
3107+
</tbody>
3108+
</entrytbl>
3109+
</row>
3110+
3111+
<row><entry></entry></row>
3112+
<row>
3113+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL</constant></entry>
3114+
<entry>integer</entry>
3115+
</row>
3116+
<row><entry spanname="descr">Indicates the loop filter level. The adjustment of the loop
3117+
filter level is done via a delta value against a baseline loop filter value.</entry>
3118+
</row>
3119+
3120+
<row><entry></entry></row>
3121+
<row>
3122+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS</constant></entry>
3123+
<entry>integer</entry>
3124+
</row>
3125+
<row><entry spanname="descr">This parameter affects the loop filter. Anything above
3126+
zero weakens the deblocking effect on the loop filter.</entry>
3127+
</row>
3128+
3129+
<row><entry></entry></row>
3130+
<row>
3131+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD</constant></entry>
3132+
<entry>integer</entry>
3133+
</row>
3134+
<row><entry spanname="descr">Sets the refresh period for the golden frame. The period is defined
3135+
in number of frames. For a value of 'n', every nth frame starting from the first key frame will be taken as a golden frame.
3136+
For eg. for encoding sequence of 0, 1, 2, 3, 4, 5, 6, 7 where the golden frame refresh period is set as 4, the frames
3137+
0, 4, 8 etc will be taken as the golden frames as frame 0 is always a key frame.</entry>
3138+
</row>
3139+
3140+
<row><entry></entry></row>
3141+
<row id="v4l2-vpx-golden-frame-sel">
3142+
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL</constant></entry>
3143+
<entry>enum v4l2_vp8_golden_frame_sel</entry>
3144+
</row>
3145+
<row><entry spanname="descr">Selects the golden frame for encoding.
3146+
Possible values are:</entry>
3147+
</row>
3148+
<row>
3149+
<entrytbl spanname="descr" cols="2">
3150+
<tbody valign="top">
3151+
<row>
3152+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV</constant></entry>
3153+
<entry>Use the (n-2)th frame as a golden frame, current frame index being 'n'.</entry>
3154+
</row>
3155+
<row>
3156+
<entry><constant>V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD</constant></entry>
3157+
<entry>Use the previous specific frame indicated by
3158+
V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a golden frame.</entry>
3159+
</row>
3160+
</tbody>
3161+
</entrytbl>
3162+
</row>
3163+
3164+
<row><entry></entry></row>
3165+
</tbody>
3166+
</tgroup>
3167+
</table>
3168+
3169+
</section>
30123170
</section>
30133171

30143172
<section id="camera-controls">

‎Documentation/DocBook/media/v4l/lirc_device_interface.xml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ describing an IR signal are read from the chardev.</para>
4646
values. Pulses and spaces are only marked implicitly by their position. The
4747
data must start and end with a pulse, therefore, the data must always include
4848
an uneven number of samples. The write function must block until the data has
49-
been transmitted by the hardware.</para>
49+
been transmitted by the hardware. If more data is provided than the hardware
50+
can send, the driver returns EINVAL.</para>
51+
5052
</section>
5153

5254
<section id="lirc_ioctl">
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
<refentry>
2+
<refmeta>
3+
<refentrytitle>V4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M ('NM61')</refentrytitle>
4+
&manvol;
5+
</refmeta>
6+
<refnamediv>
7+
<refname id="V4L2-PIX-FMT-NV16M"><constant>V4L2_PIX_FMT_NV16M</constant></refname>
8+
<refname id="V4L2-PIX-FMT-NV61M"><constant>V4L2_PIX_FMT_NV61M</constant></refname>
9+
<refpurpose>Variation of <constant>V4L2_PIX_FMT_NV16</constant> and <constant>V4L2_PIX_FMT_NV61</constant> with planes
10+
non contiguous in memory. </refpurpose>
11+
</refnamediv>
12+
<refsect1>
13+
<title>Description</title>
14+
15+
<para>This is a multi-planar, two-plane version of the YUV 4:2:0 format.
16+
The three components are separated into two sub-images or planes.
17+
<constant>V4L2_PIX_FMT_NV16M</constant> differs from <constant>V4L2_PIX_FMT_NV16
18+
</constant> in that the two planes are non-contiguous in memory, i.e. the chroma
19+
plane does not necessarily immediately follows the luma plane.
20+
The luminance data occupies the first plane. The Y plane has one byte per pixel.
21+
In the second plane there is chrominance data with alternating chroma samples.
22+
The CbCr plane is the same width and height, in bytes, as the Y plane.
23+
Each CbCr pair belongs to four pixels. For example,
24+
Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
25+
Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
26+
Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.
27+
<constant>V4L2_PIX_FMT_NV61M</constant> is the same as <constant>V4L2_PIX_FMT_NV16M</constant>
28+
except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para>
29+
30+
<para><constant>V4L2_PIX_FMT_NV16M</constant> and
31+
<constant>V4L2_PIX_FMT_NV61M</constant> are intended to be used only in drivers
32+
and applications that support the multi-planar API, described in
33+
<xref linkend="planar-apis"/>. </para>
34+
35+
<example>
36+
<title><constant>V4L2_PIX_FMT_NV16M</constant> 4 &times; 4 pixel image</title>
37+
38+
<formalpara>
39+
<title>Byte Order.</title>
40+
<para>Each cell is one byte.
41+
<informaltable frame="none">
42+
<tgroup cols="5" align="center">
43+
<colspec align="left" colwidth="2*" />
44+
<tbody valign="top">
45+
<row>
46+
<entry>start0&nbsp;+&nbsp;0:</entry>
47+
<entry>Y'<subscript>00</subscript></entry>
48+
<entry>Y'<subscript>01</subscript></entry>
49+
<entry>Y'<subscript>02</subscript></entry>
50+
<entry>Y'<subscript>03</subscript></entry>
51+
</row>
52+
<row>
53+
<entry>start0&nbsp;+&nbsp;4:</entry>
54+
<entry>Y'<subscript>10</subscript></entry>
55+
<entry>Y'<subscript>11</subscript></entry>
56+
<entry>Y'<subscript>12</subscript></entry>
57+
<entry>Y'<subscript>13</subscript></entry>
58+
</row>
59+
<row>
60+
<entry>start0&nbsp;+&nbsp;8:</entry>
61+
<entry>Y'<subscript>20</subscript></entry>
62+
<entry>Y'<subscript>21</subscript></entry>
63+
<entry>Y'<subscript>22</subscript></entry>
64+
<entry>Y'<subscript>23</subscript></entry>
65+
</row>
66+
<row>
67+
<entry>start0&nbsp;+&nbsp;12:</entry>
68+
<entry>Y'<subscript>30</subscript></entry>
69+
<entry>Y'<subscript>31</subscript></entry>
70+
<entry>Y'<subscript>32</subscript></entry>
71+
<entry>Y'<subscript>33</subscript></entry>
72+
</row>
73+
<row>
74+
<entry></entry>
75+
</row>
76+
<row>
77+
<entry>start1&nbsp;+&nbsp;0:</entry>
78+
<entry>Cb<subscript>00</subscript></entry>
79+
<entry>Cr<subscript>00</subscript></entry>
80+
<entry>Cb<subscript>02</subscript></entry>
81+
<entry>Cr<subscript>02</subscript></entry>
82+
</row>
83+
<row>
84+
<entry>start1&nbsp;+&nbsp;4:</entry>
85+
<entry>Cb<subscript>10</subscript></entry>
86+
<entry>Cr<subscript>10</subscript></entry>
87+
<entry>Cb<subscript>12</subscript></entry>
88+
<entry>Cr<subscript>12</subscript></entry>
89+
</row>
90+
<row>
91+
<entry>start1&nbsp;+&nbsp;8:</entry>
92+
<entry>Cb<subscript>20</subscript></entry>
93+
<entry>Cr<subscript>20</subscript></entry>
94+
<entry>Cb<subscript>22</subscript></entry>
95+
<entry>Cr<subscript>22</subscript></entry>
96+
</row>
97+
<row>
98+
<entry>start1&nbsp;+&nbsp;12:</entry>
99+
<entry>Cb<subscript>30</subscript></entry>
100+
<entry>Cr<subscript>30</subscript></entry>
101+
<entry>Cb<subscript>32</subscript></entry>
102+
<entry>Cr<subscript>32</subscript></entry>
103+
</row>
104+
</tbody>
105+
</tgroup>
106+
</informaltable>
107+
</para>
108+
</formalpara>
109+
110+
<formalpara>
111+
<title>Color Sample Location.</title>
112+
<para>
113+
<informaltable frame="none">
114+
<tgroup cols="7" align="center">
115+
<tbody valign="top">
116+
<row>
117+
<entry></entry>
118+
<entry>0</entry><entry></entry><entry>1</entry><entry></entry>
119+
<entry>2</entry><entry></entry><entry>3</entry>
120+
</row>
121+
<row>
122+
<entry>0</entry>
123+
<entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
124+
<entry>Y</entry><entry></entry><entry>Y</entry>
125+
</row>
126+
<row>
127+
<entry></entry>
128+
<entry></entry><entry>C</entry><entry></entry><entry></entry>
129+
<entry></entry><entry>C</entry><entry></entry>
130+
</row>
131+
<row>
132+
<entry>1</entry>
133+
<entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
134+
<entry>Y</entry><entry></entry><entry>Y</entry>
135+
</row>
136+
<row>
137+
<entry></entry>
138+
<entry></entry><entry>C</entry><entry></entry><entry></entry>
139+
<entry></entry><entry>C</entry><entry></entry>
140+
</row>
141+
<row>
142+
<entry></entry>
143+
</row>
144+
<row>
145+
<entry>2</entry>
146+
<entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
147+
<entry>Y</entry><entry></entry><entry>Y</entry>
148+
</row>
149+
<row>
150+
<entry></entry>
151+
<entry></entry><entry>C</entry><entry></entry><entry></entry>
152+
<entry></entry><entry>C</entry><entry></entry>
153+
</row>
154+
<row>
155+
<entry>3</entry>
156+
<entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
157+
<entry>Y</entry><entry></entry><entry>Y</entry>
158+
</row>
159+
<row>
160+
<entry></entry>
161+
<entry></entry><entry>C</entry><entry></entry><entry></entry>
162+
<entry></entry><entry>C</entry><entry></entry>
163+
</row>
164+
</tbody>
165+
</tgroup>
166+
</informaltable>
167+
</para>
168+
</formalpara>
169+
</example>
170+
</refsect1>
171+
</refentry>

‎Documentation/DocBook/media/v4l/pixfmt.xml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ clamp (double x)
391391
else return r;
392392
}
393393

394-
y1 = (255 / 219.0) * (Y1 - 16);
395-
pb = (255 / 224.0) * (Cb - 128);
396-
pr = (255 / 224.0) * (Cr - 128);
394+
y1 = (Y1 - 16) / 219.0;
395+
pb = (Cb - 128) / 224.0;
396+
pr = (Cr - 128) / 224.0;
397397

398398
r = 1.0 * y1 + 0 * pb + 1.402 * pr;
399399
g = 1.0 * y1 - 0.344 * pb - 0.714 * pr;
@@ -718,6 +718,7 @@ information.</para>
718718
&sub-nv12m;
719719
&sub-nv12mt;
720720
&sub-nv16;
721+
&sub-nv16m;
721722
&sub-nv24;
722723
&sub-m420;
723724
</section>

0 commit comments

Comments
 (0)