History

media: mpeg2-ctrls.h: move MPEG2 state controls to non-public header

The MPEG2 state controls for the cedrus stateless MPEG2 driver are not yet stable. Move them out of the public headers into media/mpeg2-ctrls.h. Eventually, once this has stabilized, they will be moved back to the public headers. Unfortunately I had to cast the control type to a u32 in two switch statements to prevent a compiler warning about a control type define not being part of the enum.

Hans Verkuil committed 7 years ago

Commit 95140631 parent daa3fc45 files · +94 −74Browse files

Showing the changes to include/uapi/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/v4l2-controls.h +0 −68
  2. include/uapi/linux/videodev2.h +0 −4
include/uapi/linux/v4l2-controls.h+0−68
@@ -404,9 +404,6 @@ enum v4l2_mpeg_video_multi_slice_mode { · 403 unmodified lines
404404 #define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228)
405405 #define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229)
406406
407−#define V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (V4L2_CID_MPEG_BASE+250)
408−#define V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION (V4L2_CID_MPEG_BASE+251)
409−
410407 #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
411408 #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
412409 #define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302)
@@ -1097,69 +1094,4 @@ enum v4l2_detect_md_mode { · 684 unmodified lines
10971094 #define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3)
10981095 #define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4)
10991096
1100−#define V4L2_MPEG2_PICTURE_CODING_TYPE_I 1
1101−#define V4L2_MPEG2_PICTURE_CODING_TYPE_P 2
1102−#define V4L2_MPEG2_PICTURE_CODING_TYPE_B 3
1103−#define V4L2_MPEG2_PICTURE_CODING_TYPE_D 4
1104−
1105−struct v4l2_mpeg2_sequence {
1106− /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence header */
1107− __u16 horizontal_size;
1108− __u16 vertical_size;
1109− __u32 vbv_buffer_size;
1110−
1111− /* ISO/IEC 13818-2, ITU-T Rec. H.262: Sequence extension */
1112− __u8 profile_and_level_indication;
1113− __u8 progressive_sequence;
1114− __u8 chroma_format;
1115− __u8 pad;
1116−};
1117−
1118−struct v4l2_mpeg2_picture {
1119− /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture header */
1120− __u8 picture_coding_type;
1121−
1122− /* ISO/IEC 13818-2, ITU-T Rec. H.262: Picture coding extension */
1123− __u8 f_code[2][2];
1124− __u8 intra_dc_precision;
1125− __u8 picture_structure;
1126− __u8 top_field_first;
1127− __u8 frame_pred_frame_dct;
1128− __u8 concealment_motion_vectors;
1129− __u8 q_scale_type;
1130− __u8 intra_vlc_format;
1131− __u8 alternate_scan;
1132− __u8 repeat_first_field;
1133− __u8 progressive_frame;
1134− __u8 pad;
1135−};
1136−
1137−struct v4l2_ctrl_mpeg2_slice_params {
1138− __u32 bit_size;
1139− __u32 data_bit_offset;
1140−
1141− struct v4l2_mpeg2_sequence sequence;
1142− struct v4l2_mpeg2_picture picture;
1143−
1144− /* ISO/IEC 13818-2, ITU-T Rec. H.262: Slice */
1145− __u8 quantiser_scale_code;
1146−
1147− __u8 backward_ref_index;
1148− __u8 forward_ref_index;
1149− __u8 pad;
1150−};
1151−
1152−struct v4l2_ctrl_mpeg2_quantization {
1153− /* ISO/IEC 13818-2, ITU-T Rec. H.262: Quant matrix extension */
1154− __u8 load_intra_quantiser_matrix;
1155− __u8 load_non_intra_quantiser_matrix;
1156− __u8 load_chroma_intra_quantiser_matrix;
1157− __u8 load_chroma_non_intra_quantiser_matrix;
1158−
1159− __u8 intra_quantiser_matrix[64];
1160− __u8 non_intra_quantiser_matrix[64];
1161− __u8 chroma_intra_quantiser_matrix[64];
1162− __u8 chroma_non_intra_quantiser_matrix[64];
1163−};
1164−
11651097 #endif
include/uapi/linux/videodev2.h+0−4
@@ -1622,8 +1622,6 @@ struct v4l2_ext_control { · 1621 unmodified lines
16221622 __u8 __user *p_u8;
16231623 __u16 __user *p_u16;
16241624 __u32 __user *p_u32;
1625− struct v4l2_ctrl_mpeg2_slice_params __user *p_mpeg2_slice_params;
1626− struct v4l2_ctrl_mpeg2_quantization __user *p_mpeg2_quantization;
16271625 void __user *ptr;
16281626 };
16291627 } __attribute__ ((packed));
@@ -1669,8 +1667,6 @@ enum v4l2_ctrl_type { · 39 unmodified lines
16691667 V4L2_CTRL_TYPE_U8 = 0x0100,
16701668 V4L2_CTRL_TYPE_U16 = 0x0101,
16711669 V4L2_CTRL_TYPE_U32 = 0x0102,
1672− V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS = 0x0103,
1673− V4L2_CTRL_TYPE_MPEG2_QUANTIZATION = 0x0104,
16741670 };
16751671
16761672 /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */