]> bbs.cooldavid.org Git - net-next-2.6.git/blob - drivers/staging/dream/include/mach/qdsp5/qdsp5venccmdi.h
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
[net-next-2.6.git] / drivers / staging / dream / include / mach / qdsp5 / qdsp5venccmdi.h
1 #ifndef QDSP5VIDENCCMDI_H
2 #define QDSP5VIDENCCMDI_H
3
4 /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
5
6     V I D E O  E N C O D E R  I N T E R N A L  C O M M A N D S
7
8 GENERAL DESCRIPTION
9   This file contains defintions of format blocks of commands
10   that are accepted by VIDENC Task
11
12 REFERENCES
13   None
14
15 EXTERNALIZED FUNCTIONS
16   None
17
18 Copyright(c) 2008 by QUALCOMM, Incorporated.
19 *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
20 /*===========================================================================
21
22                         EDIT HISTORY FOR FILE
23
24 This section contains comments describing changes made to this file.
25 Notice that changes are listed in reverse chronological order.
26
27 Revision History:
28
29 when       who     what, where, why
30 --------   ---     ----------------------------------------------------------
31 09/25/08   umeshp      initial version
32 ===========================================================================*/
33
34   #define VIDENC_CMD_CFG           0x0000
35   #define VIDENC_CMD_ACTIVE        0x0001
36   #define VIDENC_CMD_IDLE          0x0002
37   #define VIDENC_CMD_FRAME_START   0x0003
38   #define VIDENC_CMD_STATUS_QUERY  0x0004
39   #define VIDENC_CMD_RC_CFG        0x0005
40   #define VIDENC_CMD_DIS_CFG       0x0006
41   #define VIDENC_CMD_DIS           0x0007
42   #define VIDENC_CMD_INTRA_REFRESH 0x0008
43   #define VIDENC_CMD_DIGITAL_ZOOM  0x0009
44
45
46 /*
47  * Command to pass the frame message information to VIDENC
48  */
49
50
51 #define VIDENC_CMD_FRAME_START_LEN \
52         sizeof(videnc_cmd_frame_start)
53
54 typedef struct {
55         unsigned short  cmd_id;
56         unsigned short  frame_info;
57         unsigned short  frame_rho_budget_word_high;
58         unsigned short  frame_rho_budget_word_low;
59         unsigned short  input_luma_addr_high;
60         unsigned short  input_luma_addr_low;
61         unsigned short  input_chroma_addr_high;
62         unsigned short  input_chroma_addr_low;
63         unsigned short  ref_vop_buf_ptr_high;
64         unsigned short  ref_vop_buf_ptr_low;
65         unsigned short  enc_pkt_buf_ptr_high;
66         unsigned short  enc_pkt_buf_ptr_low;
67         unsigned short  enc_pkt_buf_size_high;
68         unsigned short  enc_pkt_buf_size_low;
69         unsigned short  unfilt_recon_vop_buf_ptr_high;
70         unsigned short  unfilt_recon_vop_buf_ptr_low;
71         unsigned short  filt_recon_vop_buf_ptr_high;
72         unsigned short  filt_recon_vop_buf_ptr_low;
73 } __attribute__((packed)) videnc_cmd_frame_start;
74
75 /*
76  * Command to pass the frame-level digital stabilization parameters to VIDENC
77  */
78
79
80 #define VIDENC_CMD_DIS_LEN \
81     sizeof(videnc_cmd_dis)
82
83 typedef struct {
84         unsigned short  cmd_id;
85         unsigned short  vfe_out_prev_luma_addr_high;
86         unsigned short  vfe_out_prev_luma_addr_low;
87         unsigned short  stabilization_info;
88 } __attribute__((packed)) videnc_cmd_dis;
89
90 /*
91  * Command to pass the codec related parameters to VIDENC
92  */
93
94
95 #define VIDENC_CMD_CFG_LEN \
96     sizeof(videnc_cmd_cfg)
97
98 typedef struct {
99         unsigned short  cmd_id;
100         unsigned short  cfg_info_0;
101         unsigned short  cfg_info_1;
102         unsigned short  four_mv_threshold;
103         unsigned short  ise_fse_mv_cost_fac;
104         unsigned short  venc_frame_dim;
105         unsigned short  venc_DM_partition;
106 } __attribute__((packed)) videnc_cmd_cfg;
107
108 /*
109  * Command to start the video encoding
110  */
111
112
113 #define VIDENC_CMD_ACTIVE_LEN \
114     sizeof(videnc_cmd_active)
115
116 typedef struct {
117     unsigned short  cmd_id;
118 } __attribute__((packed)) videnc_cmd_active;
119
120 /*
121  * Command to stop the video encoding
122  */
123
124
125 #define VIDENC_CMD_IDLE_LEN \
126     sizeof(videnc_cmd_idle)
127
128 typedef struct {
129         unsigned short  cmd_id;
130 } __attribute__((packed)) videnc_cmd_idle;
131
132 /*
133  * Command to query staus of VIDENC
134  */
135
136
137 #define VIDENC_CMD_STATUS_QUERY_LEN \
138     sizeof(videnc_cmd_status_query)
139
140 typedef struct {
141         unsigned short  cmd_id;
142 } __attribute__((packed)) videnc_cmd_status_query;
143
144 /*
145  * Command to set rate control for a frame
146  */
147
148
149 #define VIDENC_CMD_RC_CFG_LEN \
150     sizeof(videnc_cmd_rc_cfg)
151
152 typedef struct {
153         unsigned short  cmd_id;
154         unsigned short  max_frame_qp_delta;
155         unsigned short  max_min_frame_qp;
156 } __attribute__((packed)) videnc_cmd_rc_cfg;
157
158 /*
159  * Command to set intra-refreshing
160  */
161
162
163 #define VIDENC_CMD_INTRA_REFRESH_LEN \
164     sizeof(videnc_cmd_intra_refresh)
165
166 typedef struct {
167         unsigned short  cmd_id;
168         unsigned short  num_mb_refresh;
169         unsigned short  mb_index[15];
170 } __attribute__((packed)) videnc_cmd_intra_refresh;
171
172 /*
173  * Command to pass digital zoom information to the VIDENC
174  */
175 #define VIDENC_CMD_DIGITAL_ZOOM_LEN \
176     sizeof(videnc_cmd_digital_zoom)
177
178 typedef struct {
179         unsigned short  cmd_id;
180         unsigned short  digital_zoom_en;
181         unsigned short  luma_frame_shift_X;
182         unsigned short  luma_frame_shift_Y;
183         unsigned short  up_ip_luma_rows;
184         unsigned short  up_ip_luma_cols;
185         unsigned short  up_ip_chroma_rows;
186         unsigned short  up_ip_chroma_cols;
187         unsigned short  luma_ph_incr_V_low;
188         unsigned short  luma_ph_incr_V_high;
189         unsigned short  luma_ph_incr_H_low;
190         unsigned short  luma_ph_incr_H_high;
191         unsigned short  chroma_ph_incr_V_low;
192         unsigned short  chroma_ph_incr_V_high;
193         unsigned short  chroma_ph_incr_H_low;
194         unsigned short  chroma_ph_incr_H_high;
195 } __attribute__((packed)) videnc_cmd_digital_zoom;
196
197 /*
198  * Command to configure digital stabilization parameters
199  */
200
201 #define VIDENC_CMD_DIS_CFG_LEN \
202     sizeof(videnc_cmd_dis_cfg)
203
204 typedef struct {
205         unsigned short  cmd_id;
206         unsigned short  image_stab_subf_start_row_col;
207         unsigned short  image_stab_subf_dim;
208         unsigned short  image_stab_info_0;
209 } __attribute__((packed)) videnc_cmd_dis_cfg;
210
211
212 #endif