Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Copyright (C) 2015 The Android Open Source Project |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | ***************************************************************************** |
| 18 | * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore |
| 19 | */ |
| 20 | /** |
| 21 | ******************************************************************************* |
| 22 | * @file |
| 23 | * ive2.h |
| 24 | * |
| 25 | * @brief |
| 26 | * This file contains all the necessary structure and enumeration |
| 27 | * definitions needed for the Application Program Interface(API) of the |
| 28 | * Ittiam Video Encoders This is version 2 |
| 29 | * |
| 30 | * @author |
| 31 | * Ittiam |
| 32 | * |
| 33 | * @par List of Functions: |
| 34 | * |
| 35 | * @remarks |
| 36 | * None |
| 37 | * |
| 38 | ******************************************************************************* |
| 39 | */ |
| 40 | |
| 41 | #ifndef _IVE2_H_ |
| 42 | #define _IVE2_H_ |
| 43 | |
| 44 | /*****************************************************************************/ |
| 45 | /* Constant Macros */ |
| 46 | /*****************************************************************************/ |
| 47 | |
| 48 | /** Maximum number of components in I/O Buffers */ |
| 49 | #define IVE_MAX_IO_BUFFER_COMPONENTS 4 |
| 50 | |
| 51 | /** Maximum number of reference pictures */ |
| 52 | #define IVE_MAX_REF 16 |
| 53 | |
| 54 | /*****************************************************************************/ |
| 55 | /* Enums */ |
| 56 | /*****************************************************************************/ |
| 57 | |
| 58 | /** Slice modes */ |
| 59 | typedef enum |
| 60 | { |
| 61 | IVE_SLICE_MODE_NA = 0x7FFFFFFF, |
| 62 | IVE_SLICE_MODE_NONE = 0x0, |
| 63 | |
| 64 | IVE_SLICE_MODE_BYTES = 0x1, |
| 65 | IVE_SLICE_MODE_BLOCKS = 0x2, |
| 66 | }IVE_SLICE_MODE_T; |
| 67 | |
| 68 | /** Adaptive Intra refresh modes */ |
| 69 | typedef enum |
| 70 | { |
| 71 | IVE_AIR_MODE_NA = 0x7FFFFFFF, |
| 72 | IVE_AIR_MODE_NONE = 0x0, |
| 73 | IVE_AIR_MODE_CYCLIC = 0x1, |
| 74 | IVE_AIR_MODE_RANDOM = 0x2, |
| 75 | IVE_AIR_MODE_DISTORTION = 0x3, |
| 76 | }IVE_AIR_MODE_T; |
| 77 | |
| 78 | /** Rate control modes */ |
| 79 | typedef enum |
| 80 | { |
| 81 | IVE_RC_NA = 0x7FFFFFFF, |
| 82 | IVE_RC_NONE = 0x0, |
| 83 | IVE_RC_STORAGE = 0x1, |
| 84 | IVE_RC_CBR_NON_LOW_DELAY = 0x2, |
| 85 | IVE_RC_CBR_LOW_DELAY = 0x3, |
| 86 | IVE_RC_TWOPASS = 0x4, |
| 87 | IVE_RC_RATECONTROLPRESET_DEFAULT = IVE_RC_STORAGE |
| 88 | }IVE_RC_MODE_T; |
| 89 | |
| 90 | /** Encoder mode */ |
| 91 | typedef enum |
| 92 | { |
| 93 | IVE_ENC_MODE_NA = 0x7FFFFFFF, |
| 94 | IVE_ENC_MODE_HEADER = 0x1, |
| 95 | IVE_ENC_MODE_PICTURE = 0x0, |
| 96 | IVE_ENC_MODE_DEFAULT = IVE_ENC_MODE_PICTURE, |
| 97 | }IVE_ENC_MODE_T; |
| 98 | |
| 99 | /** Speed Config */ |
| 100 | typedef enum IVE_SPEED_CONFIG |
| 101 | { |
| 102 | IVE_QUALITY_DUMMY = 0x7FFFFFFF, |
| 103 | IVE_CONFIG = 0, |
| 104 | IVE_SLOWEST = 1, |
| 105 | IVE_NORMAL = 2, |
| 106 | IVE_FAST = 3, |
| 107 | IVE_HIGH_SPEED = 4, |
| 108 | IVE_FASTEST = 5, |
| 109 | }IVE_SPEED_CONFIG; |
| 110 | |
| 111 | /** API command type */ |
| 112 | typedef enum |
| 113 | { |
| 114 | IVE_CMD_VIDEO_NA = 0x7FFFFFFF, |
| 115 | IVE_CMD_VIDEO_CTL = IV_CMD_EXTENSIONS + 1, |
| 116 | IVE_CMD_VIDEO_ENCODE, |
| 117 | IVE_CMD_QUEUE_INPUT, |
| 118 | IVE_CMD_DEQUEUE_INPUT, |
| 119 | IVE_CMD_QUEUE_OUTPUT, |
| 120 | IVE_CMD_DEQUEUE_OUTPUT, |
| 121 | IVE_CMD_GET_RECON, |
| 122 | }IVE_API_COMMAND_TYPE_T; |
| 123 | |
| 124 | /** Video Control API command type */ |
| 125 | typedef enum |
| 126 | { |
| 127 | IVE_CMD_CT_NA = 0x7FFFFFFF, |
| 128 | IVE_CMD_CTL_SETDEFAULT = 0x0, |
| 129 | IVE_CMD_CTL_SET_DIMENSIONS = 0x1, |
| 130 | IVE_CMD_CTL_SET_FRAMERATE = 0x2, |
| 131 | IVE_CMD_CTL_SET_BITRATE = 0x3, |
| 132 | IVE_CMD_CTL_SET_FRAMETYPE = 0x4, |
| 133 | IVE_CMD_CTL_SET_QP = 0x5, |
| 134 | IVE_CMD_CTL_SET_ENC_MODE = 0x6, |
| 135 | IVE_CMD_CTL_SET_VBV_PARAMS = 0x7, |
| 136 | IVE_CMD_CTL_SET_AIR_PARAMS = 0x8, |
| 137 | IVE_CMD_CTL_SET_ME_PARAMS = 0X9, |
| 138 | IVE_CMD_CTL_SET_GOP_PARAMS = 0XA, |
| 139 | IVE_CMD_CTL_SET_PROFILE_PARAMS = 0XB, |
| 140 | IVE_CMD_CTL_SET_DEBLOCK_PARAMS = 0XC, |
| 141 | IVE_CMD_CTL_SET_IPE_PARAMS = 0XD, |
Doney Alex | 983e1ae | 2016-03-30 17:31:26 +0530 | [diff] [blame] | 142 | IVE_CMD_CTL_SET_VUI_PARAMS = 0XE, |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 143 | IVE_CMD_CTL_SET_NUM_CORES = 0x30, |
| 144 | IVE_CMD_CTL_RESET = 0xA0, |
| 145 | IVE_CMD_CTL_FLUSH = 0xB0, |
| 146 | IVE_CMD_CTL_GETBUFINFO = 0xC0, |
| 147 | IVE_CMD_CTL_GETVERSION = 0xC1, |
Chamarthi Kishore | ad2eaf8 | 2019-10-01 11:59:43 +0530 | [diff] [blame] | 148 | IVE_CMD_CTL_SET_SEI_MDCV_PARAMS = 0xD0, |
| 149 | IVE_CMD_CTL_SET_SEI_CLL_PARAMS = 0xD1, |
| 150 | IVE_CMD_CTL_SET_SEI_AVE_PARAMS = 0xD2, |
| 151 | IVE_CMD_CTL_SET_SEI_CCV_PARAMS = 0xD3, |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 152 | IVE_CMD_CTL_CODEC_SUBCMD_START = 0x100, |
| 153 | }IVE_CONTROL_API_COMMAND_TYPE_T; |
| 154 | |
| 155 | /* IVE_ERROR_BITS_T: A UWORD32 container will be used for reporting the error*/ |
| 156 | /* code to the application. The first 8 bits starting from LSB have been */ |
| 157 | /* reserved for the codec to report internal error details. The rest of the */ |
| 158 | /* bits will be generic for all video encoders and each bit has an associated*/ |
| 159 | /* meaning as mentioned below. The unused bit fields are reserved for future */ |
| 160 | /* extenstions and will be zero in the current implementation */ |
| 161 | typedef enum { |
| 162 | |
| 163 | /* Bit 8 - Unsupported input parameter or configuration. */ |
| 164 | IVE_UNSUPPORTEDPARAM = 0x8, |
| 165 | |
| 166 | /* Bit 9 - Fatal error (stop the codec).If there is an */ |
| 167 | /* error and this bit is not set, the error is a recoverable one. */ |
| 168 | IVE_FATALERROR = 0x9, |
| 169 | |
| 170 | IVE_ERROR_BITS_T_DUMMY_ELEMENT = 0x7FFFFFFF |
| 171 | }IVE_ERROR_BITS_T; |
| 172 | |
| 173 | /* IVE_ERROR_CODES_T: The list of error codes depicting the possible error */ |
| 174 | /* scenarios that can be encountered while encoding */ |
| 175 | typedef enum |
| 176 | { |
| 177 | |
| 178 | IVE_ERR_NA = 0x7FFFFFFF, |
| 179 | IVE_ERR_NONE = 0x00, |
| 180 | IVE_ERR_INVALID_API_CMD = 0x01, |
| 181 | IVE_ERR_INVALID_API_SUB_CMD = 0x02, |
| 182 | IVE_ERR_IP_GET_MEM_REC_API_STRUCT_SIZE_INCORRECT = 0x03, |
| 183 | IVE_ERR_OP_GET_MEM_REC_API_STRUCT_SIZE_INCORRECT = 0x04, |
| 184 | IVE_ERR_IP_FILL_MEM_REC_API_STRUCT_SIZE_INCORRECT = 0x05, |
| 185 | IVE_ERR_OP_FILL_MEM_REC_API_STRUCT_SIZE_INCORRECT = 0x06, |
| 186 | IVE_ERR_IP_INIT_API_STRUCT_SIZE_INCORRECT = 0x07, |
| 187 | IVE_ERR_OP_INIT_API_STRUCT_SIZE_INCORRECT = 0x08, |
| 188 | IVE_ERR_IP_RETRIEVE_MEM_REC_API_STRUCT_SIZE_INCORRECT = 0x09, |
| 189 | IVE_ERR_OP_RETRIEVE_MEM_REC_API_STRUCT_SIZE_INCORRECT = 0x0A, |
| 190 | IVE_ERR_IP_ENCODE_API_STRUCT_SIZE_INCORRECT = 0x0B, |
| 191 | IVE_ERR_OP_ENCODE_API_STRUCT_SIZE_INCORRECT = 0x0C, |
| 192 | IVE_ERR_IP_CTL_SETDEF_API_STRUCT_SIZE_INCORRECT = 0x0D, |
| 193 | IVE_ERR_OP_CTL_SETDEF_API_STRUCT_SIZE_INCORRECT = 0x0E, |
| 194 | IVE_ERR_IP_CTL_GETBUFINFO_API_STRUCT_SIZE_INCORRECT = 0x0F, |
| 195 | IVE_ERR_OP_CTL_GETBUFINFO_API_STRUCT_SIZE_INCORRECT = 0x10, |
| 196 | IVE_ERR_IP_CTL_GETVERSION_API_STRUCT_SIZE_INCORRECT = 0x11, |
| 197 | IVE_ERR_OP_CTL_GETVERSION_API_STRUCT_SIZE_INCORRECT = 0x12, |
| 198 | IVE_ERR_IP_CTL_FLUSH_API_STRUCT_SIZE_INCORRECT = 0x13, |
| 199 | IVE_ERR_OP_CTL_FLUSH_API_STRUCT_SIZE_INCORRECT = 0x14, |
| 200 | IVE_ERR_IP_CTL_RESET_API_STRUCT_SIZE_INCORRECT = 0x15, |
| 201 | IVE_ERR_OP_CTL_RESET_API_STRUCT_SIZE_INCORRECT = 0x16, |
| 202 | IVE_ERR_IP_CTL_SETCORES_API_STRUCT_SIZE_INCORRECT = 0x17, |
| 203 | IVE_ERR_OP_CTL_SETCORES_API_STRUCT_SIZE_INCORRECT = 0x18, |
| 204 | IVE_ERR_IP_CTL_SETDIM_API_STRUCT_SIZE_INCORRECT = 0x19, |
| 205 | IVE_ERR_OP_CTL_SETDIM_API_STRUCT_SIZE_INCORRECT = 0x1A, |
| 206 | IVE_ERR_IP_CTL_SETFRAMERATE_API_STRUCT_SIZE_INCORRECT = 0x1B, |
| 207 | IVE_ERR_OP_CTL_SETFRAMERATE_API_STRUCT_SIZE_INCORRECT = 0x1C, |
| 208 | IVE_ERR_IP_CTL_SETBITRATE_API_STRUCT_SIZE_INCORRECT = 0x1D, |
| 209 | IVE_ERR_OP_CTL_SETBITRATE_API_STRUCT_SIZE_INCORRECT = 0x1E, |
| 210 | IVE_ERR_IP_CTL_SETFRAMETYPE_API_STRUCT_SIZE_INCORRECT = 0x1F, |
| 211 | IVE_ERR_OP_CTL_SETFRAMETYPE_API_STRUCT_SIZE_INCORRECT = 0x20, |
| 212 | IVE_ERR_IP_CTL_SETMEPARAMS_API_STRUCT_SIZE_INCORRECT = 0x21, |
| 213 | IVE_ERR_OP_CTL_SETMEPARAMS_API_STRUCT_SIZE_INCORRECT = 0x22, |
| 214 | IVE_ERR_IP_CTL_SETIPEPARAMS_API_STRUCT_SIZE_INCORRECT = 0x23, |
| 215 | IVE_ERR_OP_CTL_SETIPEPARAMS_API_STRUCT_SIZE_INCORRECT = 0x24, |
| 216 | IVE_ERR_IP_CTL_SETGOPPARAMS_API_STRUCT_SIZE_INCORRECT = 0x25, |
| 217 | IVE_ERR_OP_CTL_SETGOPPARAMS_API_STRUCT_SIZE_INCORRECT = 0x26, |
| 218 | IVE_ERR_IP_CTL_SETDEBLKPARAMS_API_STRUCT_SIZE_INCORRECT = 0x27, |
| 219 | IVE_ERR_OP_CTL_SETDEBLKPARAMS_API_STRUCT_SIZE_INCORRECT = 0x28, |
| 220 | IVE_ERR_IP_CTL_SETQPPARAMS_API_STRUCT_SIZE_INCORRECT = 0x29, |
| 221 | IVE_ERR_OP_CTL_SETQPPARAMS_API_STRUCT_SIZE_INCORRECT = 0x2A, |
| 222 | IVE_ERR_FILL_NUM_MEM_RECS_POINTER_NULL = 0x2B, |
| 223 | IVE_ERR_NUM_MEM_REC_NOT_SUFFICIENT = 0x2C, |
| 224 | IVE_ERR_MEM_REC_STRUCT_SIZE_INCORRECT = 0x2D, |
| 225 | IVE_ERR_MEM_REC_BASE_POINTER_NULL = 0x2E, |
| 226 | IVE_ERR_MEM_REC_OVERLAP_ERR = 0x2F, |
| 227 | IVE_ERR_MEM_REC_INSUFFICIENT_SIZE = 0x30, |
| 228 | IVE_ERR_MEM_REC_ALIGNMENT_ERR = 0x31, |
| 229 | IVE_ERR_MEM_REC_INCORRECT_TYPE = 0x32, |
| 230 | IVE_ERR_HANDLE_NULL = 0x33, |
| 231 | IVE_ERR_HANDLE_STRUCT_SIZE_INCORRECT = 0x34, |
| 232 | IVE_ERR_API_FUNCTION_PTR_NULL = 0x35, |
| 233 | IVE_ERR_INVALID_CODEC_HANDLE = 0x36, |
| 234 | IVE_ERR_CTL_GET_VERSION_BUFFER_IS_NULL = 0x37, |
| 235 | IVE_ERR_IP_CTL_SETAIRPARAMS_API_STRUCT_SIZE_INCORRECT = 0x38, |
| 236 | IVE_ERR_OP_CTL_SETAIRPARAMS_API_STRUCT_SIZE_INCORRECT = 0x39, |
| 237 | IVE_ERR_IP_CTL_SETENCMODE_API_STRUCT_SIZE_INCORRECT = 0x3A, |
| 238 | IVE_ERR_OP_CTL_SETENCMODE_API_STRUCT_SIZE_INCORRECT = 0x3B, |
| 239 | IVE_ERR_IP_CTL_SETVBVPARAMS_API_STRUCT_SIZE_INCORRECT = 0x3C, |
| 240 | IVE_ERR_OP_CTL_SETVBVPARAMS_API_STRUCT_SIZE_INCORRECT = 0x3D, |
| 241 | IVE_ERR_IP_CTL_SETPROFILE_API_STRUCT_SIZE_INCORRECT = 0x3E, |
| 242 | IVE_ERR_OP_CTL_SETPROFILE_API_STRUCT_SIZE_INCORRECT = 0x3F, |
Doney Alex | 983e1ae | 2016-03-30 17:31:26 +0530 | [diff] [blame] | 243 | IVE_ERR_IP_CTL_SET_VUI_STRUCT_SIZE_INCORRECT = 0x40, |
| 244 | IVE_ERR_OP_CTL_SET_VUI_STRUCT_SIZE_INCORRECT = 0x41, |
Chamarthi Kishore | ad2eaf8 | 2019-10-01 11:59:43 +0530 | [diff] [blame] | 245 | IVE_ERR_IP_CTL_SET_SEI_MDCV_STRUCT_SIZE_INCORRECT = 0x42, |
| 246 | IVE_ERR_OP_CTL_SET_SEI_MDCV_STRUCT_SIZE_INCORRECT = 0x43, |
| 247 | IVE_ERR_IP_CTL_SET_SEI_CLL_STRUCT_SIZE_INCORRECT = 0x44, |
| 248 | IVE_ERR_OP_CTL_SET_SEI_CLL_STRUCT_SIZE_INCORRECT = 0x45, |
| 249 | IVE_ERR_IP_CTL_SET_SEI_AVE_STRUCT_SIZE_INCORRECT = 0x46, |
| 250 | IVE_ERR_OP_CTL_SET_SEI_AVE_STRUCT_SIZE_INCORRECT = 0x47, |
| 251 | IVE_ERR_IP_CTL_SET_SEI_CCV_STRUCT_SIZE_INCORRECT = 0x48, |
| 252 | IVE_ERR_OP_CTL_SET_SEI_CCV_STRUCT_SIZE_INCORRECT = 0x49, |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 253 | }IVE_ERROR_CODES_T; |
| 254 | |
| 255 | |
| 256 | /*****************************************************************************/ |
| 257 | /* Initialize encoder */ |
| 258 | /*****************************************************************************/ |
| 259 | |
| 260 | /** Input structure : Initialize the encoder */ |
| 261 | typedef struct |
| 262 | { |
| 263 | /** size of the structure */ |
| 264 | UWORD32 u4_size; |
| 265 | |
| 266 | /** Command type */ |
| 267 | IV_API_COMMAND_TYPE_T e_cmd; |
| 268 | |
| 269 | /** Number of memory records */ |
| 270 | UWORD32 u4_num_mem_rec; |
| 271 | |
| 272 | /** pointer to array of memrecords structures should be filled by codec |
| 273 | with details of memory resource requirements */ |
| 274 | iv_mem_rec_t *ps_mem_rec; |
| 275 | |
| 276 | /** maximum width for which codec should request memory requirements */ |
| 277 | UWORD32 u4_max_wd; |
| 278 | |
| 279 | /** maximum height for which codec should request memory requirements */ |
| 280 | UWORD32 u4_max_ht; |
| 281 | |
| 282 | /** Maximum number of reference frames */ |
| 283 | UWORD32 u4_max_ref_cnt; |
| 284 | |
| 285 | /** Maximum number of reorder frames */ |
| 286 | UWORD32 u4_max_reorder_cnt; |
| 287 | |
| 288 | /** Maximum level supported */ |
| 289 | UWORD32 u4_max_level; |
| 290 | |
| 291 | /** Input color format */ |
| 292 | IV_COLOR_FORMAT_T e_inp_color_fmt; |
| 293 | |
| 294 | /** Flag to enable/disable - To be used only for debugging/testing */ |
| 295 | UWORD32 u4_enable_recon; |
| 296 | |
| 297 | /** Recon color format */ |
| 298 | IV_COLOR_FORMAT_T e_recon_color_fmt; |
| 299 | |
| 300 | /** Rate control mode */ |
| 301 | IVE_RC_MODE_T e_rc_mode; |
| 302 | |
| 303 | /** Maximum frame rate to be supported */ |
| 304 | UWORD32 u4_max_framerate; |
| 305 | |
| 306 | /** Maximum bitrate to be supported */ |
| 307 | UWORD32 u4_max_bitrate; |
| 308 | |
| 309 | /** Maximum number of consecutive B frames */ |
Harinarayanan K K | 134291e | 2015-06-18 16:03:38 +0530 | [diff] [blame] | 310 | UWORD32 u4_num_bframes; |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 311 | |
| 312 | /** Content type Interlaced/Progressive */ |
| 313 | IV_CONTENT_TYPE_T e_content_type; |
| 314 | |
| 315 | /** Maximum search range to be used in X direction */ |
| 316 | UWORD32 u4_max_srch_rng_x; |
| 317 | |
| 318 | /** Maximum search range to be used in Y direction */ |
| 319 | UWORD32 u4_max_srch_rng_y; |
| 320 | |
| 321 | /** Slice Mode */ |
| 322 | IVE_SLICE_MODE_T e_slice_mode; |
| 323 | |
| 324 | /** Slice parameter */ |
| 325 | UWORD32 u4_slice_param; |
| 326 | |
| 327 | /** Processor architecture */ |
| 328 | IV_ARCH_T e_arch; |
| 329 | |
| 330 | /** SOC details */ |
| 331 | IV_SOC_T e_soc; |
| 332 | |
| 333 | |
| 334 | }ive_init_ip_t; |
| 335 | |
| 336 | /** Output structure : Initialize the encoder */ |
| 337 | typedef struct |
| 338 | { |
| 339 | /** Size of the structure */ |
| 340 | UWORD32 u4_size; |
| 341 | |
| 342 | /** Return error code */ |
| 343 | UWORD32 u4_error_code; |
| 344 | }ive_init_op_t; |
| 345 | |
| 346 | |
| 347 | /*****************************************************************************/ |
| 348 | /* Video Encode - Deprecated */ |
| 349 | /*****************************************************************************/ |
| 350 | |
| 351 | typedef struct |
| 352 | { |
| 353 | /** size of the structure */ |
| 354 | UWORD32 u4_size; |
| 355 | |
| 356 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 357 | |
| 358 | /** Descriptor for input raw buffer */ |
| 359 | iv_raw_buf_t s_inp_buf; |
| 360 | |
| 361 | /** Buffer containing pic info if mb_info_type is non-zero */ |
| 362 | void *pv_bufs; |
| 363 | |
| 364 | /** Flag to indicate if mb info is sent along with input buffer */ |
| 365 | UWORD32 u4_mb_info_type; |
| 366 | |
| 367 | /** Buffer containing mb info if mb_info_type is non-zero */ |
| 368 | void *pv_mb_info; |
| 369 | |
| 370 | /** Flag to indicate if pic info is sent along with input buffer */ |
| 371 | UWORD32 u4_pic_info_type; |
| 372 | |
| 373 | /** Buffer containing pic info if mb_info_type is non-zero */ |
| 374 | void *pv_pic_info; |
| 375 | |
| 376 | /** Lower 32bits of input time stamp */ |
| 377 | UWORD32 u4_timestamp_low; |
| 378 | |
| 379 | /** Upper 32bits of input time stamp */ |
| 380 | UWORD32 u4_timestamp_high; |
| 381 | |
| 382 | /** Flag to indicate if this is the last input in the stream */ |
| 383 | UWORD32 u4_is_last; |
| 384 | |
| 385 | /** Descriptor for output bit-stream buffer */ |
| 386 | iv_bits_buf_t s_out_buf; |
| 387 | |
| 388 | /** Descriptor for recon buffer */ |
| 389 | iv_raw_buf_t s_recon_buf; |
| 390 | |
| 391 | }ive_video_encode_ip_t; |
| 392 | |
| 393 | |
| 394 | typedef struct |
| 395 | { |
| 396 | /** size of the structure */ |
| 397 | UWORD32 u4_size; |
| 398 | |
| 399 | /** error code */ |
| 400 | UWORD32 u4_error_code; |
| 401 | |
| 402 | /* Output present */ |
| 403 | WORD32 output_present; |
| 404 | |
| 405 | /* dump recon */ |
| 406 | WORD32 dump_recon; |
| 407 | |
| 408 | /* encoded frame type */ |
| 409 | UWORD32 u4_encoded_frame_type; |
| 410 | |
Harinarayanan K K | 134291e | 2015-06-18 16:03:38 +0530 | [diff] [blame] | 411 | /** Flag to indicate if this is the last output from the encoder */ |
| 412 | UWORD32 u4_is_last; |
| 413 | |
| 414 | /** Lower 32bits of input time stamp */ |
| 415 | UWORD32 u4_timestamp_low; |
| 416 | |
| 417 | /** Upper 32bits of input time stamp */ |
| 418 | UWORD32 u4_timestamp_high; |
| 419 | |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 420 | /** Descriptor for input raw buffer freed from codec */ |
| 421 | iv_raw_buf_t s_inp_buf; |
| 422 | |
| 423 | /** Descriptor for output bit-stream buffer */ |
| 424 | iv_bits_buf_t s_out_buf; |
| 425 | |
| 426 | /** Descriptor for recon buffer */ |
| 427 | iv_raw_buf_t s_recon_buf; |
| 428 | |
| 429 | }ive_video_encode_op_t; |
| 430 | |
| 431 | /*****************************************************************************/ |
| 432 | /* Queue Input raw buffer - Send the YUV buffer to be encoded */ |
| 433 | /*****************************************************************************/ |
| 434 | /** Input structure : Queue input buffer to the encoder */ |
| 435 | typedef struct |
| 436 | { |
| 437 | /** size of the structure */ |
| 438 | UWORD32 u4_size; |
| 439 | |
| 440 | /** Command : IVE_CMD_QUEUE_INPUT */ |
| 441 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 442 | |
| 443 | /** Descriptor for input raw buffer */ |
| 444 | iv_raw_buf_t s_inp_buf; |
| 445 | |
| 446 | /** Flag to indicate if mb info is sent along with input buffer */ |
| 447 | UWORD32 u4_mb_info_type; |
| 448 | |
| 449 | /** Flag to indicate the size of mb info structure */ |
| 450 | UWORD32 u4_mb_info_size; |
| 451 | |
| 452 | /** Buffer containing mb info if mb_info_type is non-zero */ |
| 453 | void *pv_mb_info; |
| 454 | |
| 455 | /** Flag to indicate if pic info is sent along with input buffer */ |
| 456 | UWORD32 u4_pic_info_type; |
| 457 | |
| 458 | /** Buffer containing pic info if mb_info_type is non-zero */ |
| 459 | void *pv_pic_info; |
| 460 | |
| 461 | /** Lower 32bits of input time stamp */ |
| 462 | UWORD32 u4_timestamp_low; |
| 463 | |
| 464 | /** Upper 32bits of input time stamp */ |
| 465 | UWORD32 u4_timestamp_high; |
| 466 | |
| 467 | |
| 468 | /** Flag to enable/disable blocking the current API call */ |
| 469 | UWORD32 u4_is_blocking; |
| 470 | |
| 471 | /** Flag to indicate if this is the last input in the stream */ |
| 472 | UWORD32 u4_is_last; |
| 473 | |
| 474 | }ive_queue_inp_ip_t; |
| 475 | |
| 476 | /** Input structure : Queue output buffer to the encoder */ |
| 477 | typedef struct |
| 478 | { |
| 479 | /** size of the structure */ |
| 480 | UWORD32 u4_size; |
| 481 | |
| 482 | /** Return error code */ |
| 483 | UWORD32 u4_error_code; |
| 484 | }ive_queue_inp_op_t; |
| 485 | |
| 486 | /*****************************************************************************/ |
| 487 | /* Dequeue Input raw buffer - Get free YUV buffer from the encoder */ |
| 488 | /*****************************************************************************/ |
| 489 | /** Input structure : Dequeue input buffer from the encoder */ |
| 490 | |
| 491 | typedef struct |
| 492 | { |
| 493 | /** size of the structure */ |
| 494 | UWORD32 u4_size; |
| 495 | |
| 496 | /** Command: IVE_CMD_DEQUEUE_INPUT */ |
| 497 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 498 | |
| 499 | /** Flag to enable/disable blocking the current API call */ |
| 500 | UWORD32 u4_is_blocking; |
| 501 | |
| 502 | }ive_dequeue_inp_ip_t; |
| 503 | |
| 504 | /** Output structure : Dequeue input buffer from the encoder */ |
| 505 | typedef struct |
| 506 | { |
| 507 | /** size of the structure */ |
| 508 | UWORD32 u4_size; |
| 509 | |
| 510 | /** Return error code */ |
| 511 | UWORD32 u4_error_code; |
| 512 | |
| 513 | /** Buffer descriptor of the buffer returned from encoder */ |
| 514 | iv_raw_buf_t s_inp_buf; |
| 515 | |
| 516 | /** Flag to indicate if mb info is sent along with input buffer */ |
| 517 | UWORD32 u4_mb_info_type; |
| 518 | |
| 519 | /** Flag to indicate the size of mb info structure */ |
| 520 | UWORD32 u4_mb_info_size; |
| 521 | |
| 522 | /** Buffer containing mb info if mb_info_type is non-zero */ |
| 523 | void *pv_mb_info; |
| 524 | |
| 525 | /** Flag to indicate if pic info is sent along with input buffer */ |
| 526 | UWORD32 u4_pic_info_type; |
| 527 | |
| 528 | /** Buffer containing pic info if mb_info_type is non-zero */ |
| 529 | void *pv_pic_info; |
| 530 | |
| 531 | /** Lower 32bits of input time stamp */ |
| 532 | UWORD32 u4_timestamp_low; |
| 533 | |
| 534 | /** Upper 32bits of input time stamp */ |
| 535 | UWORD32 u4_timestamp_high; |
| 536 | |
| 537 | /** Flag to indicate if this is the last input in the stream */ |
| 538 | UWORD32 u4_is_last; |
| 539 | |
| 540 | |
| 541 | }ive_dequeue_inp_op_t; |
| 542 | |
| 543 | /*****************************************************************************/ |
| 544 | /* Queue Output bitstream buffer - Send the bistream buffer to be filled */ |
| 545 | /*****************************************************************************/ |
| 546 | /** Input structure : Queue output buffer to the encoder */ |
| 547 | |
| 548 | typedef struct |
| 549 | { |
| 550 | /** size of the structure */ |
| 551 | UWORD32 u4_size; |
| 552 | |
| 553 | /** Command : IVE_CMD_QUEUE_OUTPUT */ |
| 554 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 555 | |
| 556 | /** Descriptor for output bit-stream buffer */ |
| 557 | iv_bits_buf_t s_out_buf; |
| 558 | |
| 559 | /** Flag to enable/disable blocking the current API call */ |
| 560 | UWORD32 u4_is_blocking; |
| 561 | |
| 562 | /** Flag to indicate if this is the last output in the stream */ |
| 563 | UWORD32 u4_is_last; |
| 564 | |
| 565 | }ive_queue_out_ip_t; |
| 566 | |
| 567 | /** Output structure : Queue output buffer to the encoder */ |
| 568 | typedef struct |
| 569 | { |
| 570 | /** size of the structure */ |
| 571 | UWORD32 u4_size; |
| 572 | |
| 573 | /** Return error code */ |
| 574 | UWORD32 u4_error_code; |
| 575 | |
| 576 | }ive_queue_out_op_t; |
| 577 | |
| 578 | |
| 579 | /*****************************************************************************/ |
| 580 | /* Dequeue Output bitstream buffer - Get the bistream buffer filled */ |
| 581 | /*****************************************************************************/ |
| 582 | /** Input structure : Dequeue output buffer from the encoder */ |
| 583 | |
| 584 | typedef struct |
| 585 | { |
| 586 | /** size of the structure */ |
| 587 | UWORD32 u4_size; |
| 588 | |
| 589 | /** Command : IVE_CMD_DEQUEUE_OUTPUT */ |
| 590 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 591 | |
| 592 | /** Flag to enable/disable blocking the current API call */ |
| 593 | UWORD32 u4_is_blocking; |
| 594 | }ive_dequeue_out_ip_t; |
| 595 | |
| 596 | /** Output structure : Dequeue output buffer from the encoder */ |
| 597 | typedef struct |
| 598 | { |
| 599 | /** size of the structure */ |
| 600 | UWORD32 u4_size; |
| 601 | |
| 602 | /** Return error code */ |
| 603 | UWORD32 u4_error_code; |
| 604 | |
| 605 | /** Descriptor for output bit-stream buffer */ |
| 606 | iv_bits_buf_t s_out_buf; |
| 607 | |
| 608 | /** Lower 32bits of timestamp corresponding to this buffer */ |
| 609 | UWORD32 u4_timestamp_low; |
| 610 | |
| 611 | /** Upper 32bits of timestamp corresponding to this buffer */ |
| 612 | UWORD32 u4_timestamp_high; |
| 613 | |
| 614 | /** Flag to indicate if this is the last output in the stream */ |
| 615 | UWORD32 u4_is_last; |
| 616 | |
| 617 | }ive_dequeue_out_op_t; |
| 618 | |
| 619 | /*****************************************************************************/ |
| 620 | /* Get Recon data - Get the reconstructed data from encoder */ |
| 621 | /*****************************************************************************/ |
| 622 | /** Input structure : Get recon data from the encoder */ |
| 623 | |
| 624 | typedef struct |
| 625 | { |
| 626 | /** size of the structure */ |
| 627 | UWORD32 u4_size; |
| 628 | |
| 629 | /** Command : IVE_CMD_GET_RECON */ |
| 630 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 631 | |
| 632 | /** Flag to enable/disable blocking the current API call */ |
| 633 | UWORD32 u4_is_blocking; |
| 634 | |
| 635 | /** Descriptor for recon buffer */ |
| 636 | iv_raw_buf_t s_recon_buf; |
| 637 | |
| 638 | /** Flag to indicate if this is the last recon in the stream */ |
| 639 | UWORD32 u4_is_last; |
| 640 | |
| 641 | }ive_get_recon_ip_t; |
| 642 | |
| 643 | /** Output structure : Get recon data from the encoder */ |
| 644 | typedef struct |
| 645 | { |
| 646 | /** size of the structure */ |
| 647 | UWORD32 u4_size; |
| 648 | |
| 649 | /** Return error code */ |
| 650 | UWORD32 u4_error_code; |
| 651 | |
| 652 | /** Lower 32bits of time stamp corresponding to this buffer */ |
| 653 | UWORD32 u4_timestamp_low; |
| 654 | |
| 655 | /** Upper 32bits of time stamp corresponding to this buffer */ |
| 656 | UWORD32 u4_timestamp_high; |
| 657 | |
| 658 | /** Flag to indicate if this is the last recon in the stream */ |
| 659 | UWORD32 u4_is_last; |
| 660 | |
| 661 | }ive_get_recon_op_t; |
| 662 | |
| 663 | /*****************************************************************************/ |
| 664 | /* Video control Flush */ |
| 665 | /*****************************************************************************/ |
| 666 | |
| 667 | /** Input structure : Flush all the buffers from the encoder */ |
| 668 | typedef struct |
| 669 | { |
| 670 | /** size of the structure */ |
| 671 | UWORD32 u4_size; |
| 672 | |
| 673 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 674 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 675 | |
| 676 | /** Sub command type : IVE_CMD_CTL_FLUSH */ |
| 677 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 678 | }ive_ctl_flush_ip_t; |
| 679 | |
| 680 | /** Output structure : Flush all the buffers from the encoder */ |
| 681 | typedef struct |
| 682 | { |
| 683 | /** size of the structure */ |
| 684 | UWORD32 u4_size; |
| 685 | |
| 686 | /** Return error code */ |
| 687 | UWORD32 u4_error_code; |
| 688 | }ive_ctl_flush_op_t; |
| 689 | |
| 690 | /*****************************************************************************/ |
| 691 | /* Video control reset */ |
| 692 | /*****************************************************************************/ |
| 693 | /** Input structure : Reset the encoder */ |
| 694 | typedef struct |
| 695 | { |
| 696 | /** size of the structure */ |
| 697 | UWORD32 u4_size; |
| 698 | |
| 699 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 700 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 701 | |
| 702 | /** Sub command type : IVE_CMD_CTL_RESET */ |
| 703 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 704 | }ive_ctl_reset_ip_t; |
| 705 | |
| 706 | /** Output structure : Reset the encoder */ |
| 707 | typedef struct |
| 708 | { |
| 709 | /** size of the structure */ |
| 710 | UWORD32 u4_size; |
| 711 | |
| 712 | /** Return error code */ |
| 713 | UWORD32 u4_error_code; |
| 714 | }ive_ctl_reset_op_t; |
| 715 | |
| 716 | /*****************************************************************************/ |
| 717 | /* Video control:Get Buf Info */ |
| 718 | /*****************************************************************************/ |
| 719 | |
| 720 | /** Input structure : Get encoder buffer requirements */ |
| 721 | typedef struct |
| 722 | { |
| 723 | /** size of the structure */ |
| 724 | UWORD32 u4_size; |
| 725 | |
| 726 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 727 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 728 | |
| 729 | /** Sub command type : IVE_CMD_CTL_GETBUFINFO */ |
| 730 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 731 | |
| 732 | /** maximum width for which codec should request memory requirements */ |
| 733 | UWORD32 u4_max_wd; |
| 734 | |
| 735 | /** maximum height for which codec should request memory requirements */ |
| 736 | UWORD32 u4_max_ht; |
| 737 | |
| 738 | /** Input color format */ |
| 739 | IV_COLOR_FORMAT_T e_inp_color_fmt; |
| 740 | |
| 741 | }ive_ctl_getbufinfo_ip_t; |
| 742 | |
| 743 | /** Output structure : Get encoder buffer requirements */ |
| 744 | typedef struct |
| 745 | { |
| 746 | /** size of the structure */ |
| 747 | UWORD32 u4_size; |
| 748 | |
| 749 | /** Return error code */ |
| 750 | UWORD32 u4_error_code; |
| 751 | |
| 752 | /** Minimum number of input buffers required for codec */ |
| 753 | UWORD32 u4_min_inp_bufs; |
| 754 | |
| 755 | /** Minimum number of output buffers required for codec */ |
| 756 | UWORD32 u4_min_out_bufs; |
| 757 | |
| 758 | /** Number of components in input buffers required for codec */ |
| 759 | UWORD32 u4_inp_comp_cnt; |
| 760 | |
| 761 | /** Number of components in output buffers required for codec */ |
| 762 | UWORD32 u4_out_comp_cnt; |
| 763 | |
| 764 | /** Minimum sizes of each component in input buffer required */ |
| 765 | UWORD32 au4_min_in_buf_size[IVE_MAX_IO_BUFFER_COMPONENTS]; |
| 766 | |
| 767 | /** Minimum sizes of each component in output buffer required */ |
| 768 | UWORD32 au4_min_out_buf_size[IVE_MAX_IO_BUFFER_COMPONENTS]; |
| 769 | |
| 770 | }ive_ctl_getbufinfo_op_t; |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | /*****************************************************************************/ |
| 776 | /* Video control:Get Version Info */ |
| 777 | /*****************************************************************************/ |
| 778 | |
| 779 | /** Input structure : Get encoder version information */ |
| 780 | typedef struct |
| 781 | { |
| 782 | /** size of the structure */ |
| 783 | UWORD32 u4_size; |
| 784 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 785 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 786 | |
| 787 | /** Sub command type : IVE_CMD_CTL_GETVERSION */ |
| 788 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 789 | |
| 790 | /** Buffer where version info will be returned */ |
| 791 | UWORD8 *pu1_version; |
| 792 | |
| 793 | /** Size of the buffer allocated for version info */ |
| 794 | UWORD32 u4_version_bufsize; |
| 795 | }ive_ctl_getversioninfo_ip_t; |
| 796 | |
| 797 | /** Output structure : Get encoder version information */ |
| 798 | typedef struct |
| 799 | { |
| 800 | /** size of the structure */ |
| 801 | UWORD32 u4_size; |
| 802 | |
| 803 | /** Return error code */ |
| 804 | UWORD32 u4_error_code; |
| 805 | }ive_ctl_getversioninfo_op_t; |
| 806 | |
| 807 | |
| 808 | /*****************************************************************************/ |
| 809 | /* Video control:set default params */ |
| 810 | /*****************************************************************************/ |
| 811 | /** Input structure : Set default encoder parameters */ |
| 812 | typedef struct |
| 813 | { |
| 814 | /** size of the structure */ |
| 815 | UWORD32 u4_size; |
| 816 | |
| 817 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 818 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 819 | |
| 820 | /** Sub command type : IVE_CMD_CTL_SETDEFAULT */ |
| 821 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 822 | |
| 823 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 824 | * from which this command takes effect */ |
| 825 | UWORD32 u4_timestamp_low; |
| 826 | |
| 827 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 828 | * from which this command takes effect */ |
| 829 | UWORD32 u4_timestamp_high; |
| 830 | |
| 831 | }ive_ctl_setdefault_ip_t; |
| 832 | |
| 833 | /** Output structure : Set default encoder parameters */ |
| 834 | typedef struct |
| 835 | { |
| 836 | /** size of the structure */ |
| 837 | UWORD32 u4_size; |
| 838 | |
| 839 | /** Return error code */ |
| 840 | UWORD32 u4_error_code; |
| 841 | }ive_ctl_setdefault_op_t; |
| 842 | |
| 843 | /*****************************************************************************/ |
| 844 | /* Video control Set Frame dimensions */ |
| 845 | /*****************************************************************************/ |
| 846 | |
| 847 | /** Input structure : Set frame dimensions */ |
| 848 | typedef struct |
| 849 | { |
| 850 | /** size of the structure */ |
| 851 | UWORD32 u4_size; |
| 852 | |
| 853 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 854 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 855 | |
| 856 | /** Sub command type : IVE_CMD_CTL_SET_DIMENSIONS */ |
| 857 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 858 | |
| 859 | /** Input width */ |
| 860 | UWORD32 u4_wd; |
| 861 | |
| 862 | /** Input height */ |
| 863 | UWORD32 u4_ht; |
| 864 | |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 865 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 866 | * from which this command takes effect */ |
| 867 | UWORD32 u4_timestamp_low; |
| 868 | |
| 869 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 870 | * from which this command takes effect */ |
| 871 | UWORD32 u4_timestamp_high; |
| 872 | |
| 873 | }ive_ctl_set_dimensions_ip_t; |
| 874 | |
| 875 | /** Output structure : Set frame dimensions */ |
| 876 | typedef struct |
| 877 | { |
| 878 | /** size of the structure */ |
| 879 | UWORD32 u4_size; |
| 880 | |
| 881 | /** Return error code */ |
| 882 | UWORD32 u4_error_code; |
| 883 | }ive_ctl_set_dimensions_op_t; |
| 884 | |
| 885 | |
| 886 | /*****************************************************************************/ |
| 887 | /* Video control Set Frame rates */ |
| 888 | /*****************************************************************************/ |
| 889 | |
| 890 | /** Input structure : Set frame rate */ |
| 891 | typedef struct |
| 892 | { |
| 893 | /** size of the structure */ |
| 894 | UWORD32 u4_size; |
| 895 | |
| 896 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 897 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 898 | |
| 899 | /** Sub command type : IVE_CMD_CTL_SET_FRAMERATE */ |
| 900 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 901 | |
| 902 | /** Source frame rate */ |
| 903 | UWORD32 u4_src_frame_rate; |
| 904 | |
| 905 | /** Target frame rate */ |
| 906 | UWORD32 u4_tgt_frame_rate; |
| 907 | |
| 908 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 909 | * from which this command takes effect */ |
| 910 | UWORD32 u4_timestamp_low; |
| 911 | |
| 912 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 913 | * from which this command takes effect */ |
| 914 | UWORD32 u4_timestamp_high; |
| 915 | |
| 916 | }ive_ctl_set_frame_rate_ip_t; |
| 917 | |
| 918 | /** Output structure : Set frame rate */ |
| 919 | typedef struct |
| 920 | { |
| 921 | /** size of the structure */ |
| 922 | UWORD32 u4_size; |
| 923 | |
| 924 | /** Return error code */ |
| 925 | UWORD32 u4_error_code; |
| 926 | }ive_ctl_set_frame_rate_op_t; |
| 927 | |
| 928 | /*****************************************************************************/ |
| 929 | /* Video control Set Bitrate */ |
| 930 | /*****************************************************************************/ |
| 931 | |
| 932 | /** Input structure : Set bitrate */ |
| 933 | typedef struct |
| 934 | { |
| 935 | /** size of the structure */ |
| 936 | UWORD32 u4_size; |
| 937 | |
| 938 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 939 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 940 | |
| 941 | /** Sub command type : IVE_CMD_CTL_SET_BITRATE */ |
| 942 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 943 | |
| 944 | /** Target bitrate in kilobits per second */ |
| 945 | UWORD32 u4_target_bitrate; |
| 946 | |
| 947 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 948 | * from which this command takes effect */ |
| 949 | UWORD32 u4_timestamp_low; |
| 950 | |
| 951 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 952 | * from which this command takes effect */ |
| 953 | UWORD32 u4_timestamp_high; |
| 954 | |
| 955 | }ive_ctl_set_bitrate_ip_t; |
| 956 | |
| 957 | /** Output structure : Set bitrate */ |
| 958 | typedef struct |
| 959 | { |
| 960 | /** size of the structure */ |
| 961 | UWORD32 u4_size; |
| 962 | |
| 963 | /** Return error code */ |
| 964 | UWORD32 u4_error_code; |
| 965 | }ive_ctl_set_bitrate_op_t; |
| 966 | |
| 967 | /*****************************************************************************/ |
| 968 | /* Video control Set Frame type */ |
| 969 | /*****************************************************************************/ |
| 970 | |
| 971 | /** Input structure : Set frametype */ |
| 972 | typedef struct |
| 973 | { |
| 974 | /** size of the structure */ |
| 975 | UWORD32 u4_size; |
| 976 | |
| 977 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 978 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 979 | |
| 980 | /** Sub command type : IVE_CMD_CTL_SET_FRAMETYPE */ |
| 981 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 982 | |
| 983 | /** Force current frame type */ |
| 984 | IV_PICTURE_CODING_TYPE_T e_frame_type; |
| 985 | |
| 986 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 987 | * from which this command takes effect */ |
| 988 | UWORD32 u4_timestamp_low; |
| 989 | |
| 990 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 991 | * from which this command takes effect */ |
| 992 | UWORD32 u4_timestamp_high; |
| 993 | |
| 994 | }ive_ctl_set_frame_type_ip_t; |
| 995 | |
| 996 | /** Output structure : Set frametype */ |
| 997 | typedef struct |
| 998 | { |
| 999 | /** size of the structure */ |
| 1000 | UWORD32 u4_size; |
| 1001 | |
| 1002 | /** Return error code */ |
| 1003 | UWORD32 u4_error_code; |
| 1004 | }ive_ctl_set_frame_type_op_t; |
| 1005 | |
| 1006 | /*****************************************************************************/ |
| 1007 | /* Video control Set Encode mode */ |
| 1008 | /*****************************************************************************/ |
| 1009 | |
| 1010 | /** Input structure : Set encode mode */ |
| 1011 | typedef struct |
| 1012 | { |
| 1013 | /** size of the structure */ |
| 1014 | UWORD32 u4_size; |
| 1015 | |
| 1016 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1017 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1018 | |
| 1019 | /** Sub command type : IVE_CMD_CTL_SET_ENC_MODE */ |
| 1020 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1021 | |
| 1022 | /** Encoder mode */ |
| 1023 | IVE_ENC_MODE_T e_enc_mode; |
| 1024 | |
| 1025 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1026 | * from which this command takes effect */ |
| 1027 | UWORD32 u4_timestamp_low; |
| 1028 | |
| 1029 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1030 | * from which this command takes effect */ |
| 1031 | UWORD32 u4_timestamp_high; |
| 1032 | |
| 1033 | }ive_ctl_set_enc_mode_ip_t; |
| 1034 | |
| 1035 | /** Output structure : Set encode mode */ |
| 1036 | typedef struct |
| 1037 | { |
| 1038 | /** size of the structure */ |
| 1039 | UWORD32 u4_size; |
| 1040 | |
| 1041 | /** Return error code */ |
| 1042 | UWORD32 u4_error_code; |
| 1043 | |
| 1044 | }ive_ctl_set_enc_mode_op_t; |
| 1045 | |
| 1046 | /*****************************************************************************/ |
| 1047 | /* Video control Set QP */ |
| 1048 | /*****************************************************************************/ |
| 1049 | |
| 1050 | /** Input structure : Set QP */ |
| 1051 | typedef struct |
| 1052 | { |
| 1053 | /** size of the structure */ |
| 1054 | UWORD32 u4_size; |
| 1055 | |
| 1056 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1057 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1058 | |
| 1059 | /** Sub command type : IVE_CMD_CTL_SET_QP */ |
| 1060 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1061 | |
| 1062 | /** Set initial Qp for I pictures */ |
| 1063 | UWORD32 u4_i_qp; |
| 1064 | |
| 1065 | /** Set initial Qp for P pictures */ |
| 1066 | UWORD32 u4_p_qp; |
| 1067 | |
| 1068 | /** Set initial Qp for B pictures */ |
| 1069 | UWORD32 u4_b_qp; |
| 1070 | |
| 1071 | /** Set minimum Qp for I pictures */ |
| 1072 | UWORD32 u4_i_qp_min; |
| 1073 | |
| 1074 | /** Set maximum Qp for I pictures */ |
| 1075 | UWORD32 u4_i_qp_max; |
| 1076 | |
| 1077 | /** Set minimum Qp for P pictures */ |
| 1078 | UWORD32 u4_p_qp_min; |
| 1079 | |
| 1080 | /** Set maximum Qp for P pictures */ |
| 1081 | UWORD32 u4_p_qp_max; |
| 1082 | |
| 1083 | /** Set minimum Qp for B pictures */ |
| 1084 | UWORD32 u4_b_qp_min; |
| 1085 | |
| 1086 | /** Set maximum Qp for B pictures */ |
| 1087 | UWORD32 u4_b_qp_max; |
| 1088 | |
| 1089 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1090 | * from which this command takes effect */ |
| 1091 | UWORD32 u4_timestamp_low; |
| 1092 | |
| 1093 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1094 | * from which this command takes effect */ |
| 1095 | UWORD32 u4_timestamp_high; |
| 1096 | |
| 1097 | |
| 1098 | }ive_ctl_set_qp_ip_t; |
| 1099 | |
| 1100 | /** Output structure : Set QP */ |
| 1101 | typedef struct |
| 1102 | { |
| 1103 | /** size of the structure */ |
| 1104 | UWORD32 u4_size; |
| 1105 | |
| 1106 | /** Return error code */ |
| 1107 | UWORD32 u4_error_code; |
| 1108 | }ive_ctl_set_qp_op_t; |
| 1109 | |
| 1110 | /*****************************************************************************/ |
| 1111 | /* Video control Set AIR params */ |
| 1112 | /*****************************************************************************/ |
| 1113 | |
| 1114 | /** Input structure : Set AIR params */ |
| 1115 | typedef struct |
| 1116 | { |
| 1117 | /** size of the structure */ |
| 1118 | UWORD32 u4_size; |
| 1119 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1120 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1121 | |
| 1122 | /** Sub command type : IVE_CMD_CTL_SET_AIR_PARAMS */ |
| 1123 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1124 | |
| 1125 | /** Adaptive intra refresh mode */ |
| 1126 | IVE_AIR_MODE_T e_air_mode; |
| 1127 | |
| 1128 | /** Adaptive intra refresh period in frames */ |
| 1129 | UWORD32 u4_air_refresh_period; |
| 1130 | |
| 1131 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1132 | * from which this command takes effect */ |
| 1133 | UWORD32 u4_timestamp_low; |
| 1134 | |
| 1135 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1136 | * from which this command takes effect */ |
| 1137 | UWORD32 u4_timestamp_high; |
| 1138 | |
| 1139 | |
| 1140 | }ive_ctl_set_air_params_ip_t; |
| 1141 | |
| 1142 | /** Output structure : Set AIR params */ |
| 1143 | typedef struct |
| 1144 | { |
| 1145 | /** size of the structure */ |
| 1146 | UWORD32 u4_size; |
| 1147 | |
| 1148 | /** Return error code */ |
| 1149 | UWORD32 u4_error_code; |
| 1150 | }ive_ctl_set_air_params_op_t; |
| 1151 | |
| 1152 | /*****************************************************************************/ |
| 1153 | /* Video control Set VBV params */ |
| 1154 | /*****************************************************************************/ |
| 1155 | |
| 1156 | /** Input structure : Set VBV params */ |
| 1157 | typedef struct |
| 1158 | { |
| 1159 | /** size of the structure */ |
| 1160 | UWORD32 u4_size; |
| 1161 | |
| 1162 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1163 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1164 | |
| 1165 | /** Sub command type : IVE_CMD_CTL_SET_VBV_PARAMS */ |
| 1166 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1167 | |
| 1168 | /** VBV buffer delay */ |
| 1169 | UWORD32 u4_vbv_buffer_delay; |
| 1170 | |
| 1171 | /** VBV buffer size */ |
| 1172 | UWORD32 u4_vbv_buf_size; |
| 1173 | |
| 1174 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1175 | * from which this command takes effect */ |
| 1176 | UWORD32 u4_timestamp_low; |
| 1177 | |
| 1178 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1179 | * from which this command takes effect */ |
| 1180 | UWORD32 u4_timestamp_high; |
| 1181 | |
| 1182 | |
| 1183 | }ive_ctl_set_vbv_params_ip_t; |
| 1184 | |
| 1185 | /** Output structure : Set VBV params */ |
| 1186 | typedef struct |
| 1187 | { |
| 1188 | /** size of the structure */ |
| 1189 | UWORD32 u4_size; |
| 1190 | |
| 1191 | /** Return error code */ |
| 1192 | UWORD32 u4_error_code; |
| 1193 | }ive_ctl_set_vbv_params_op_t; |
| 1194 | |
| 1195 | |
| 1196 | /*****************************************************************************/ |
| 1197 | /* Video control Set Processor Details */ |
| 1198 | /*****************************************************************************/ |
| 1199 | |
| 1200 | /** Input structure : Set processor details */ |
| 1201 | typedef struct |
| 1202 | { |
| 1203 | /** size of the structure */ |
| 1204 | UWORD32 u4_size; |
| 1205 | |
| 1206 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1207 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1208 | |
| 1209 | /** Sub command type : IVE_CMD_CTL_SET_NUM_CORES */ |
| 1210 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1211 | |
| 1212 | /** Total number of cores to be used */ |
| 1213 | UWORD32 u4_num_cores; |
| 1214 | |
| 1215 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1216 | * from which this command takes effect */ |
| 1217 | UWORD32 u4_timestamp_low; |
| 1218 | |
| 1219 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1220 | * from which this command takes effect */ |
| 1221 | UWORD32 u4_timestamp_high; |
| 1222 | |
| 1223 | }ive_ctl_set_num_cores_ip_t; |
| 1224 | |
| 1225 | /** Output structure : Set processor details */ |
| 1226 | typedef struct |
| 1227 | { |
| 1228 | /** size of the structure */ |
| 1229 | UWORD32 u4_size; |
| 1230 | |
| 1231 | /** Return error code */ |
| 1232 | UWORD32 u4_error_code; |
| 1233 | }ive_ctl_set_num_cores_op_t; |
| 1234 | |
| 1235 | /*****************************************************************************/ |
| 1236 | /* Video control Set Intra Prediction estimation params */ |
| 1237 | /*****************************************************************************/ |
| 1238 | |
| 1239 | /** Input structure : Set IPE params */ |
| 1240 | typedef struct |
| 1241 | { |
| 1242 | /** size of the structure */ |
| 1243 | UWORD32 u4_size; |
| 1244 | |
| 1245 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1246 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1247 | |
| 1248 | /** Sub command type : IVE_CMD_CTL_SET_IPE_PARAMS */ |
| 1249 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1250 | |
| 1251 | /** Flag to enable/disbale intra 4x4 analysis */ |
| 1252 | UWORD32 u4_enable_intra_4x4; |
| 1253 | |
| 1254 | /** Flag to enable/disable pre-enc stage of Intra Pred estimation */ |
| 1255 | UWORD32 u4_pre_enc_ipe; |
| 1256 | |
| 1257 | /** Speed preset - Value between 0 (slowest) and 100 (fastest) */ |
| 1258 | IVE_SPEED_CONFIG u4_enc_speed_preset; |
| 1259 | |
| 1260 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1261 | * from which this command takes effect */ |
| 1262 | UWORD32 u4_timestamp_low; |
| 1263 | |
| 1264 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1265 | * from which this command takes effect */ |
| 1266 | UWORD32 u4_timestamp_high; |
| 1267 | |
Doney Alex | dfe686a | 2016-02-24 12:00:03 +0530 | [diff] [blame] | 1268 | /** Constrained intra pred flag */ |
| 1269 | UWORD32 u4_constrained_intra_pred; |
| 1270 | |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 1271 | }ive_ctl_set_ipe_params_ip_t; |
| 1272 | |
| 1273 | /** Output structure : Set IPE Params */ |
| 1274 | typedef struct |
| 1275 | { |
| 1276 | /** size of the structure */ |
| 1277 | UWORD32 u4_size; |
| 1278 | |
| 1279 | /** Return error code */ |
| 1280 | UWORD32 u4_error_code; |
| 1281 | }ive_ctl_set_ipe_params_op_t; |
| 1282 | |
| 1283 | /*****************************************************************************/ |
| 1284 | /* Video control Set Motion estimation params */ |
| 1285 | /*****************************************************************************/ |
| 1286 | |
| 1287 | /** Input structure : Set ME Params */ |
| 1288 | typedef struct |
| 1289 | { |
| 1290 | /** size of the structure */ |
| 1291 | UWORD32 u4_size; |
| 1292 | |
| 1293 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1294 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1295 | |
| 1296 | /** Sub command type : IVE_CMD_CTL_SET_ME_PARAMS */ |
| 1297 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1298 | |
| 1299 | /** Flag to enable/disable pre-enc stage of Motion estimation */ |
| 1300 | UWORD32 u4_pre_enc_me; |
| 1301 | |
| 1302 | /** Speed preset - Value between 0 (slowest) and 100 (fastest) */ |
| 1303 | UWORD32 u4_me_speed_preset; |
| 1304 | |
| 1305 | /** Flag to enable/disable half pel motion estimation */ |
| 1306 | UWORD32 u4_enable_hpel; |
| 1307 | |
| 1308 | /** Flag to enable/disable quarter pel motion estimation */ |
| 1309 | UWORD32 u4_enable_qpel; |
| 1310 | |
| 1311 | /** Flag to enable/disable fast SAD approximation */ |
| 1312 | UWORD32 u4_enable_fast_sad; |
| 1313 | |
| 1314 | /** Flag to enable/disable alternate reference frames */ |
| 1315 | UWORD32 u4_enable_alt_ref; |
| 1316 | |
| 1317 | /** Maximum search range in X direction for farthest reference */ |
| 1318 | UWORD32 u4_srch_rng_x; |
| 1319 | |
| 1320 | /** Maximum search range in Y direction for farthest reference */ |
| 1321 | UWORD32 u4_srch_rng_y; |
| 1322 | |
| 1323 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1324 | * from which this command takes effect */ |
| 1325 | UWORD32 u4_timestamp_low; |
| 1326 | |
| 1327 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1328 | * from which this command takes effect */ |
| 1329 | UWORD32 u4_timestamp_high; |
| 1330 | |
| 1331 | }ive_ctl_set_me_params_ip_t; |
| 1332 | |
| 1333 | /** Output structure : Set ME Params */ |
| 1334 | typedef struct |
| 1335 | { |
| 1336 | /** size of the structure */ |
| 1337 | UWORD32 u4_size; |
| 1338 | |
| 1339 | /** Return error code */ |
| 1340 | UWORD32 u4_error_code; |
| 1341 | }ive_ctl_set_me_params_op_t; |
| 1342 | |
| 1343 | /*****************************************************************************/ |
| 1344 | /* Video control Set GOP params */ |
| 1345 | /*****************************************************************************/ |
| 1346 | |
| 1347 | /** Input structure : Set GOP Params */ |
| 1348 | typedef struct |
| 1349 | { |
| 1350 | /** size of the structure */ |
| 1351 | UWORD32 u4_size; |
| 1352 | |
| 1353 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1354 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1355 | |
| 1356 | /** Sub command type : IVE_CMD_CTL_SET_GOP_PARAMS */ |
| 1357 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1358 | |
| 1359 | /** I frame interval */ |
| 1360 | UWORD32 u4_i_frm_interval; |
| 1361 | |
| 1362 | /** IDR frame interval */ |
| 1363 | UWORD32 u4_idr_frm_interval; |
| 1364 | |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 1365 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1366 | * from which this command takes effect */ |
| 1367 | UWORD32 u4_timestamp_low; |
| 1368 | |
| 1369 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1370 | * from which this command takes effect */ |
| 1371 | UWORD32 u4_timestamp_high; |
| 1372 | |
| 1373 | }ive_ctl_set_gop_params_ip_t; |
| 1374 | |
| 1375 | /** Output structure : Set GOP params */ |
| 1376 | typedef struct |
| 1377 | { |
| 1378 | /** size of the structure */ |
| 1379 | UWORD32 u4_size; |
| 1380 | |
| 1381 | /** Return error code */ |
| 1382 | UWORD32 u4_error_code; |
| 1383 | }ive_ctl_set_gop_params_op_t; |
| 1384 | |
| 1385 | /*****************************************************************************/ |
| 1386 | /* Video control Set Deblock params */ |
| 1387 | /*****************************************************************************/ |
| 1388 | |
| 1389 | /** Input structure : Set Deblock Params */ |
| 1390 | typedef struct |
| 1391 | { |
| 1392 | /** size of the structure */ |
| 1393 | UWORD32 u4_size; |
| 1394 | |
| 1395 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1396 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1397 | |
| 1398 | /** Sub command type : IVE_CMD_CTL_SET_GOP_PARAMS */ |
| 1399 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1400 | |
| 1401 | /** Disable deblock level (0: Enable completely, 3: Disable completely */ |
| 1402 | UWORD32 u4_disable_deblock_level; |
| 1403 | |
| 1404 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1405 | * from which this command takes effect */ |
| 1406 | UWORD32 u4_timestamp_low; |
| 1407 | |
| 1408 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1409 | * from which this command takes effect */ |
| 1410 | UWORD32 u4_timestamp_high; |
| 1411 | |
| 1412 | }ive_ctl_set_deblock_params_ip_t; |
| 1413 | |
| 1414 | /** Output structure : Set Deblock Params */ |
| 1415 | typedef struct |
| 1416 | { |
| 1417 | /** size of the structure */ |
| 1418 | UWORD32 u4_size; |
| 1419 | |
| 1420 | /** Return error code */ |
| 1421 | UWORD32 u4_error_code; |
| 1422 | }ive_ctl_set_deblock_params_op_t; |
| 1423 | |
| 1424 | /*****************************************************************************/ |
| 1425 | /* Video control Set Profile params */ |
| 1426 | /*****************************************************************************/ |
| 1427 | |
| 1428 | /** Input structure : Set Profile Params */ |
| 1429 | typedef struct |
| 1430 | { |
| 1431 | /** size of the structure */ |
| 1432 | UWORD32 u4_size; |
| 1433 | |
| 1434 | /** Command type : IVE_CMD_VIDEO_CTL */ |
| 1435 | IVE_API_COMMAND_TYPE_T e_cmd; |
| 1436 | |
| 1437 | /** Sub command type : IVE_CMD_CTL_SET_PROFILE_PARAMS */ |
| 1438 | IVE_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; |
| 1439 | |
| 1440 | /** Profile */ |
| 1441 | IV_PROFILE_T e_profile; |
| 1442 | |
| 1443 | /** Lower 32bits of time stamp corresponding to input buffer, |
| 1444 | * from which this command takes effect */ |
| 1445 | UWORD32 u4_timestamp_low; |
| 1446 | |
| 1447 | /** Upper 32bits of time stamp corresponding to input buffer, |
| 1448 | * from which this command takes effect */ |
| 1449 | UWORD32 u4_timestamp_high; |
| 1450 | |
Harinarayanan K K | 134291e | 2015-06-18 16:03:38 +0530 | [diff] [blame] | 1451 | /** Entropy coding mode flag: 0-CAVLC, 1-CABAC */ |
| 1452 | UWORD32 u4_entropy_coding_mode; |
| 1453 | |
Hamsalekha S | 8d3d303 | 2015-03-13 21:24:58 +0530 | [diff] [blame] | 1454 | }ive_ctl_set_profile_params_ip_t; |
| 1455 | |
| 1456 | /** Output structure : Set Profile Params */ |
| 1457 | typedef struct |
| 1458 | { |
| 1459 | /** size of the structure */ |
| 1460 | UWORD32 u4_size; |
| 1461 | |
| 1462 | /** Return error code */ |
| 1463 | UWORD32 u4_error_code; |
| 1464 | }ive_ctl_set_profile_params_op_t; |
| 1465 | |
| 1466 | |
| 1467 | #endif /* _IVE2_H_ */ |
| 1468 | |