1 /****************************************************************************** 2 * 3 * Copyright (C) 2018 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 ihevce_api.h 23 * 24 * \brief 25 * This file contains definitions and structures which are shared between 26 * application and HEVC Encoder Processing interface layer 27 * 28 * \date 29 * 18/09/2012 30 * 31 * \author 32 * Ittiam 33 * 34 ****************************************************************************** 35 */ 36 37 #ifndef _IHEVCE_API_H_ 38 #define _IHEVCE_API_H_ 39 40 /*****************************************************************************/ 41 /* Constant Macros */ 42 /*****************************************************************************/ 43 #define IHEVCE_MAX_IO_BUFFERS 3 44 45 #define IHEVCE_EXTENDED_SAR 255 46 47 #define IHEVCE_MBR_CORE_WEIGHTAGE 0.25f 48 49 /** Maximum number of resolutions encoder can run */ 50 #define IHEVCE_MAX_NUM_RESOLUTIONS 1 //10 51 52 /** Maximum number of bit-rate instances encoder can run */ 53 #define IHEVCE_MAX_NUM_BITRATES 1 //5 54 55 #define MAX_NUM_CORES 8 // Supports upto 160 logical cores. 56 57 /* Max length of filenames */ 58 #define MAX_LEN_FILENAME 200 59 60 /* max number of tiles per row/cols */ 61 //Main/Main10 profile (=4096/256) //Don't change this 62 #define MAX_TILE_COLUMNS 16 63 //Main/Main10 profile (=2160/64) //Don't change this 64 #define MAX_TILE_ROWS 34 65 66 #define IHEVCE_ASYNCH_ERROR_START 0x0000E600 67 #define IHEVCE_SYNCH_ERROR_START 0x0000E700 68 69 #define MAX_NUM_DYN_BITRATE_CMDS (IHEVCE_MAX_NUM_RESOLUTIONS * IHEVCE_MAX_NUM_BITRATES) 70 71 /* NAL units related definations */ 72 #define MAX_NUM_PREFIX_NALS_PER_AU 20 73 #define MAX_NUM_SUFFIX_NALS_PER_AU 20 74 #define MAX_NUM_VCL_NALS_PER_AU 200 /* as per level 5.1 from spec */ 75 76 /* Maximum number of processor groups supported */ 77 #define MAX_NUMBER_PROC_GRPS 4 78 79 /** @brief maximum length of CC User Data in a single frame */ 80 #define MAX_SEI_PAYLOAD_PER_TLV (0x200) 81 82 #define MAX_NUMBER_OF_SEI_PAYLOAD (10) 83 84 #define IHEVCE_COMMANDS_TAG_MASK (0x0000FFFF) 85 86 // Upper 16 bits are used to communicate payload type 87 #define IHEVCE_PAYLOAD_TYPE_MASK (0xFFFF0000) 88 89 #define IHEVCE_PAYLOAD_TYPE_SHIFT (16) 90 91 #define MAX_FRAME_RATE 120.0 92 #define MIN_FRAME_RATE 1.0 93 94 /*****************************************************************************/ 95 /* Enums */ 96 /*****************************************************************************/ 97 /** 98 * @brief Enumerations for Quality config. 99 */ 100 typedef enum 101 { 102 IHEVCE_QUALITY_DUMMY = 0xFFFFFFFF, 103 IHEVCE_QUALITY_P0 = 0, 104 IHEVCE_QUALITY_P2 = 2, 105 IHEVCE_QUALITY_P3, 106 IHEVCE_QUALITY_P4, 107 IHEVCE_QUALITY_P5, 108 IHEVCE_QUALITY_P6, 109 IHEVCE_QUALITY_P7, 110 IHEVCE_NUM_QUALITY_PRESET 111 } IHEVCE_QUALITY_CONFIG_T; 112 113 /*****************************************************************************/ 114 /* Enums */ 115 /*****************************************************************************/ 116 /** 117 * @brief Enumerations for Quality config for auxilary bitrate in case of MBR. 118 */ 119 typedef enum 120 { 121 IHEVCE_MBR_DUMMY = -1, 122 IHEVCE_MBR_HIGH_QUALITY = 0, 123 IHEVCE_MBR_MEDIUM_SPEED, 124 IHEVCE_MBR_HIGH_SPEED, 125 IHEVCE_MBR_EXTREME_SPEED 126 } IHEVCE_QUALITY_CONFIG_MBR_T; 127 128 /** 129 * @brief Enumerations for Rate Control config. 130 */ 131 typedef enum 132 { 133 IHEVCE_RC_DUMMY = 0xFFFFFFFF, 134 IHEVCE_RC_LOW_DELAY = 1, 135 IHEVCE_RC_STORAGE = 2, 136 IHEVCE_RC_TWOPASS = 3, 137 IHEVCE_RC_NONE = 4, 138 IHEVCE_RC_USER_DEFINED = 5, 139 IHEVCE_RC_RATECONTROLPRESET_DEFAULT = IHEVCE_RC_LOW_DELAY 140 } IHEVCE_RATE_CONTROL_CONFIG_T; 141 142 /** 143 * @brief Enumerations for Intra Refresh config. 144 */ 145 typedef enum 146 { 147 IHEVCE_REFRESH_DUMMY = 0, 148 IHEVCE_I_SILICE = 1, 149 IHEVCE_COLUMN_BASED = 2, 150 IHEVCE_DBR = 3, 151 IHEVCE_GDR = 4 152 } IHEVCE_REFRESH_CONFIG_T; 153 154 /** 155 * @brief Enumerations for ASYNCH Control Commands Tags. 156 */ 157 typedef enum 158 { 159 IHEVCE_ASYNCH_API_END_TAG = 0xFFFF, 160 IHEVCE_ASYNCH_API_SETBITRATE_TAG = 0x01, 161 IHEVCE_ASYNCH_API_SET_RF_TAG = 0x02, 162 IHEVCE_ASYNCH_API_FORCE_CLOSE_TAG = 0x03 163 } IHEVCE_ASYNCH_API_COMMAND_TAG_T; 164 165 typedef enum 166 { 167 IHEVCE_ASYNCH_ERR_NO_END_TAG = IHEVCE_ASYNCH_ERROR_START + 0x01, 168 IHEVCE_ASYNCH_ERR_TLV_ERROR = IHEVCE_ASYNCH_ERROR_START + 0x02, 169 IHEVCE_ASYNCH_ERR_LENGTH_NOT_ZERO = IHEVCE_ASYNCH_ERROR_START + 0x03, 170 IHEVCE_ASYNCH_ERR_BR_NOT_BYTE = IHEVCE_ASYNCH_ERROR_START + 0x04, 171 IHEVCE_ASYNCH_FORCE_CLOSE_NOT_SUPPORTED = IHEVCE_ASYNCH_ERROR_START + 0x05 172 } IHEVCE_ASYNCH_ERROR_TAG_T; 173 174 /** 175 * @brief Enumerations for SYNCH Control Commands Tags. 176 */ 177 typedef enum 178 { 179 IHEVCE_SYNCH_API_END_TAG = 0xFFFF, 180 IHEVCE_SYNCH_API_FLUSH_TAG = 0x21, 181 IHEVCE_SYNCH_API_FORCE_IDR_TAG = 0x22, 182 IHEVCE_SYNCH_API_REG_KEYFRAME_SEI_TAG = 0x23, 183 IHEVCE_SYNCH_API_REG_ALLFRAME_SEI_TAG = 0x24, 184 IHEVCE_SYNCH_API_SET_RES_TAG = 0x25 185 } IHEVCE_SYNCH_API_COMMAND_TAG_T; 186 187 typedef enum 188 { 189 IHEVCE_SYNCH_ERR_NO_END_TAG = IHEVCE_SYNCH_ERROR_START + 0x11, 190 IHEVCE_SYNCH_ERR_TLV_ERROR = IHEVCE_SYNCH_ERROR_START + 0x12, 191 IHEVCE_SYNCH_ERR_LENGTH_NOT_ZERO = IHEVCE_SYNCH_ERROR_START + 0x13, 192 IHEVCE_SYNCH_ERR_NO_PADDING = IHEVCE_SYNCH_ERROR_START + 0x14, 193 IHEVCE_SYNCH_ERR_WRONG_LENGTH = IHEVCE_SYNCH_ERROR_START + 0x15, 194 IHEVCE_SYNCH_ERR_FREQ_FORCE_IDR_RECEIVED = IHEVCE_SYNCH_ERROR_START + 0x16, 195 IHEVCE_SYNCH_ERR_TOO_MANY_SEI_MSG = IHEVCE_SYNCH_ERROR_START + 0x17, 196 IHEVCE_SYNCH_ERR_SET_RES_NOT_SUPPORTED = IHEVCE_SYNCH_ERROR_START + 0x18 197 } IHEVCE_SYNCH_ERROR_TAG_T; 198 199 /** 200 * @brief Enumerations for output status identifier 201 */ 202 typedef enum 203 { 204 IHEVCE_PROCESS = 0, 205 IHEVCE_CONTROL_STS, 206 IHEVCE_CREATE_STS, 207 } IHEVCE_OUT_STS_ID_T; 208 209 /** 210 * Scenetype enums 211 */ 212 typedef enum 213 { 214 IHEVCE_SCENE_TYPE_NORMAL = 0, 215 IHEVCE_SCENE_TYPE_SCENE_CUT, 216 IHEVCE_SCENE_TYPE_FLASH, 217 IHEVCE_SCENE_TYPE_FADE_IN, 218 IHEVCE_SCENE_TYPE_FADE_OUT, 219 IHEVCE_SCENE_TYPE_DISSOLVE, 220 IHEVCE_MAX_NUM_SCENE_TYPES 221 } IHEVCE_SCENE_TYPE; 222 223 /** 224 * Type of data. Used for scanning the config file 225 */ 226 typedef enum 227 { 228 IHEVCE_STRING = 0, 229 IHEVCE_INT, 230 IHEVCE_FLOAT 231 } IHEVCE_DATA_TYPE; 232 233 /*****************************************************************************/ 234 /* Structure */ 235 /*****************************************************************************/ 236 237 /** 238 * @brief Structure to describe the properties of Source of encoder. 239 */ 240 typedef struct 241 { 242 /** Used for checking version compatibility */ 243 WORD32 i4_size; 244 245 /** Input chroma format 246 * @sa : IV_COLOR_FORMAT_T 247 */ 248 WORD32 inp_chr_format; 249 250 /** Internal chroma format 251 * @sa : IV_COLOR_FORMAT_T 252 */ 253 WORD32 i4_chr_format; 254 255 /** Width of input luma */ 256 WORD32 i4_width; 257 258 /** Height of input luma */ 259 WORD32 i4_height; 260 261 /** Configured Width of input luma */ 262 WORD32 i4_orig_width; 263 264 /** Configured Height of input luma */ 265 WORD32 i4_orig_height; 266 267 /** Width of each pixel in bits */ 268 WORD32 i4_input_bit_depth; 269 270 /** Input Content Type 271 * @sa : IV_CONTENT_TYPE_T 272 */ 273 WORD32 i4_field_pic; 274 275 /** Frame/Field rate numerator 276 * (final fps = frame_rate_num/frame_rate_denom) 277 */ 278 WORD32 i4_frm_rate_num; 279 280 /** Can be 1000 or 1001 to allow proper representation 281 * of fractional frame-rates 282 */ 283 WORD32 i4_frm_rate_denom; 284 285 /** 286 * Whether Top field is encoded first or bottom 287 */ 288 WORD32 i4_topfield_first; 289 290 } ihevce_src_params_t; 291 292 /*****************************************************************************/ 293 /* Structure */ 294 /*****************************************************************************/ 295 /** 296 * @brief Structure to describe attributes of a layer. 297 */ 298 typedef struct 299 { 300 /** Used for checking version compatibility */ 301 WORD32 i4_size; 302 303 /** Width of input luma */ 304 WORD32 i4_width; 305 306 /** Height of input luma */ 307 WORD32 i4_height; 308 309 /** Frame/Field rate 310 * (final fps = src frame_rate_num/src frame_rate_denom/i4_frm_rate_scale_factor) 311 */ 312 WORD32 i4_frm_rate_scale_factor; 313 314 /** Quality vs. complexity 315 * @sa : IHEVCE_QUALITY_CONFIG_T 316 */ 317 IHEVCE_QUALITY_CONFIG_T i4_quality_preset; 318 319 /** 0 : Level 4, any level above this not supported */ 320 WORD32 i4_codec_level; 321 322 /** Number of bit-rate instances for the current layer 323 */ 324 WORD32 i4_num_bitrate_instances; 325 326 /** Target Bit-rate in bits for Constant bitrate cases */ 327 WORD32 ai4_tgt_bitrate[IHEVCE_MAX_NUM_BITRATES]; 328 329 /** Peak Bit-rate in bits for each bitrate */ 330 WORD32 ai4_peak_bitrate[IHEVCE_MAX_NUM_BITRATES]; 331 332 /** Maximum VBV buffer size in bits for each and each bitrate */ 333 WORD32 ai4_max_vbv_buffer_size[IHEVCE_MAX_NUM_BITRATES]; 334 335 /** Frame level Qp for Constant Qp mode */ 336 WORD32 ai4_frame_qp[IHEVCE_MAX_NUM_BITRATES]; 337 338 } ihevce_tgt_params_t; 339 340 /*****************************************************************************/ 341 /* Structure */ 342 /*****************************************************************************/ 343 /** 344 * @brief Structure to describe the properties of target 345 resolution of encoder. 346 */ 347 typedef struct 348 { 349 /** Used for checking version compatibility */ 350 WORD32 i4_size; 351 352 /** Number of resolution layers 353 */ 354 WORD32 i4_num_res_layers; 355 356 /* Applicable only for multi res cases. 357 Output of only one resolution to be dumped */ 358 359 WORD32 i4_mres_single_out; 360 361 /* Specify starting resolution id for mres single out case. 362 This is only valid in mres_single out mode */ 363 364 WORD32 i4_start_res_id; 365 366 /** To enable reuse across layers 367 */ 368 WORD32 i4_multi_res_layer_reuse; 369 370 /** Quality vs. complexity for auxilary bitrates 371 * @sa : IHEVCE_QUALITY_CONFIG_MBR_T 372 */ 373 IHEVCE_QUALITY_CONFIG_MBR_T i4_mbr_quality_setting; 374 375 /** 376 *Bit depth used by encoder 377 */ 378 WORD32 i4_internal_bit_depth; 379 380 /** 381 *Temporal scalability enable Flag 382 */ 383 WORD32 i4_enable_temporal_scalability; 384 385 /** Resolution and frame rate scaling factors for 386 * each layer 387 */ 388 ihevce_tgt_params_t as_tgt_params[IHEVCE_MAX_NUM_RESOLUTIONS]; 389 390 /*Scaler handle */ 391 void *pv_scaler_handle; 392 393 /*Function pointer for scaling luma data*/ 394 void (*pf_scale_luma)( 395 void *pv_scaler_handle, 396 UWORD8 *pu1_in_buf, 397 WORD32 i4_inp_width, 398 WORD32 i4_inp_height, 399 WORD32 i4_inp_stride, 400 UWORD8 *pu1_out_buf, 401 WORD32 i4_out_width, 402 WORD32 i4_out_height, 403 WORD32 i4_out_stride); 404 405 /*Function pointer for scaling chroma data*/ 406 void (*pf_scale_chroma)( 407 void *pv_scaler_handle, 408 UWORD8 *pu1_in_buf, 409 WORD32 i4_inp_width, 410 WORD32 i4_inp_height, 411 WORD32 i4_inp_stride, 412 UWORD8 *pu1_out_buf, 413 WORD32 i4_out_width, 414 WORD32 i4_out_height, 415 WORD32 i4_out_stride); 416 417 } ihevce_tgt_layer_params_t; 418 419 /** 420 * @brief Structure to describe the stream level 421 * properties encoder should adhere to 422 */ 423 typedef struct 424 { 425 /** Used for checking version compatibility */ 426 WORD32 i4_size; 427 428 /** 0 - HEVC , no other value supported */ 429 WORD32 i4_codec_type; 430 431 /**1 : Main Profile ,2: Main 10 Profile. no other value supported */ 432 WORD32 i4_codec_profile; 433 434 /** 0: Main Tier ,1: High Tier. no other value supported */ 435 WORD32 i4_codec_tier; 436 437 /** Enable VUI output 1: enable 0 : disable */ 438 WORD32 i4_vui_enable; 439 440 /** Enable specific SEI messages in the stream 441 * 1: enable 0 : disable 442 */ 443 WORD32 i4_sei_enable_flag; 444 445 /** Enable specific SEI payload (other than pic timing and buffering period) messages in the stream 446 * 1: enable 0 : disable 447 */ 448 WORD32 i4_sei_payload_enable_flag; 449 450 /** Enable specific SEI buffering period messages in the stream 451 * 1: enable 0 : disable 452 */ 453 WORD32 i4_sei_buffer_period_flags; 454 455 /** Enable specific SEI Picture timing messages in the stream 456 * 1: enable 0 : disable 457 */ 458 WORD32 i4_sei_pic_timing_flags; 459 460 /** Enable specific SEI recovery point messages in the stream 461 * 1: enable 0 : disable 462 */ 463 WORD32 i4_sei_recovery_point_flags; 464 465 /** Enable specific SEI mastering display colour volume in the stream 466 * 1: enable 0 : disable 467 */ 468 WORD32 i4_sei_mastering_disp_colour_vol_flags; 469 470 /** 471 * Array to store the display_primaries_x values 472 */ 473 UWORD16 au2_display_primaries_x[3]; 474 475 /** 476 * Array to store the display_primaries_y values 477 */ 478 UWORD16 au2_display_primaries_y[3]; 479 480 /** 481 * Variable to store the white point x value 482 */ 483 UWORD16 u2_white_point_x; 484 485 /** 486 * Variable to store the white point y value 487 */ 488 UWORD16 u2_white_point_y; 489 490 /** 491 * Variable to store the max display mastering luminance value 492 */ 493 UWORD32 u4_max_display_mastering_luminance; 494 495 /** 496 * Variable to store the min display mastering luminance value 497 */ 498 UWORD32 u4_min_display_mastering_luminance; 499 500 /** 501 * Enable Content Level Light Info 502 */ 503 WORD32 i4_sei_cll_enable; 504 505 /** 506 * 16bit unsigned number which indicates the maximum pixel intensity of all samples in bit-stream in units of 1 candela per square metre 507 */ 508 UWORD16 u2_sei_max_cll; 509 510 /** 511 * 16bit unsigned number which indicates the average pixel intensity of all samples in bit-stream in units of 1 candela per square metre 512 */ 513 UWORD16 u2_sei_avg_cll; 514 515 /** Enable/Disable SEI Hash on the Decoded picture & Hash type 516 * 3 : Checksum, 2 : CRC, 1 : MD5, 0 : disable 517 */ 518 WORD32 i4_decoded_pic_hash_sei_flag; 519 520 /** Enable specific AUD messages in the stream 521 * 1: enable 0 : disable 522 */ 523 WORD32 i4_aud_enable_flags; 524 525 /** Enable EOS messages in the stream 526 * 1: enable 0 : disable 527 */ 528 WORD32 i4_eos_enable_flags; 529 530 /** Enable automatic insertion of SPS at each CDR 531 * 1: enable 0 : disable 532 */ 533 WORD32 i4_sps_at_cdr_enable; 534 535 WORD32 i4_interop_flags; 536 537 } ihevce_out_strm_params_t; 538 539 /** 540 * @brief Structure to describe the Encoding Coding tools 541 * to be used by the Encoder 542 */ 543 typedef struct 544 { 545 /** Used for checking version compatibility*/ 546 WORD32 i4_size; 547 548 /** Max spacing between IDR frames - 549 * 0 indicates only at the beginning 550 */ 551 WORD32 i4_max_closed_gop_period; 552 553 /** Min spacing between IDR frames - 554 * Max = Min provides fixed segment length 555 */ 556 WORD32 i4_min_closed_gop_period; 557 558 /** Max spacing between CRA frames - 559 * 560 */ 561 WORD32 i4_max_cra_open_gop_period; 562 563 /** Max spacing between I frames - 564 * 565 */ 566 WORD32 i4_max_i_open_gop_period; 567 568 /** Maximum number of dyadic temporal layers */ 569 WORD32 i4_max_temporal_layers; 570 571 /** Maximum number of reference frames */ 572 WORD32 i4_max_reference_frames; 573 574 /** Enable weighted prediction 575 * 0 - disabled (default); 1 -enabled 576 */ 577 WORD32 i4_weighted_pred_enable; 578 579 /** Deblocking type 0 - no deblocking; 580 * 1 - default; 2 - disable across slices 581 */ 582 WORD32 i4_deblocking_type; 583 584 /** Use default scaling matrices 585 * 0 - disabled; 1 - enabled (default) 586 */ 587 WORD32 i4_use_default_sc_mtx; 588 589 /** Cropping mode for cases where frame dimensions 590 * are not multiple of MIN CU size 591 * 1 - enable padding to min_cu multiple and generate cropping flags; 592 * 0 - report error 593 */ 594 WORD32 i4_cropping_mode; 595 596 /** 0 - no slices; 1 - packet based; 2 - CU based */ 597 WORD32 i4_slice_type; 598 599 /** Use default scaling matrices 600 * 0 - disabled; 1 - enabled (default) 601 */ 602 WORD32 i4_enable_entropy_sync; 603 604 /** VQET control parameter */ 605 WORD32 i4_vqet; 606 607 } ihevce_coding_params_t; 608 609 /** 610 * @brief Structure to describe the Configurable parameters of Encoder 611 */ 612 typedef struct 613 { 614 /** Used for checking version compatibility */ 615 WORD32 i4_size; 616 617 /* ---------- Tiles related parameters ------------ */ 618 619 /* ----------- CU related parameters -------------- */ 620 621 /** 4 - 16x16; 5 - 32x32 (default); 6 - 64x64 */ 622 WORD32 i4_max_log2_cu_size; 623 624 /** 3 - 8x8; 4 - 16x16 (default); 5 - 32x32 ; 6 - 64x64 */ 625 WORD32 i4_min_log2_cu_size; 626 627 /** 2 - 4x4 (default) ; 3 - 8x8; 4 - 16x16; 5 - 32x32 */ 628 WORD32 i4_min_log2_tu_size; 629 630 /** 2 - 4x4; 3 - 8x8 (default); 4 - 16x16; 5 - 32x32 */ 631 WORD32 i4_max_log2_tu_size; 632 633 /** Max transform tree depth for intra */ 634 WORD32 i4_max_tr_tree_depth_I; 635 636 /** Max transform tree depth for inter */ 637 WORD32 i4_max_tr_tree_depth_nI; 638 639 /* ---------- Rate Control related parameters ------ */ 640 641 /** Rate control mode 0 - constant qp (default); 1- CBR */ 642 WORD32 i4_rate_control_mode; 643 644 /** CU level Qp modulation 645 0 - No Qp modulation at CU level; 646 1 - QP modulation level 1 647 2 - QP modulation level 2 648 3 - QP modulation level 3*/ 649 WORD32 i4_cu_level_rc; 650 651 /* Unused variable retained for backward compatibility*/ 652 WORD32 i4_rate_factor; 653 654 /** Enable stuffing 0 - disabled (default); 1 -enabled */ 655 WORD32 i4_stuffing_enable; 656 657 /*The max deivaiton allowed from file size (used only in VBR, in CBR vbv buffer size dictates the deviaiton allowed)*/ 658 WORD32 i4_vbr_max_peak_rate_dur; 659 660 /*Number of frames to encode. required to control allowed bit deviation at any point of time*/ 661 WORD32 i4_num_frms_to_encode; 662 663 /** Initial buffer fullness when decoding starts */ 664 WORD32 i4_init_vbv_fullness; 665 666 /** Frame level I frame max qp in rate control mode */ 667 WORD32 i4_max_frame_qp; 668 669 /** Frame level I frame min qp in rate control mode */ 670 WORD32 i4_min_frame_qp; 671 /* --------- ME related parameters ---------------- */ 672 673 /** Maximum search range in full pel units. horizontal direction */ 674 WORD32 i4_max_search_range_horz; 675 676 /** Maximum search range in full pel units. vertical direction */ 677 WORD32 i4_max_search_range_vert; 678 } ihevce_config_prms_t; 679 680 /** 681 * @brief Structure to describe Dynamic configuralbe 682 * parameters of encoder 683 * 684 * these new params can be passed as async commands 685 * to the enocder by sending a IHEVCE_CMD_CTL_SETPARAMS command 686 */ 687 typedef struct 688 { 689 /** Used for checking version compatibility */ 690 WORD32 i4_size; 691 692 /** Resolution ID of the stream for which bitrate change needs to be applied */ 693 WORD32 i4_tgt_res_id; 694 695 /** Bitrate ID in the Resolution ID of the stream for which bitrate change needs to be applied */ 696 WORD32 i4_tgt_br_id; 697 698 /** New Target Bit-rate for on the fly change */ 699 WORD32 i4_new_tgt_bitrate; 700 701 /** New Peak Bit-rate for on the fly change */ 702 WORD32 i4_new_peak_bitrate; 703 } ihevce_dyn_config_prms_t; 704 705 /** 706 * @brief Structure to describe Dynamic configuralbe 707 * parameters of encoder for dynamic resolution change 708 * 709 * these new params can be passed as synchromous commands 710 * to the enocder by sending a IHEVCE_SYNCH_API_SET_RES_TAG command 711 */ 712 typedef struct 713 { 714 /** Resolution ID of the stream for which bitrate change needs to be applied */ 715 WORD32 i4_new_res_id; 716 717 /** New Target Bit-rate for on the fly change */ 718 WORD32 i4_new_tgt_bitrate; 719 720 } ihevce_dyn_res_prms_t; 721 722 /** 723 * @brief Structure to describe the Look Ahead 724 * Processing Parameters of Encoder 725 */ 726 typedef struct 727 { 728 /** Used for checking version compatibility */ 729 WORD32 i4_size; 730 731 /** Number of frames to look-ahead for RC and adaptive quant - 732 * counts each fields as one frame for interlaced 733 */ 734 WORD32 i4_rc_look_ahead_pics; 735 736 /** Enable computation of weights & offsets for weighted prediction */ 737 WORD32 i4_enable_wts_ofsts; 738 739 /* Enables denoiser as a part of video preprocessing. */ 740 WORD32 i4_denoise_enable; 741 742 /* Enable this flag if input is interlaced and output is progressive */ 743 WORD32 i4_deinterlacer_enable; 744 745 } ihevce_lap_params_t; 746 747 /** 748 * @brief Structure to describe the parameters 749 * related to multi-bitrate encoding 750 */ 751 typedef struct 752 { 753 /** Number of bit-rate instances */ 754 WORD32 i4_num_bitrate_instances; 755 756 /* Number of intra modes to be evaluated for derived instance */ 757 WORD32 i4_num_modes_intra; 758 759 /* Number of inter modes to be evaluated for derived instance */ 760 WORD32 i4_num_modes_inter; 761 762 } ihevce_mbr_params_t; 763 764 /** 765 * @brief Vui/Sei parameters of Encoder 766 */ 767 typedef struct 768 { 769 /** 770 * indicates the presence of aspect_ratio 771 */ 772 UWORD8 u1_aspect_ratio_info_present_flag; 773 774 /** 775 * specifies the aspect ratio of the luma samples 776 */ 777 UWORD8 au1_aspect_ratio_idc[IHEVCE_MAX_NUM_RESOLUTIONS]; 778 779 /** 780 * width of the luma samples. user dependent 781 */ 782 UWORD16 au2_sar_width[IHEVCE_MAX_NUM_RESOLUTIONS]; 783 784 /** 785 * height of the luma samples. user dependent 786 */ 787 UWORD16 au2_sar_height[IHEVCE_MAX_NUM_RESOLUTIONS]; 788 789 /** 790 * if 1, specifies that the overscan_appropriate_flag is present 791 * if 0, the preferred display method for the video signal is unspecified 792 */ 793 UWORD8 u1_overscan_info_present_flag; 794 795 /** 796 * if 1,indicates that the cropped decoded pictures output 797 * are suitable for display using overscan 798 */ 799 UWORD8 u1_overscan_appropriate_flag; 800 801 /** 802 * if 1 specifies that video_format, video_full_range_flag and 803 * colour_description_present_flag are present 804 */ 805 UWORD8 u1_video_signal_type_present_flag; 806 807 /** 808 * 809 */ 810 UWORD8 u1_video_format; 811 812 /** 813 * indicates the black level and range of the luma and chroma signals 814 */ 815 UWORD8 u1_video_full_range_flag; 816 817 /** 818 * if 1,to 1 specifies that colour_primaries, transfer_characteristics 819 * and matrix_coefficients are present 820 */ 821 UWORD8 u1_colour_description_present_flag; 822 823 /** 824 * indicates the chromaticity coordinates of the source primaries 825 */ 826 UWORD8 u1_colour_primaries; 827 828 /** 829 * indicates the opto-electronic transfer characteristic of the source picture 830 */ 831 UWORD8 u1_transfer_characteristics; 832 833 /** 834 * the matrix coefficients used in deriving luma and chroma signals 835 * from the green, blue, and red primaries 836 */ 837 UWORD8 u1_matrix_coefficients; 838 839 /** 840 * if 1, specifies that chroma_sample_loc_type_top_field and 841 * chroma_sample_loc_type_bottom_field are present 842 */ 843 UWORD8 u1_chroma_loc_info_present_flag; 844 845 /** 846 * location of chroma samples 847 */ 848 UWORD8 u1_chroma_sample_loc_type_top_field; 849 850 UWORD8 u1_chroma_sample_loc_type_bottom_field; 851 852 /** 853 * to 1 specifies that the syntax structure hrd_parameters is present in the vui_parameters syntax structue 854 */ 855 UWORD8 u1_vui_hrd_parameters_present_flag; 856 857 /** 858 * VUI level HRD parameters 859 */ 860 //hrd_params_t s_vui_hrd_parameters; 861 862 /** 863 * HRD parameter Indicates the presence of the 864 * num_units_in_ticks, time_scale flag 865 */ 866 UWORD8 u1_timing_info_present_flag; 867 868 /** 869 * Nal- hrd parameters flag 870 */ 871 UWORD8 u1_nal_hrd_parameters_present_flag; 872 873 } ihevce_vui_sei_params_t; 874 875 /** 876 * @brief Multi thread related parameters passed to the encoder during create 877 */ 878 879 typedef struct 880 { 881 /** Kept for maintaining backwards compatibility in future */ 882 WORD32 i4_size; 883 884 /** Total number of logical cores, which are assigned to be used by the encoder 885 */ 886 WORD32 i4_max_num_cores; 887 888 /** Total number of groups in the machine on which encoder is run. 889 */ 890 WORD32 i4_num_proc_groups; 891 892 /** Total number of logical cores present per processor group of the machine. 893 */ 894 WORD32 ai4_num_cores_per_grp[MAX_NUMBER_PROC_GRPS]; 895 896 /** Flag to enableUse thread affintiy feature 897 * 0: Thread affinity disabled 898 * 1: Thread affinity enabled 899 */ 900 WORD32 i4_use_thrd_affinity; 901 902 /** 903 * Memory allocation control flag: Reserved (to be used later) 904 */ 905 WORD32 i4_memory_alloc_ctrl_flag; 906 907 /** 908 * Array of thread affinity masks for frame processing threads 909 * PRE Enc Group 910 */ 911 ULWORD64 au8_core_aff_mask[MAX_NUM_CORES]; 912 913 } ihevce_static_multi_thread_params_t; 914 915 /** 916 * @brief File IO APIs 917 */ 918 typedef struct 919 { 920 FILE *(*ihevce_fopen)(void *pv_cb_handle, const char *pi1_filename, const char *pi1_mode); 921 922 int (*ihevce_fclose)(void *pv_cb_handle, FILE *pf_stream); 923 924 int (*ihevce_fflush)(void *pv_cb_handle, FILE *pf_stream); 925 926 int (*ihevce_fseek)(void *pv_cb_handle, FILE *pf_stream, long i4_offset, int i4_origin); 927 928 size_t (*ihevce_fread)( 929 void *pv_cb_handle, void *pv_ptr, size_t u4_size, size_t u4_count, FILE *pf_stream); 930 931 int (*ihevce_fscanf)( 932 void *pv_cb_handle, 933 IHEVCE_DATA_TYPE e_data_type, 934 FILE *file_ptr, 935 const char *format, 936 void *pv_dst); 937 938 int (*ihevce_fprintf)(void *pv_cb_handle, FILE *pf_stream, const char *pi1_format, ...); 939 940 size_t (*ihevce_fwrite)( 941 void *pv_cb_handle, const void *pv_ptr, size_t i4_size, size_t i4_count, FILE *pf_stream); 942 943 char *(*ihevce_fgets)(void *pv_cb_handle, char *pi1_str, int i4_size, FILE *pf_stream); 944 945 } ihevce_file_io_api_t; 946 947 /** 948 * @brief System APIs to implement call back functions in encoder 949 */ 950 typedef struct 951 { 952 /*Call back handle for all system api*/ 953 void *pv_cb_handle; 954 955 /* Console APIs */ 956 int (*ihevce_printf)(void *pv_cb_handle, const char *i1_str, ...); 957 958 //int (*ihevce_scanf) (void *pv_handle, const char *i1_str, ...); 959 960 int (*ihevce_sscanf)(void *pv_cb_handle, const char *pv_src, const char *format, int *p_dst_int); 961 962 int (*ihevce_sprintf)(void *pv_cb_handle, char *pi1_str, const char *format, ...); 963 964 int (*ihevce_sprintf_s)( 965 void *pv_cb_handle, char *pi1_str, size_t i4_size, const char *format, ...); 966 967 /* File I/O APIs */ 968 ihevce_file_io_api_t s_file_io_api; 969 970 } ihevce_sys_api_t; 971 972 /** 973 * @brief Structure to describe multipass related params 974 */ 975 typedef struct 976 { 977 /** Kept for maintaining backwards compatibility in future */ 978 WORD32 i4_size; 979 980 /* 0:Normal mode 1: only dumps stat 2: 2nd pass reads from stat file and rewrites the same file*/ 981 WORD32 i4_pass; 982 983 /* Flag to specify the algorithm used for bit-distribution 984 in second pass */ 985 WORD32 i4_multi_pass_algo_mode; 986 987 /* Stat file to read or write data of frame statistics */ 988 WORD8 *pi1_frame_stats_filename; 989 990 /* stat file to read or write data of gop level statstics*/ 991 WORD8 *pi1_gop_stats_filename; 992 993 /* Stat file to read or write CTB level data*/ 994 WORD8 *pi1_sub_frames_stats_filename; 995 996 } ihevce_pass_prms_t; 997 998 /** 999 * @brief Structure to describe tile params 1000 */ 1001 typedef struct 1002 { 1003 /** Kept for maintaining backwards compatibility in future */ 1004 WORD32 i4_size; 1005 1006 /* flag to indicate tile encoding enabled/disabled */ 1007 WORD32 i4_tiles_enabled_flag; 1008 1009 /* flag to indicate unifrom spacing of tiles */ 1010 WORD32 i4_uniform_spacing_flag; 1011 1012 /* num syntactical tiles in a frame */ 1013 WORD32 i4_num_tile_cols; 1014 WORD32 i4_num_tile_rows; 1015 1016 /* Column width array to store width of each tile column */ 1017 WORD32 ai4_column_width[MAX_TILE_COLUMNS]; 1018 1019 /* Row height array to store height of each tile row */ 1020 WORD32 ai4_row_height[MAX_TILE_ROWS]; 1021 1022 } ihevce_app_tile_params_t; 1023 1024 /** 1025 * @brief Structure to describe slice params 1026 */ 1027 typedef struct 1028 { 1029 /** Kept for maintaining backwards compatibility in future */ 1030 WORD32 i4_size; 1031 1032 /** Flag to control dependent slices. 1033 0: Disable all slice segment limits 1034 1: Enforce max number of CTBs 1035 2: Enforce max number of bytes **/ 1036 WORD32 i4_slice_segment_mode; 1037 1038 /** Depending on i4_slice_segment_mode being: 1039 1: max number of CTBs per slice segment 1040 2: max number of bytes per slice segment **/ 1041 WORD32 i4_slice_segment_argument; 1042 1043 } ihevce_slice_params_t; 1044 1045 /** 1046 * @brief Static configuration parameters of Encoder 1047 */ 1048 typedef struct 1049 { 1050 /** Kept for maintaining backwards compatibility in future */ 1051 WORD32 i4_size; 1052 1053 /** Structure describing the input parameters - Applciatiopn should populate 1054 * maximum values in this structure . Run time values 1055 * should always be lessthan create time values 1056 */ 1057 ihevce_src_params_t s_src_prms; 1058 1059 /** Parmeters for target use-case */ 1060 ihevce_tgt_layer_params_t s_tgt_lyr_prms; 1061 1062 /** Output stream parameters */ 1063 ihevce_out_strm_params_t s_out_strm_prms; 1064 1065 /** Coding parameters for the encoder */ 1066 ihevce_coding_params_t s_coding_tools_prms; 1067 1068 /** Configurable parameters for Encoder */ 1069 ihevce_config_prms_t s_config_prms; 1070 1071 /** VUI SEI app parameters*/ 1072 ihevce_vui_sei_params_t s_vui_sei_prms; 1073 1074 /** Multi threads specific pamrameters */ 1075 ihevce_static_multi_thread_params_t s_multi_thrd_prms; 1076 1077 /** Look-ahead processor related parameters */ 1078 ihevce_lap_params_t s_lap_prms; 1079 1080 /** Save Recon flag */ 1081 WORD32 i4_save_recon; 1082 1083 /** Compute PSNR Flag */ 1084 /* 0: No logs 1085 1: (Frame level:Bits generation + POC) + (summary level: BitRate) 1086 2: (Frame level:Bits generation + POC + Qp + Pic-type) + (summary level: BitRate + PSNR) 1087 */ 1088 WORD32 i4_log_dump_level; 1089 1090 WORD32 i4_enable_csv_dump; 1091 1092 FILE *apF_csv_file[IHEVCE_MAX_NUM_RESOLUTIONS][IHEVCE_MAX_NUM_BITRATES]; 1093 1094 /** Enable Logo for Eval versions */ 1095 WORD32 i4_enable_logo; 1096 1097 /* API structure for exporting console and file I/O operation */ 1098 ihevce_sys_api_t s_sys_api; 1099 1100 /* Structure to describe multipass related params */ 1101 ihevce_pass_prms_t s_pass_prms; 1102 1103 /* Structure to describe tile params */ 1104 ihevce_app_tile_params_t s_app_tile_params; 1105 1106 /** Structure to describe slice segment params */ 1107 ihevce_slice_params_t s_slice_params; 1108 1109 /** Resolution ID of the current encoder context **/ 1110 WORD32 i4_res_id; 1111 1112 /** Bitrate ID of the current encoder context **/ 1113 WORD32 i4_br_id; 1114 1115 /* Architecture type */ 1116 IV_ARCH_T e_arch_type; 1117 1118 /* Control to free the entropy output buffers */ 1119 /* 1 for non_blocking mode */ 1120 /* and 0 for blocking mode */ 1121 WORD32 i4_outbuf_buf_free_control; 1122 1123 } ihevce_static_cfg_params_t; 1124 1125 /** 1126 * @brief Input structure in which input data and 1127 * other parameters are sent to Encoder 1128 */ 1129 typedef struct 1130 { 1131 /** Kept for maintaining backwards compatibility in future */ 1132 WORD32 i4_size; 1133 1134 /** Buffer id for the current buffer */ 1135 WORD32 i4_buf_id; 1136 1137 /** is bottom field 0 = top field, 1 = bottom field */ 1138 WORD32 i4_bottom_field; 1139 1140 /** top field first input in case of interlaced case */ 1141 WORD32 i4_topfield_first; 1142 1143 /** input time stamp in terms of ticks: lower 32 */ 1144 WORD32 i4_inp_timestamp_low; 1145 1146 /** input time stamp in terms of ticks: higher 32 */ 1147 WORD32 i4_inp_timestamp_high; 1148 1149 /** colour format of input, 1150 * should be same as create time value 1151 */ 1152 WORD32 u1_colour_format; 1153 1154 /** 1155 * Input frame buffer valid flag 1156 * 1 : valid data is present in the s_input_buf 1157 * 0 : Only command buffer is valid input buffer is a non valid input (dumy input) 1158 */ 1159 WORD32 i4_inp_frm_data_valid_flag; 1160 1161 /** Synchronous control commands buffer 1162 * this will an Tag Length Value (TLV) buffer. 1163 * All commands must be terminated with a tag 1164 * Tag should be set to IHEVCE_SYNCH_API_END_TAG 1165 */ 1166 void *pv_synch_ctrl_bufs; 1167 1168 /** 1169 * Synchronous control commands buffer 1170 * size in number of bytes 1171 */ 1172 WORD32 i4_cmd_buf_size; 1173 1174 /** for system use if run time buffer allocation is used*/ 1175 void *pv_metadata; 1176 1177 /** for system to pass frame context from Input to Output 1178 Same pointer will be returned on the output buffer of this frame */ 1179 void *pv_app_frm_ctxt; 1180 1181 /** Input YUV buffers pointers and related parameters 1182 * are set in this structure 1183 */ 1184 iv_yuv_buf_t s_input_buf; 1185 1186 } iv_input_data_ctrl_buffs_t; 1187 1188 /** 1189 * @brief Input structure in which input async control 1190 * commands are sent to Encoder 1191 */ 1192 typedef struct 1193 { 1194 /** Kept for maintaining backwards compatibility in future */ 1195 WORD32 i4_size; 1196 1197 /** Buffer id for the current buffer */ 1198 WORD32 i4_buf_id; 1199 1200 /** Asynchronous control commands buffer 1201 * this will an Tag Length Value (TLV) buffer. 1202 * The buffer must be ended with a IHEVCE_ASYNCH_API_END_TAG 1203 */ 1204 void *pv_asynch_ctrl_bufs; 1205 1206 /** 1207 * Asynchronous control commands buffer 1208 * size in number of bytes 1209 */ 1210 WORD32 i4_cmd_buf_size; 1211 1212 } iv_input_ctrl_buffs_t; 1213 1214 /** 1215 * @brief Ouput structure in which ouput data 1216 * and related parameters are sent from Encoder 1217 */ 1218 typedef struct 1219 { 1220 /** Kept for maintaining backwards compatibility in future */ 1221 WORD32 i4_size; 1222 1223 /** Buffer id for the current buffer */ 1224 WORD32 i4_buf_id; 1225 1226 /** processing status of the current output returned */ 1227 WORD32 i4_process_ret_sts; 1228 1229 /** if error encountered the error code */ 1230 WORD32 i4_process_error_code; 1231 1232 /** picture type of the current encoded output */ 1233 IV_PICTURE_CODING_TYPE_T i4_encoded_frame_type; 1234 1235 /** output time stamp of curr encoded buffer : lower 32 */ 1236 WORD32 i4_out_timestamp_low; 1237 1238 /** output time stamp of curr encoded buffer : higher 32 */ 1239 WORD32 i4_out_timestamp_high; 1240 1241 /** skip status of the current encoded output */ 1242 WORD32 i4_frame_skipped; 1243 1244 /** bytes generated in the output buffer */ 1245 WORD32 i4_bytes_generated; 1246 1247 /** End flag to communicate this is last frame output from encoder */ 1248 WORD32 i4_end_flag; 1249 1250 /** End flag to communicate encoder that this is the last buffer from application 1251 1 - Last buf, 0 - Not last buffer. No other values are supported. 1252 Application has to set the appropriate value before queing in encoder queue */ 1253 WORD32 i4_is_last_buf; 1254 1255 /** DBF level after the dynamic bitrate change 1256 -1 - Value not set by codec 1257 Encoder sets to positive value when bitrate change control call is done*/ 1258 LWORD64 i8_cur_vbv_level; 1259 1260 /** Output buffer pointer */ 1261 void *pv_bitstream_bufs; 1262 1263 /** Output buffer size */ 1264 WORD32 i4_bitstream_buf_size; 1265 1266 /** Can be used for tracking purpose if run time buffer allocation is used*/ 1267 void *pv_metadata; 1268 1269 /** for system to retrive frame context from Input to Output */ 1270 void *pv_app_frm_ctxt; 1271 1272 /** Can be used for tracking the buffer that is sent back during callback */ 1273 WORD32 i4_cb_buf_id; 1274 1275 /** Number of Prefix Non-VCL NAL units in the output buffer */ 1276 WORD32 i4_num_non_vcl_prefix_nals; 1277 1278 /** Number of Suffix Non-VCL NAL units in the output buffer */ 1279 WORD32 i4_num_non_vcl_suffix_nals; 1280 1281 /** Number of VCL NAL units in the output buffer */ 1282 WORD32 i4_num_vcl_nals; 1283 1284 /************************************************************************/ 1285 /* Size of each NAL based on type: Non-VCL Prefix/ VCL / Non-VCL Suffix */ 1286 /* */ 1287 /* Ordering of NALS in output buffer is as follows: */ 1288 /* Non-VCL Prefix NALs -> VCL NALs -> Non-VCL Suffix NALs */ 1289 /* */ 1290 /* As there are no holes between adjacent NALs, these sizes can be used */ 1291 /* to compute the offsets w.r.t start of the output buffer */ 1292 /************************************************************************/ 1293 1294 /** Array to the store the size in bytes of Prefix Non-VCL NAL units */ 1295 WORD32 ai4_size_non_vcl_prefix_nals[MAX_NUM_PREFIX_NALS_PER_AU]; 1296 1297 /* Array to the store the size in bytes of Suffix Non-VCL NAL units */ 1298 WORD32 ai4_size_non_vcl_suffix_nals[MAX_NUM_SUFFIX_NALS_PER_AU]; 1299 1300 /** Array to the store the size in bytes of VCL NAL units */ 1301 WORD32 ai4_size_vcl_nals[MAX_NUM_VCL_NALS_PER_AU]; 1302 1303 } iv_output_data_buffs_t; 1304 1305 /** 1306 * @brief Output structure in which output async control 1307 * acknowledgement are sent from Encoder 1308 */ 1309 typedef struct 1310 { 1311 /** Kept for maintaining backwards compatibility in future */ 1312 WORD32 i4_size; 1313 1314 /** Buffer id for the current buffer */ 1315 WORD32 i4_buf_id; 1316 1317 /** Asynchronous control commands ack buffer 1318 * this will an Tag Length Value (TLV) buffer. 1319 */ 1320 void *pv_status_bufs; 1321 1322 } iv_output_status_buffs_t; 1323 1324 /** 1325 * @brief structure in which recon data 1326 * and related parameters are sent from Encoder 1327 */ 1328 typedef struct 1329 { 1330 /** Kept for maintaining backwards compatibility in future */ 1331 WORD32 i4_size; 1332 1333 /** Buffer id for the current buffer */ 1334 WORD32 i4_buf_id; 1335 1336 /** POC of the current buffer */ 1337 WORD32 i4_poc; 1338 1339 /** End flag to communicate this is last frame output from encoder */ 1340 WORD32 i4_end_flag; 1341 1342 /** End flag to communicate encoder that this is the last buffer from application 1343 1 - Last buf, 0 - Not last buffer. No other values are supported. 1344 Application has to set the appropriate value before queing in encoder queue */ 1345 WORD32 i4_is_last_buf; 1346 1347 /** Recon luma buffer pointer */ 1348 void *pv_y_buf; 1349 1350 /** Recon cb buffer pointer */ 1351 void *pv_cb_buf; 1352 1353 /** Recon cr buffer pointer */ 1354 void *pv_cr_buf; 1355 1356 /** Luma size **/ 1357 WORD32 i4_y_pixels; 1358 1359 /** Chroma size **/ 1360 WORD32 i4_uv_pixels; 1361 1362 } iv_recon_data_buffs_t; 1363 1364 /* @brief iv_res_layer_output_bufs_req_t: This structure contains the parameters 1365 * related to output (data and control) buffer requirements of the codec for all 1366 * target resolution layers 1367 * Application can call the memory query API to get these requirements 1368 */ 1369 1370 typedef struct 1371 { 1372 /** i4_size of the structure : used for verison tracking */ 1373 WORD32 i4_size; 1374 1375 /*Memory requirements for each of target resolutions*/ 1376 iv_output_bufs_req_t s_output_buf_req[IHEVCE_MAX_NUM_RESOLUTIONS][IHEVCE_MAX_NUM_BITRATES]; 1377 1378 } iv_res_layer_output_bufs_req_t; 1379 1380 /* @brief iv_res_layer_recon_bufs_req_t: This structure contains the parameters 1381 * related to recon buffer requirements of the codec for all target resolution layers 1382 * Application can call the memory query API to get these requirements 1383 */ 1384 1385 typedef struct 1386 { 1387 /** i4_size of the structure : used for verison tracking */ 1388 WORD32 i4_size; 1389 1390 /*Memory requirements for each of target resolutions*/ 1391 iv_recon_bufs_req_t s_recon_buf_req[IHEVCE_MAX_NUM_RESOLUTIONS][IHEVCE_MAX_NUM_BITRATES]; 1392 } iv_res_layer_recon_bufs_req_t; 1393 1394 /* @brief iv_res_layer_output_data_buffs_desc_t: This structure contains 1395 * the parameters related to output data buffers for all target resolution layers 1396 */ 1397 1398 typedef struct 1399 { 1400 /** i4_size of the structure : used for verison tracking */ 1401 WORD32 i4_size; 1402 1403 /*Output buffer requirements of each taregt resolution layer*/ 1404 iv_output_data_buffs_desc_t s_output_data_buffs[IHEVCE_MAX_NUM_RESOLUTIONS] 1405 [IHEVCE_MAX_NUM_BITRATES]; 1406 1407 } iv_res_layer_output_data_buffs_desc_t; 1408 1409 /* @brief iv_res_layer_output_status_buffs_desc_t: This structure contains 1410 * the parameters related to recon data buffers for all target resolution layers 1411 */ 1412 1413 typedef struct 1414 { 1415 /** i4_size of the structure : used for verison tracking */ 1416 WORD32 i4_size; 1417 1418 /*Output buffer requirements of each taregt resolution layer*/ 1419 iv_recon_data_buffs_desc_t s_recon_data_buffs[IHEVCE_MAX_NUM_RESOLUTIONS] 1420 [IHEVCE_MAX_NUM_BITRATES]; 1421 1422 } iv_res_layer_recon_data_buffs_desc_t; 1423 1424 #endif // _IHEVCE_API_H_ 1425