diff options
| author | Kamil Debski <k.debski@samsung.com> | 2011-07-04 12:25:50 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:55:39 -0400 |
| commit | 4fa64dae8c55ea9d3be4eb5f23ad0c9a60fa6d95 (patch) | |
| tree | fff70142edbe08004cd2d1ddb741de56a2004d02 | |
| parent | 0f4272188dd1c815d9d7f05d593474a67da76594 (diff) | |
[media] v4l: add fourcc definitions for compressed formats
Add fourcc definitions and documentation for the following
compressed formats: H264, H264 without start codes,
MPEG1/2/4 ES, XVID, VC1 Annex G and Annex L compliant.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| -rw-r--r-- | Documentation/DocBook/media/v4l/controls.xml | 7 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt.xml | 47 | ||||
| -rw-r--r-- | include/linux/videodev2.h | 17 |
3 files changed, 64 insertions, 7 deletions
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index dfed3a8d18a8..e2046754e871 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml | |||
| @@ -678,7 +678,8 @@ caption of a Tab page in a GUI, for example.</entry> | |||
| 678 | </row><row><entry spanname="descr">The MPEG-1, -2 or -4 | 678 | </row><row><entry spanname="descr">The MPEG-1, -2 or -4 |
| 679 | output stream type. One cannot assume anything here. Each hardware | 679 | output stream type. One cannot assume anything here. Each hardware |
| 680 | MPEG encoder tends to support different subsets of the available MPEG | 680 | MPEG encoder tends to support different subsets of the available MPEG |
| 681 | stream types. The currently defined stream types are:</entry> | 681 | stream types. This control is specific to multiplexed MPEG streams. |
| 682 | The currently defined stream types are:</entry> | ||
| 682 | </row> | 683 | </row> |
| 683 | <row> | 684 | <row> |
| 684 | <entrytbl spanname="descr" cols="2"> | 685 | <entrytbl spanname="descr" cols="2"> |
| @@ -808,6 +809,7 @@ frequency. Possible values are:</entry> | |||
| 808 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant> </entry> | 809 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant> </entry> |
| 809 | <entry>enum v4l2_mpeg_audio_encoding</entry> | 810 | <entry>enum v4l2_mpeg_audio_encoding</entry> |
| 810 | </row><row><entry spanname="descr">MPEG Audio encoding. | 811 | </row><row><entry spanname="descr">MPEG Audio encoding. |
| 812 | This control is specific to multiplexed MPEG streams. | ||
| 811 | Possible values are:</entry> | 813 | Possible values are:</entry> |
| 812 | </row> | 814 | </row> |
| 813 | <row> | 815 | <row> |
| @@ -1258,7 +1260,8 @@ and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry> | |||
| 1258 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant> </entry> | 1260 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant> </entry> |
| 1259 | <entry>enum v4l2_mpeg_video_encoding</entry> | 1261 | <entry>enum v4l2_mpeg_video_encoding</entry> |
| 1260 | </row><row><entry spanname="descr">MPEG Video encoding | 1262 | </row><row><entry spanname="descr">MPEG Video encoding |
| 1261 | method. Possible values are:</entry> | 1263 | method. This control is specific to multiplexed MPEG streams. |
| 1264 | Possible values are:</entry> | ||
| 1262 | </row> | 1265 | </row> |
| 1263 | <row> | 1266 | <row> |
| 1264 | <entrytbl spanname="descr" cols="2"> | 1267 | <entrytbl spanname="descr" cols="2"> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 389432d780a7..2ff6b7776d7f 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
| @@ -741,10 +741,55 @@ information.</para> | |||
| 741 | <row id="V4L2-PIX-FMT-MPEG"> | 741 | <row id="V4L2-PIX-FMT-MPEG"> |
| 742 | <entry><constant>V4L2_PIX_FMT_MPEG</constant></entry> | 742 | <entry><constant>V4L2_PIX_FMT_MPEG</constant></entry> |
| 743 | <entry>'MPEG'</entry> | 743 | <entry>'MPEG'</entry> |
| 744 | <entry>MPEG stream. The actual format is determined by | 744 | <entry>MPEG multiplexed stream. The actual format is determined by |
| 745 | extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see | 745 | extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see |
| 746 | <xref linkend="mpeg-control-id" />.</entry> | 746 | <xref linkend="mpeg-control-id" />.</entry> |
| 747 | </row> | 747 | </row> |
| 748 | <row id="V4L2-PIX-FMT-H264"> | ||
| 749 | <entry><constant>V4L2_PIX_FMT_H264</constant></entry> | ||
| 750 | <entry>'H264'</entry> | ||
| 751 | <entry>H264 video elementary stream with start codes.</entry> | ||
| 752 | </row> | ||
| 753 | <row id="V4L2-PIX-FMT-H264-NO-SC"> | ||
| 754 | <entry><constant>V4L2_PIX_FMT_H264_NO_SC</constant></entry> | ||
| 755 | <entry>'AVC1'</entry> | ||
| 756 | <entry>H264 video elementary stream without start codes.</entry> | ||
| 757 | </row> | ||
| 758 | <row id="V4L2-PIX-FMT-H263"> | ||
| 759 | <entry><constant>V4L2_PIX_FMT_H263</constant></entry> | ||
| 760 | <entry>'H263'</entry> | ||
| 761 | <entry>H263 video elementary stream.</entry> | ||
| 762 | </row> | ||
| 763 | <row id="V4L2-PIX-FMT-MPEG1"> | ||
| 764 | <entry><constant>V4L2_PIX_FMT_MPEG1</constant></entry> | ||
| 765 | <entry>'MPG1'</entry> | ||
| 766 | <entry>MPEG1 video elementary stream.</entry> | ||
| 767 | </row> | ||
| 768 | <row id="V4L2-PIX-FMT-MPEG2"> | ||
| 769 | <entry><constant>V4L2_PIX_FMT_MPEG2</constant></entry> | ||
| 770 | <entry>'MPG2'</entry> | ||
| 771 | <entry>MPEG2 video elementary stream.</entry> | ||
| 772 | </row> | ||
| 773 | <row id="V4L2-PIX-FMT-MPEG4"> | ||
| 774 | <entry><constant>V4L2_PIX_FMT_MPEG4</constant></entry> | ||
| 775 | <entry>'MPG4'</entry> | ||
| 776 | <entry>MPEG4 video elementary stream.</entry> | ||
| 777 | </row> | ||
| 778 | <row id="V4L2-PIX-FMT-XVID"> | ||
| 779 | <entry><constant>V4L2_PIX_FMT_XVID</constant></entry> | ||
| 780 | <entry>'XVID'</entry> | ||
| 781 | <entry>Xvid video elementary stream.</entry> | ||
| 782 | </row> | ||
| 783 | <row id="V4L2-PIX-FMT-VC1-ANNEX-G"> | ||
| 784 | <entry><constant>V4L2_PIX_FMT_VC1_ANNEX_G</constant></entry> | ||
| 785 | <entry>'VC1G'</entry> | ||
| 786 | <entry>VC1, SMPTE 421M Annex G compliant stream.</entry> | ||
| 787 | </row> | ||
| 788 | <row id="V4L2-PIX-FMT-VC1-ANNEX-L"> | ||
| 789 | <entry><constant>V4L2_PIX_FMT_VC1_ANNEX_L</constant></entry> | ||
| 790 | <entry>'VC1L'</entry> | ||
| 791 | <entry>VC1, SMPTE 421M Annex L compliant stream.</entry> | ||
| 792 | </row> | ||
| 748 | </tbody> | 793 | </tbody> |
| 749 | </tgroup> | 794 | </tgroup> |
| 750 | </table> | 795 | </table> |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 8b1224c1c536..cb22a2c7a467 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -376,7 +376,16 @@ struct v4l2_pix_format { | |||
| 376 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ | 376 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ |
| 377 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ | 377 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ |
| 378 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ | 378 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ |
| 379 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ | 379 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ |
| 380 | #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ | ||
| 381 | #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ | ||
| 382 | #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ | ||
| 383 | #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ | ||
| 384 | #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ | ||
| 385 | #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 ES */ | ||
| 386 | #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ | ||
| 387 | #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ | ||
| 388 | #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ | ||
| 380 | 389 | ||
| 381 | /* Vendor-specific formats */ | 390 | /* Vendor-specific formats */ |
| 382 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | 391 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ |
| @@ -1154,7 +1163,7 @@ enum v4l2_colorfx { | |||
| 1154 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1163 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
| 1155 | #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) | 1164 | #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) |
| 1156 | 1165 | ||
| 1157 | /* MPEG streams */ | 1166 | /* MPEG streams, specific to multiplexed streams */ |
| 1158 | #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) | 1167 | #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) |
| 1159 | enum v4l2_mpeg_stream_type { | 1168 | enum v4l2_mpeg_stream_type { |
| 1160 | V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ | 1169 | V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ |
| @@ -1176,7 +1185,7 @@ enum v4l2_mpeg_stream_vbi_fmt { | |||
| 1176 | V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ | 1185 | V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ |
| 1177 | }; | 1186 | }; |
| 1178 | 1187 | ||
| 1179 | /* MPEG audio */ | 1188 | /* MPEG audio controls specific to multiplexed streams */ |
| 1180 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) | 1189 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) |
| 1181 | enum v4l2_mpeg_audio_sampling_freq { | 1190 | enum v4l2_mpeg_audio_sampling_freq { |
| 1182 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, | 1191 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, |
| @@ -1292,7 +1301,7 @@ enum v4l2_mpeg_audio_ac3_bitrate { | |||
| 1292 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, | 1301 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, |
| 1293 | }; | 1302 | }; |
| 1294 | 1303 | ||
| 1295 | /* MPEG video */ | 1304 | /* MPEG video controls specific to multiplexed streams */ |
| 1296 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | 1305 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) |
| 1297 | enum v4l2_mpeg_video_encoding { | 1306 | enum v4l2_mpeg_video_encoding { |
| 1298 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, | 1307 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, |
