• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __MSM_VIDC_H__
2 #define __MSM_VIDC_H__
3 
4 #include <linux/types.h>
5 
6 struct msm_vidc_extradata_header {
7 	unsigned int size;
8 	unsigned int:32; /** Keeping binary compatibility */
9 	unsigned int:32; /* with firmware and OpenMAX IL **/
10 	unsigned int type; /* msm_vidc_extradata_type */
11 	unsigned int data_size;
12 	unsigned char data[1];
13 };
14 struct msm_vidc_interlace_payload {
15 	unsigned int format;
16 };
17 struct msm_vidc_framerate_payload {
18 	unsigned int frame_rate;
19 };
20 struct msm_vidc_ts_payload {
21 	unsigned int timestamp_lo;
22 	unsigned int timestamp_hi;
23 };
24 struct msm_vidc_concealmb_payload {
25 	unsigned int num_mbs;
26 };
27 struct msm_vidc_recoverysei_payload {
28 	unsigned int flags;
29 };
30 struct msm_vidc_aspect_ratio_payload {
31 	unsigned int size;
32 	unsigned int version;
33 	unsigned int port_index;
34 	unsigned int aspect_width;
35 	unsigned int aspect_height;
36 };
37 struct msm_vidc_mpeg2_seqdisp_payload {
38 	unsigned int video_format;
39 	unsigned int color_descp;
40 	unsigned int color_primaries;
41 	unsigned int transfer_char;
42 	unsigned int matrix_coeffs;
43 	unsigned int disp_width;
44 	unsigned int disp_height;
45 };
46 struct msm_vidc_input_crop_payload {
47 	unsigned int size;
48 	unsigned int version;
49 	unsigned int port_index;
50 	unsigned int left;
51 	unsigned int top;
52 	unsigned int width;
53 	unsigned int height;
54 };
55 struct msm_vidc_digital_zoom_payload {
56 	unsigned int size;
57 	unsigned int version;
58 	unsigned int port_index;
59 	unsigned int zoom_width;
60 	unsigned int zoom_height;
61 };
62 struct msm_vidc_extradata_index {
63 	unsigned int type;
64 	union {
65 		struct msm_vidc_input_crop_payload input_crop;
66 		struct msm_vidc_digital_zoom_payload digital_zoom;
67 		struct msm_vidc_aspect_ratio_payload aspect_ratio;
68 	};
69 };
70 struct msm_vidc_panscan_window {
71 	unsigned int panscan_height_offset;
72 	unsigned int panscan_width_offset;
73 	unsigned int panscan_window_width;
74 	unsigned int panscan_window_height;
75 };
76 struct msm_vidc_panscan_window_payload {
77 	unsigned int num_panscan_windows;
78 	struct msm_vidc_panscan_window wnd[1];
79 };
80 struct msm_vidc_stream_userdata_payload {
81 	unsigned int type;
82 	unsigned int data[1];
83 };
84 struct msm_vidc_frame_qp_payload {
85 	unsigned int frame_qp;
86 };
87 struct msm_vidc_frame_bits_info_payload {
88 	unsigned int frame_bits;
89 	unsigned int header_bits;
90 };
91 struct msm_vidc_s3d_frame_packing_payload {
92 	unsigned int fpa_id;
93 	unsigned int cancel_flag;
94 	unsigned int fpa_type;
95 	unsigned int quin_cunx_flag;
96 	unsigned int content_interprtation_type;
97 	unsigned int spatial_flipping_flag;
98 	unsigned int frame0_flipped_flag;
99 	unsigned int field_views_flag;
100 	unsigned int current_frame_is_frame0_flag;
101 	unsigned int frame0_self_contained_flag;
102 	unsigned int frame1_self_contained_flag;
103 	unsigned int frame0_graid_pos_x;
104 	unsigned int frame0_graid_pos_y;
105 	unsigned int frame1_graid_pos_x;
106 	unsigned int frame1_graid_pos_y;
107 	unsigned int fpa_reserved_byte;
108 	unsigned int fpa_repetition_period;
109 	unsigned int fpa_extension_flag;
110 };
111 
112 struct msm_vidc_vui_display_info_payload {
113 	unsigned int video_signal_present_flag;
114 	unsigned int video_format;
115 	unsigned int bit_depth_y;
116 	unsigned int bit_depth_c;
117 	unsigned int video_full_range_flag;
118 	unsigned int color_description_present_flag;
119 	unsigned int color_primaries;
120 	unsigned int transfer_characteristics;
121 	unsigned int matrix_coefficients;
122 	unsigned int chroma_location_info_present_flag;
123 	unsigned int chroma_format_idc;
124 	unsigned int separate_color_plane_flag;
125 	unsigned int chroma_sample_loc_type_top_field;
126 	unsigned int chroma_sample_loc_type_bottom_field;
127 };
128 
129 enum msm_vidc_extradata_type {
130 	MSM_VIDC_EXTRADATA_NONE = 0x00000000,
131 	MSM_VIDC_EXTRADATA_MB_QUANTIZATION = 0x00000001,
132 	MSM_VIDC_EXTRADATA_INTERLACE_VIDEO = 0x00000002,
133 	MSM_VIDC_EXTRADATA_VC1_FRAMEDISP = 0x00000003,
134 	MSM_VIDC_EXTRADATA_VC1_SEQDISP = 0x00000004,
135 	MSM_VIDC_EXTRADATA_TIMESTAMP = 0x00000005,
136 	MSM_VIDC_EXTRADATA_S3D_FRAME_PACKING = 0x00000006,
137 	MSM_VIDC_EXTRADATA_FRAME_RATE = 0x00000007,
138 	MSM_VIDC_EXTRADATA_PANSCAN_WINDOW = 0x00000008,
139 	MSM_VIDC_EXTRADATA_RECOVERY_POINT_SEI = 0x00000009,
140 	MSM_VIDC_EXTRADATA_MPEG2_SEQDISP = 0x0000000D,
141 	MSM_VIDC_EXTRADATA_STREAM_USERDATA = 0x0000000E,
142 	MSM_VIDC_EXTRADATA_FRAME_QP = 0x0000000F,
143 	MSM_VIDC_EXTRADATA_FRAME_BITS_INFO = 0x00000010,
144 	MSM_VIDC_EXTRADATA_INPUT_CROP = 0x0700000E,
145 	MSM_VIDC_EXTRADATA_DIGITAL_ZOOM = 0x07000010,
146 	MSM_VIDC_EXTRADATA_MULTISLICE_INFO = 0x7F100000,
147 	MSM_VIDC_EXTRADATA_NUM_CONCEALED_MB = 0x7F100001,
148 	MSM_VIDC_EXTRADATA_INDEX = 0x7F100002,
149 	MSM_VIDC_EXTRADATA_ASPECT_RATIO = 0x7F100003,
150 	MSM_VIDC_EXTRADATA_METADATA_LTR = 0x7F100004,
151 	MSM_VIDC_EXTRADATA_METADATA_FILLER = 0x7FE00002,
152 	MSM_VIDC_EXTRADATA_METADATA_MBI = 0x7F100005,
153 	MSM_VIDC_EXTRADATA_VUI_DISPLAY_INFO = 0x7F100006,
154 };
155 enum msm_vidc_interlace_type {
156 	MSM_VIDC_INTERLACE_FRAME_PROGRESSIVE = 0x01,
157 	MSM_VIDC_INTERLACE_INTERLEAVE_FRAME_TOPFIELDFIRST = 0x02,
158 	MSM_VIDC_INTERLACE_INTERLEAVE_FRAME_BOTTOMFIELDFIRST = 0x04,
159 	MSM_VIDC_INTERLACE_FRAME_TOPFIELDFIRST = 0x08,
160 	MSM_VIDC_INTERLACE_FRAME_BOTTOMFIELDFIRST = 0x10,
161 };
162 enum msm_vidc_recovery_sei {
163 	MSM_VIDC_FRAME_RECONSTRUCTION_INCORRECT = 0x0,
164 	MSM_VIDC_FRAME_RECONSTRUCTION_CORRECT = 0x01,
165 	MSM_VIDC_FRAME_RECONSTRUCTION_APPROXIMATELY_CORRECT = 0x02,
166 };
167 enum msm_vidc_userdata_type {
168 	MSM_VIDC_USERDATA_TYPE_FRAME = 0x1,
169 	MSM_VIDC_USERDATA_TYPE_TOP_FIELD = 0x2,
170 	MSM_VIDC_USERDATA_TYPE_BOTTOM_FIELD = 0x3,
171 };
172 #endif
173