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