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