1 #ifndef QDSP5VIDENCCMDI_H
2 #define QDSP5VIDENCCMDI_H
4 /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
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
9 This file contains defintions of format blocks of commands
10 that are accepted by VIDENC Task
15 EXTERNALIZED FUNCTIONS
18 Copyright(c) 2008 by QUALCOMM, Incorporated.
19 *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
20 /*===========================================================================
24 This section contains comments describing changes made to this file.
25 Notice that changes are listed in reverse chronological order.
29 when who what, where, why
30 -------- --- ----------------------------------------------------------
31 09/25/08 umeshp initial version
32 ===========================================================================*/
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
47 * Command to pass the frame message information to VIDENC
51 #define VIDENC_CMD_FRAME_START_LEN \
52 sizeof(videnc_cmd_frame_start)
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;
76 * Command to pass the frame-level digital stabilization parameters to VIDENC
80 #define VIDENC_CMD_DIS_LEN \
81 sizeof(videnc_cmd_dis)
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;
91 * Command to pass the codec related parameters to VIDENC
95 #define VIDENC_CMD_CFG_LEN \
96 sizeof(videnc_cmd_cfg)
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;
109 * Command to start the video encoding
113 #define VIDENC_CMD_ACTIVE_LEN \
114 sizeof(videnc_cmd_active)
117 unsigned short cmd_id;
118 } __attribute__((packed)) videnc_cmd_active;
121 * Command to stop the video encoding
125 #define VIDENC_CMD_IDLE_LEN \
126 sizeof(videnc_cmd_idle)
129 unsigned short cmd_id;
130 } __attribute__((packed)) videnc_cmd_idle;
133 * Command to query staus of VIDENC
137 #define VIDENC_CMD_STATUS_QUERY_LEN \
138 sizeof(videnc_cmd_status_query)
141 unsigned short cmd_id;
142 } __attribute__((packed)) videnc_cmd_status_query;
145 * Command to set rate control for a frame
149 #define VIDENC_CMD_RC_CFG_LEN \
150 sizeof(videnc_cmd_rc_cfg)
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;
159 * Command to set intra-refreshing
163 #define VIDENC_CMD_INTRA_REFRESH_LEN \
164 sizeof(videnc_cmd_intra_refresh)
167 unsigned short cmd_id;
168 unsigned short num_mb_refresh;
169 unsigned short mb_index[15];
170 } __attribute__((packed)) videnc_cmd_intra_refresh;
173 * Command to pass digital zoom information to the VIDENC
175 #define VIDENC_CMD_DIGITAL_ZOOM_LEN \
176 sizeof(videnc_cmd_digital_zoom)
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;
198 * Command to configure digital stabilization parameters
201 #define VIDENC_CMD_DIS_CFG_LEN \
202 sizeof(videnc_cmd_dis_cfg)
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;