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