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_payoad { 85 unsigned int frame_qp; 86 }; 87 struct msm_vidc_frame_qp_payload { 88 unsigned int frame_qp; 89 }; 90 struct msm_vidc_frame_bits_info_payload { 91 unsigned int frame_bits; 92 unsigned int header_bits; 93 }; 94 struct msm_vidc_s3d_frame_packing_payload { 95 unsigned int fpa_id; 96 unsigned int cancel_flag; 97 unsigned int fpa_type; 98 unsigned int quin_cunx_flag; 99 unsigned int content_interprtation_type; 100 unsigned int spatial_flipping_flag; 101 unsigned int frame0_flipped_flag; 102 unsigned int field_views_flag; 103 unsigned int current_frame_is_frame0_flag; 104 unsigned int frame0_self_contained_flag; 105 unsigned int frame1_self_contained_flag; 106 unsigned int frame0_graid_pos_x; 107 unsigned int frame0_graid_pos_y; 108 unsigned int frame1_graid_pos_x; 109 unsigned int frame1_graid_pos_y; 110 unsigned int fpa_reserved_byte; 111 unsigned int fpa_repetition_period; 112 unsigned int fpa_extension_flag; 113 }; 114 115 enum msm_vidc_extradata_type { 116 MSM_VIDC_EXTRADATA_NONE = 0x00000000, 117 MSM_VIDC_EXTRADATA_MB_QUANTIZATION = 0x00000001, 118 MSM_VIDC_EXTRADATA_INTERLACE_VIDEO = 0x00000002, 119 MSM_VIDC_EXTRADATA_VC1_FRAMEDISP = 0x00000003, 120 MSM_VIDC_EXTRADATA_VC1_SEQDISP = 0x00000004, 121 MSM_VIDC_EXTRADATA_TIMESTAMP = 0x00000005, 122 MSM_VIDC_EXTRADATA_S3D_FRAME_PACKING = 0x00000006, 123 MSM_VIDC_EXTRADATA_FRAME_RATE = 0x00000007, 124 MSM_VIDC_EXTRADATA_PANSCAN_WINDOW = 0x00000008, 125 MSM_VIDC_EXTRADATA_RECOVERY_POINT_SEI = 0x00000009, 126 MSM_VIDC_EXTRADATA_MPEG2_SEQDISP = 0x0000000D, 127 MSM_VIDC_EXTRADATA_STREAM_USERDATA = 0x0000000E, 128 MSM_VIDC_EXTRADATA_FRAME_QP = 0x0000000F, 129 MSM_VIDC_EXTRADATA_FRAME_BITS_INFO = 0x00000010, 130 MSM_VIDC_EXTRADATA_INPUT_CROP = 0x0700000E, 131 MSM_VIDC_EXTRADATA_DIGITAL_ZOOM = 0x07000010, 132 MSM_VIDC_EXTRADATA_MULTISLICE_INFO = 0x7F100000, 133 MSM_VIDC_EXTRADATA_NUM_CONCEALED_MB = 0x7F100001, 134 MSM_VIDC_EXTRADATA_INDEX = 0x7F100002, 135 MSM_VIDC_EXTRADATA_ASPECT_RATIO = 0x7F100003, 136 MSM_VIDC_EXTRADATA_METADATA_LTR = 0x7F100004, 137 MSM_VIDC_EXTRADATA_METADATA_FILLER = 0x7FE00002, 138 MSM_VIDC_EXTRADATA_METADATA_MBI = 0x7F100005, 139 }; 140 enum msm_vidc_interlace_type { 141 MSM_VIDC_INTERLACE_FRAME_PROGRESSIVE = 0x01, 142 MSM_VIDC_INTERLACE_INTERLEAVE_FRAME_TOPFIELDFIRST = 0x02, 143 MSM_VIDC_INTERLACE_INTERLEAVE_FRAME_BOTTOMFIELDFIRST = 0x04, 144 MSM_VIDC_INTERLACE_FRAME_TOPFIELDFIRST = 0x08, 145 MSM_VIDC_INTERLACE_FRAME_BOTTOMFIELDFIRST = 0x10, 146 }; 147 enum msm_vidc_recovery_sei { 148 MSM_VIDC_FRAME_RECONSTRUCTION_INCORRECT = 0x0, 149 MSM_VIDC_FRAME_RECONSTRUCTION_CORRECT = 0x01, 150 MSM_VIDC_FRAME_RECONSTRUCTION_APPROXIMATELY_CORRECT = 0x02, 151 }; 152 enum msm_vidc_userdata_type { 153 MSM_VIDC_USERDATA_TYPE_FRAME = 0x1, 154 MSM_VIDC_USERDATA_TYPE_TOP_FIELD = 0x2, 155 MSM_VIDC_USERDATA_TYPE_BOTTOM_FIELD = 0x3, 156 }; 157 #endif 158