WIP FPC-III support
[linux/fpc-iii.git] / include / media / mpeg2-ctrls.h
blob2a4ae6701166ec55b5e455bd99df0d67697c9f96
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * These are the MPEG2 state controls for use with stateless MPEG-2
4 * codec drivers.
6 * It turns out that these structs are not stable yet and will undergo
7 * more changes. So keep them private until they are stable and ready to
8 * become part of the official public API.
9 */
11 #ifndef _MPEG2_CTRLS_H_
12 #define _MPEG2_CTRLS_H_
14 #define V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (V4L2_CID_CODEC_BASE+250)
15 #define V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (V4L2_CID_CODEC_BASE+251)
17 /* enum v4l2_ctrl_type type values */
18 #define V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS 0x0103
19 #define V4L2_CTRL_TYPE_MPEG2_QUANTIZATION 0x0104
21 #define V4L2_MPEG2_PICTURE_CODING_TYPE_I 1
22 #define V4L2_MPEG2_PICTURE_CODING_TYPE_P 2
23 #define V4L2_MPEG2_PICTURE_CODING_TYPE_B 3
24 #define V4L2_MPEG2_PICTURE_CODING_TYPE_D 4
26 struct v4l2_mpeg2_sequence {
27 /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence header */
28 __u16 horizontal_size;
29 __u16 vertical_size;
30 __u32 vbv_buffer_size;
32 /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence extension */
33 __u16 profile_and_level_indication;
34 __u8 progressive_sequence;
35 __u8 chroma_format;
38 struct v4l2_mpeg2_picture {
39 /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture header */
40 __u8 picture_coding_type;
42 /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture coding extension */
43 __u8 f_code[2][2];
44 __u8 intra_dc_precision;
45 __u8 picture_structure;
46 __u8 top_field_first;
47 __u8 frame_pred_frame_dct;
48 __u8 concealment_motion_vectors;
49 __u8 q_scale_type;
50 __u8 intra_vlc_format;
51 __u8 alternate_scan;
52 __u8 repeat_first_field;
53 __u16 progressive_frame;
56 struct v4l2_ctrl_mpeg2_slice_params {
57 __u32 bit_size;
58 __u32 data_bit_offset;
59 __u64 backward_ref_ts;
60 __u64 forward_ref_ts;
62 struct v4l2_mpeg2_sequence sequence;
63 struct v4l2_mpeg2_picture picture;
65 /* ISO/IEC 13818-2, ITU-T Rec. H.262: Slice */
66 __u32 quantiser_scale_code;
69 struct v4l2_ctrl_mpeg2_quantization {
70 /* ISO/IEC 13818-2, ITU-T Rec. H.262: Quant matrix extension */
71 __u8 load_intra_quantiser_matrix;
72 __u8 load_non_intra_quantiser_matrix;
73 __u8 load_chroma_intra_quantiser_matrix;
74 __u8 load_chroma_non_intra_quantiser_matrix;
76 __u8 intra_quantiser_matrix[64];
77 __u8 non_intra_quantiser_matrix[64];
78 __u8 chroma_intra_quantiser_matrix[64];
79 __u8 chroma_non_intra_quantiser_matrix[64];
82 #endif