1 /****************************************************************************** 2 * 3 * Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore 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 /** 19 ******************************************************************************* 20 * @file 21 * ihevcd_cxa.h 22 * 23 * @brief 24 * This file contains all the necessary structure and enumeration 25 * definitions needed for the Application Program Interface(API) of the 26 * Ittiam HEVC decoder on Cortex Ax 27 * 28 * @author 29 * Harish 30 * 31 * @remarks 32 * None 33 * 34 ******************************************************************************* 35 */ 36 #ifndef __IHEVCD_CXA_H__ 37 #define __IHEVCD_CXA_H__ 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 #include "iv.h" 42 #include "ivd.h" 43 44 45 /*****************************************************************************/ 46 /* Constant Macros */ 47 /*****************************************************************************/ 48 49 /*****************************************************************************/ 50 /* Function Macros */ 51 /*****************************************************************************/ 52 #define IS_IVD_CONCEALMENT_APPLIED(x) (x & (1 << IVD_APPLIEDCONCEALMENT)) 53 #define IS_IVD_INSUFFICIENTDATA_ERROR(x) (x & (1 << IVD_INSUFFICIENTDATA)) 54 #define IS_IVD_CORRUPTEDDATA_ERROR(x) (x & (1 << IVD_CORRUPTEDDATA)) 55 #define IS_IVD_CORRUPTEDHEADER_ERROR(x) (x & (1 << IVD_CORRUPTEDHEADER)) 56 #define IS_IVD_UNSUPPORTEDINPUT_ERROR(x) (x & (1 << IVD_UNSUPPORTEDINPUT)) 57 #define IS_IVD_UNSUPPORTEDPARAM_ERROR(x) (x & (1 << IVD_UNSUPPORTEDPARAM)) 58 #define IS_IVD_FATAL_ERROR(x) (x & (1 << IVD_FATALERROR)) 59 #define IS_IVD_INVALID_BITSTREAM_ERROR(x) (x & (1 << IVD_INVALID_BITSTREAM)) 60 #define IS_IVD_INCOMPLETE_BITSTREAM_ERROR(x) (x & (1 << IVD_INCOMPLETE_BITSTREAM)) 61 62 63 /*****************************************************************************/ 64 /* API Function Prototype */ 65 /*****************************************************************************/ 66 IV_API_CALL_STATUS_T ihevcd_cxa_api_function(iv_obj_t *ps_handle, 67 void *pv_api_ip, 68 void *pv_api_op); 69 70 /*****************************************************************************/ 71 /* Enums */ 72 /*****************************************************************************/ 73 /* Codec Error codes for HEVC Decoder */ 74 75 76 typedef enum { 77 /** 78 * No error 79 */ 80 IHEVCD_SUCCESS = 0, 81 82 /** 83 * Codec calls done without successful init 84 */ 85 IHEVCD_INIT_NOT_DONE = IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS, 86 87 88 IHEVCD_CXA_VID_HDR_DEC_NUM_FRM_BUF_NOT_SUFFICIENT, 89 90 /** 91 * Unsupported level passed as an argument 92 */ 93 IHEVCD_LEVEL_UNSUPPORTED, 94 /** 95 * Unsupported number of reference pictures passed as an argument 96 */ 97 IHEVCD_NUM_REF_UNSUPPORTED, 98 /** 99 * Unsupported number of reorder pictures passed as an argument 100 */ 101 IHEVCD_NUM_REORDER_UNSUPPORTED, 102 /** 103 * Unsupported number of extra display pictures passed as an argument 104 */ 105 IHEVCD_NUM_EXTRA_DISP_UNSUPPORTED, 106 /** 107 * Invalid display stride requested. 108 */ 109 IHEVCD_INVALID_DISP_STRD, 110 111 /** 112 * Reached end of sequence 113 */ 114 IHEVCD_END_OF_SEQUENCE, 115 116 /** 117 * Width/height greater than max width and max height 118 */ 119 IHEVCD_UNSUPPORTED_DIMENSIONS, 120 121 /** 122 * Buffer size to hold version string is not sufficient 123 * Allocate more to hold version string 124 */ 125 IHEVCD_CXA_VERS_BUF_INSUFFICIENT, 126 /** 127 * Stream chroma format other than YUV420 128 */ 129 IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC, 130 131 /** 132 * Generic failure 133 */ 134 IHEVCD_FAIL = 0x7FFFFFFF 135 136 137 }IHEVCD_CXA_ERROR_CODES_T; 138 139 /*****************************************************************************/ 140 /* Extended Structures */ 141 /*****************************************************************************/ 142 143 144 /*****************************************************************************/ 145 /* Delete Codec */ 146 /*****************************************************************************/ 147 148 typedef struct { 149 ivd_delete_ip_t s_ivd_delete_ip_t; 150 }ihevcd_cxa_delete_ip_t; 151 152 153 typedef struct { 154 ivd_delete_op_t s_ivd_delete_op_t; 155 }ihevcd_cxa_delete_op_t; 156 157 /*****************************************************************************/ 158 /* Initialize decoder */ 159 /*****************************************************************************/ 160 161 typedef struct { 162 ivd_create_ip_t s_ivd_create_ip_t; 163 }ihevcd_cxa_create_ip_t; 164 165 166 typedef struct { 167 ivd_create_op_t s_ivd_create_op_t; 168 }ihevcd_cxa_create_op_t; 169 170 /*****************************************************************************/ 171 /* Video Decode */ 172 /*****************************************************************************/ 173 174 typedef struct { 175 176 /** 177 * ivd_video_decode_ip_t 178 */ 179 ivd_video_decode_ip_t s_ivd_video_decode_ip_t; 180 }ihevcd_cxa_video_decode_ip_t; 181 182 183 typedef struct { 184 185 /** 186 * ivd_video_decode_op_t 187 */ 188 ivd_video_decode_op_t s_ivd_video_decode_op_t; 189 }ihevcd_cxa_video_decode_op_t; 190 191 192 /*****************************************************************************/ 193 /* Get Display Frame */ 194 /*****************************************************************************/ 195 196 typedef struct 197 { 198 /** 199 * ivd_get_display_frame_ip_t 200 */ 201 ivd_get_display_frame_ip_t s_ivd_get_display_frame_ip_t; 202 }ihevcd_cxa_get_display_frame_ip_t; 203 204 205 typedef struct 206 { 207 /** 208 * ivd_get_display_frame_op_t 209 */ 210 ivd_get_display_frame_op_t s_ivd_get_display_frame_op_t; 211 }ihevcd_cxa_get_display_frame_op_t; 212 213 /*****************************************************************************/ 214 /* Set Display Frame */ 215 /*****************************************************************************/ 216 217 218 typedef struct 219 { 220 /** 221 * ivd_set_display_frame_ip_t 222 */ 223 ivd_set_display_frame_ip_t s_ivd_set_display_frame_ip_t; 224 }ihevcd_cxa_set_display_frame_ip_t; 225 226 227 typedef struct 228 { 229 /** 230 * ivd_set_display_frame_op_t 231 */ 232 ivd_set_display_frame_op_t s_ivd_set_display_frame_op_t; 233 }ihevcd_cxa_set_display_frame_op_t; 234 235 /*****************************************************************************/ 236 /* Release Display Buffers */ 237 /*****************************************************************************/ 238 239 240 typedef struct 241 { 242 /** 243 * ivd_rel_display_frame_ip_t 244 */ 245 246 ivd_rel_display_frame_ip_t s_ivd_rel_display_frame_ip_t; 247 }ihevcd_cxa_rel_display_frame_ip_t; 248 249 250 typedef struct 251 { 252 /** 253 * ivd_rel_display_frame_op_t 254 */ 255 ivd_rel_display_frame_op_t s_ivd_rel_display_frame_op_t; 256 }ihevcd_cxa_rel_display_frame_op_t; 257 258 259 typedef enum 260 { 261 /** Set number of cores/threads to be used */ 262 IHEVCD_CXA_CMD_CTL_SET_NUM_CORES = IVD_CMD_CTL_CODEC_SUBCMD_START, 263 264 /** Set processor details */ 265 IHEVCD_CXA_CMD_CTL_SET_PROCESSOR = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x001, 266 267 /** Get display buffer dimensions */ 268 IHEVCD_CXA_CMD_CTL_GET_BUFFER_DIMENSIONS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x100, 269 270 /** Get VUI parameters */ 271 IHEVCD_CXA_CMD_CTL_GET_VUI_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x101, 272 273 /** Get SEI Mastering display color volume parameters */ 274 IHEVCD_CXA_CMD_CTL_GET_SEI_MASTERING_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x102, 275 276 /** Enable/disable GPU, supported on select platforms */ 277 IHEVCD_CXA_CMD_CTL_GPU_ENABLE_DISABLE = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x200, 278 279 /** Set degrade level */ 280 IHEVCD_CXA_CMD_CTL_DEGRADE = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x300 281 }IHEVCD_CXA_CMD_CTL_SUB_CMDS; 282 /*****************************************************************************/ 283 /* Video control Flush */ 284 /*****************************************************************************/ 285 286 287 typedef struct { 288 289 /** 290 * ivd_ctl_flush_ip_t 291 */ 292 ivd_ctl_flush_ip_t s_ivd_ctl_flush_ip_t; 293 }ihevcd_cxa_ctl_flush_ip_t; 294 295 296 typedef struct { 297 298 /** 299 * ivd_ctl_flush_op_t 300 */ 301 ivd_ctl_flush_op_t s_ivd_ctl_flush_op_t; 302 }ihevcd_cxa_ctl_flush_op_t; 303 304 /*****************************************************************************/ 305 /* Video control reset */ 306 /*****************************************************************************/ 307 308 309 typedef struct { 310 311 /** 312 * ivd_ctl_reset_ip_t 313 */ 314 ivd_ctl_reset_ip_t s_ivd_ctl_reset_ip_t; 315 }ihevcd_cxa_ctl_reset_ip_t; 316 317 318 typedef struct { 319 320 /** 321 * ivd_ctl_reset_op_t 322 */ 323 ivd_ctl_reset_op_t s_ivd_ctl_reset_op_t; 324 }ihevcd_cxa_ctl_reset_op_t; 325 326 327 /*****************************************************************************/ 328 /* Video control Set Params */ 329 /*****************************************************************************/ 330 331 332 typedef struct { 333 334 /** 335 * ivd_ctl_set_config_ip_t 336 */ 337 ivd_ctl_set_config_ip_t s_ivd_ctl_set_config_ip_t; 338 }ihevcd_cxa_ctl_set_config_ip_t; 339 340 341 typedef struct { 342 343 /** 344 * ivd_ctl_set_config_op_t 345 */ 346 ivd_ctl_set_config_op_t s_ivd_ctl_set_config_op_t; 347 }ihevcd_cxa_ctl_set_config_op_t; 348 349 /*****************************************************************************/ 350 /* Video control:Get Buf Info */ 351 /*****************************************************************************/ 352 353 354 typedef struct { 355 356 /** 357 * ivd_ctl_getbufinfo_ip_t 358 */ 359 ivd_ctl_getbufinfo_ip_t s_ivd_ctl_getbufinfo_ip_t; 360 }ihevcd_cxa_ctl_getbufinfo_ip_t; 361 362 363 364 typedef struct { 365 366 /** 367 * ivd_ctl_getbufinfo_op_t 368 */ 369 ivd_ctl_getbufinfo_op_t s_ivd_ctl_getbufinfo_op_t; 370 }ihevcd_cxa_ctl_getbufinfo_op_t; 371 372 373 /*****************************************************************************/ 374 /* Video control:Getstatus Call */ 375 /*****************************************************************************/ 376 377 378 typedef struct { 379 380 /** 381 * ivd_ctl_getstatus_ip_t 382 */ 383 ivd_ctl_getstatus_ip_t s_ivd_ctl_getstatus_ip_t; 384 }ihevcd_cxa_ctl_getstatus_ip_t; 385 386 387 388 typedef struct { 389 390 /** 391 * ivd_ctl_getstatus_op_t 392 */ 393 ivd_ctl_getstatus_op_t s_ivd_ctl_getstatus_op_t; 394 395 /** 396 * Height of the coding picture without cropping 397 */ 398 UWORD32 u4_coded_pic_ht; 399 400 /** 401 * Width of the coding picture without cropping 402 */ 403 UWORD32 u4_coded_pic_wd; 404 }ihevcd_cxa_ctl_getstatus_op_t; 405 406 407 /*****************************************************************************/ 408 /* Video control:Get Version Info */ 409 /*****************************************************************************/ 410 411 412 typedef struct { 413 414 /** 415 * ivd_ctl_getversioninfo_ip_t 416 */ 417 ivd_ctl_getversioninfo_ip_t s_ivd_ctl_getversioninfo_ip_t; 418 }ihevcd_cxa_ctl_getversioninfo_ip_t; 419 420 421 422 typedef struct { 423 424 /** 425 * ivd_ctl_getversioninfo_op_t 426 */ 427 ivd_ctl_getversioninfo_op_t s_ivd_ctl_getversioninfo_op_t; 428 }ihevcd_cxa_ctl_getversioninfo_op_t; 429 430 431 typedef struct { 432 433 /** 434 * u4_size 435 */ 436 UWORD32 u4_size; 437 438 /** 439 * cmd 440 */ 441 IVD_API_COMMAND_TYPE_T e_cmd; 442 443 /** 444 * sub_cmd 445 */ 446 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 447 448 /** 449 * Pictures that are are degraded 450 * 0 : No degrade 451 * 1 : Only on non-reference frames 452 * 2 : Use interval specified by u4_nondegrade_interval 453 * 3 : All non-key frames 454 * 4 : All frames 455 */ 456 WORD32 i4_degrade_pics; 457 458 /** 459 * Interval for pictures which are completely decoded without any degradation 460 */ 461 WORD32 i4_nondegrade_interval; 462 463 /** 464 * bit position (lsb is zero): Type of degradation 465 * 0 : Disable SAO 466 * 1 : Disable deblocking 467 * 2 : Faster inter prediction filters 468 * 3 : Fastest inter prediction filters 469 */ 470 WORD32 i4_degrade_type; 471 472 }ihevcd_cxa_ctl_degrade_ip_t; 473 474 typedef struct 475 { 476 /** 477 * u4_size 478 */ 479 UWORD32 u4_size; 480 481 /** 482 * error_code 483 */ 484 UWORD32 u4_error_code; 485 }ihevcd_cxa_ctl_degrade_op_t; 486 487 typedef struct 488 { 489 490 /** 491 * size 492 */ 493 UWORD32 u4_size; 494 495 /** 496 * cmd 497 */ 498 IVD_API_COMMAND_TYPE_T e_cmd; 499 500 /** 501 * sub_cmd 502 */ 503 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 504 505 /** 506 * num_cores 507 */ 508 UWORD32 u4_num_cores; 509 }ihevcd_cxa_ctl_set_num_cores_ip_t; 510 511 typedef struct 512 { 513 514 /** 515 * size 516 */ 517 UWORD32 u4_size; 518 519 /** 520 * error_code 521 */ 522 UWORD32 u4_error_code; 523 }ihevcd_cxa_ctl_set_num_cores_op_t; 524 525 typedef struct 526 { 527 /** 528 * size 529 */ 530 UWORD32 u4_size; 531 /** 532 * cmd 533 */ 534 IVD_API_COMMAND_TYPE_T e_cmd; 535 /** 536 * sub cmd 537 */ 538 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 539 /** 540 * Processor type 541 */ 542 UWORD32 u4_arch; 543 /** 544 * SOC type 545 */ 546 UWORD32 u4_soc; 547 548 /** 549 * num_cores 550 */ 551 UWORD32 u4_num_cores; 552 553 }ihevcd_cxa_ctl_set_processor_ip_t; 554 555 typedef struct 556 { 557 /** 558 * size 559 */ 560 UWORD32 u4_size; 561 /** 562 * error_code 563 */ 564 UWORD32 u4_error_code; 565 }ihevcd_cxa_ctl_set_processor_op_t; 566 567 typedef struct 568 { 569 570 /** 571 * size 572 */ 573 UWORD32 u4_size; 574 575 /** 576 * cmd 577 */ 578 IVD_API_COMMAND_TYPE_T e_cmd; 579 580 /** 581 * sub cmd 582 */ 583 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 584 }ihevcd_cxa_ctl_get_frame_dimensions_ip_t; 585 586 587 typedef struct { 588 589 /** 590 * size 591 */ 592 UWORD32 u4_size; 593 594 /** 595 * error_code 596 */ 597 UWORD32 u4_error_code; 598 599 /** 600 * x_offset[3] 601 */ 602 UWORD32 u4_x_offset[3]; 603 604 /** 605 * y_offset[3] 606 */ 607 UWORD32 u4_y_offset[3]; 608 609 /** 610 * disp_wd[3] 611 */ 612 UWORD32 u4_disp_wd[3]; 613 614 /** 615 * disp_ht[3] 616 */ 617 UWORD32 u4_disp_ht[3]; 618 619 /** 620 * buffer_wd[3] 621 */ 622 UWORD32 u4_buffer_wd[3]; 623 624 /** 625 * buffer_ht[3] 626 */ 627 UWORD32 u4_buffer_ht[3]; 628 }ihevcd_cxa_ctl_get_frame_dimensions_op_t; 629 630 typedef struct { 631 UWORD32 u4_size; 632 IVD_API_COMMAND_TYPE_T e_cmd; 633 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 634 }ihevcd_cxa_ctl_get_vui_params_ip_t; 635 636 typedef struct { 637 UWORD32 u4_size; 638 UWORD32 u4_error_code; 639 640 /** 641 * indicates the presence of aspect_ratio 642 */ 643 UWORD8 u1_aspect_ratio_info_present_flag; 644 645 /** 646 * specifies the aspect ratio of the luma samples 647 */ 648 UWORD8 u1_aspect_ratio_idc; 649 650 /** 651 * width of the luma samples. user dependent 652 */ 653 UWORD16 u2_sar_width; 654 655 /** 656 * hieght of the luma samples. user dependent 657 */ 658 UWORD16 u2_sar_height; 659 660 /** 661 * if 1, specifies that the overscan_appropriate_flag is present 662 * if 0, the preferred display method for the video signal is unspecified 663 */ 664 UWORD8 u1_overscan_info_present_flag; 665 666 /** 667 * if 1,indicates that the cropped decoded pictures output 668 * are suitable for display using overscan 669 */ 670 UWORD8 u1_overscan_appropriate_flag; 671 672 /** 673 * if 1 specifies that video_format, video_full_range_flag and 674 * colour_description_present_flag are present 675 */ 676 UWORD8 u1_video_signal_type_present_flag; 677 678 /** 679 * 680 */ 681 UWORD8 u1_video_format; 682 683 /** 684 * indicates the black level and range of the luma and chroma signals 685 */ 686 UWORD8 u1_video_full_range_flag; 687 688 /** 689 * if 1,to 1 specifies that colour_primaries, transfer_characteristics 690 * and matrix_coefficients are present 691 */ 692 UWORD8 u1_colour_description_present_flag; 693 694 /** 695 * indicates the chromaticity coordinates of the source primaries 696 */ 697 UWORD8 u1_colour_primaries; 698 699 /** 700 * indicates the opto-electronic transfer characteristic of the source picture 701 */ 702 UWORD8 u1_transfer_characteristics; 703 704 /** 705 * the matrix coefficients used in deriving luma and chroma signals 706 * from the green, blue, and red primaries 707 */ 708 UWORD8 u1_matrix_coefficients; 709 710 /** 711 * if 1, specifies that chroma_sample_loc_type_top_field and 712 * chroma_sample_loc_type_bottom_field are present 713 */ 714 UWORD8 u1_chroma_loc_info_present_flag; 715 716 /** 717 * location of chroma samples 718 */ 719 UWORD8 u1_chroma_sample_loc_type_top_field; 720 721 UWORD8 u1_chroma_sample_loc_type_bottom_field; 722 723 /** 724 * if 1, indicates that the value of all decoded chroma samples is 725 * equal to 1 << ( BitDepthC - 1 ) 726 */ 727 UWORD8 u1_neutral_chroma_indication_flag; 728 729 /** 730 * 1 indicates that the coded video sequence conveys pictures that represent fields 731 * 0 indicates the pictures that represents field 732 */ 733 UWORD8 u1_field_seq_flag; 734 735 /** 736 * specifies that picture timing SEI messages are present for every picture 737 */ 738 UWORD8 u1_frame_field_info_present_flag; 739 740 /** 741 * 1 indicates that the default display window parameters follow next in the VUI 742 */ 743 UWORD8 u1_default_display_window_flag; 744 745 /** 746 * specify the samples of the pictures in the coded video sequence 747 * that are within the default display window, 748 * in terms of a rectangular region specified in picture coordinates for display 749 */ 750 UWORD32 u4_def_disp_win_left_offset; 751 752 UWORD32 u4_def_disp_win_right_offset; 753 754 UWORD32 u4_def_disp_win_top_offset; 755 756 UWORD32 u4_def_disp_win_bottom_offset; 757 758 /** 759 * to 1 specifies that the syntax structure hrd_parameters is present in the vui_parameters syntax structue 760 */ 761 UWORD8 u1_vui_hrd_parameters_present_flag; 762 763 /** 764 * Indicates the presence of the 765 * num_units_in_ticks, time_scale flag 766 */ 767 UWORD8 u1_vui_timing_info_present_flag; 768 769 /** 770 * Number of units that 771 * correspond to one increment of the 772 * clock. Indicates the resolution 773 */ 774 UWORD32 u4_vui_num_units_in_tick; 775 776 /** 777 * The number of time units that pass in one second 778 */ 779 UWORD32 u4_vui_time_scale; 780 /** 781 * if 1, indicates that the POC for each picture in the coded video sequence (cvs) (not the first picture), in decoding order, 782 * is proportional to the output time of the picture relative to that of the first picture in the cvs 783 */ 784 UWORD8 u1_poc_proportional_to_timing_flag; 785 786 /** 787 * num_ticks_poc_diff_one_minus1 plus 1 specifies the number of clock ticks 788 * corresponding to a difference of poc values equal to 1 789 */ 790 UWORD8 u1_num_ticks_poc_diff_one_minus1; 791 792 /** 793 * 1, specifies that the following cvs bitstream restriction parameters are present 794 */ 795 UWORD8 u1_bitstream_restriction_flag; 796 797 /** 798 * if 1, indicates that each pps that is active in the cvs has 799 * the same value of the tile syntax elements 800 */ 801 UWORD8 u1_tiles_fixed_structure_flag; 802 803 /** 804 * if 0, indicates that no pel outside the pic boundaries and 805 * no sub-pels derived using pels outside the pic boundaries is used for inter prediction 806 */ 807 UWORD8 u1_motion_vectors_over_pic_boundaries_flag; 808 809 /** 810 * if 1, indicates 811 * all P/B slices belonging to the same pic have an identical refpic list0, 812 * all B slices that belong to the same picture have an identical refpic list1. 813 */ 814 UWORD8 u1_restricted_ref_pic_lists_flag; 815 816 /** 817 * 818 */ 819 UWORD8 u4_min_spatial_segmentation_idc; 820 /** 821 * Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units 822 * associated with any coded picture 823 */ 824 UWORD8 u1_max_bytes_per_pic_denom; 825 826 /** 827 * Indicates an upper bound for the number of bits of coding_unit() data 828 */ 829 UWORD8 u1_max_bits_per_mincu_denom; 830 831 /** 832 * Indicate the maximum absolute value of a decoded horizontal MV component 833 * in quarter-pel luma units 834 */ 835 UWORD8 u1_log2_max_mv_length_horizontal; 836 837 /** 838 * Indicate the maximum absolute value of a decoded vertical MV component 839 * in quarter-pel luma units 840 */ 841 UWORD8 u1_log2_max_mv_length_vertical; 842 843 /** 844 * HRD parameters 845 */ 846 847 848 /** 849 * Indicates the presence of the 850 * num_units_in_ticks, time_scale flag 851 */ 852 UWORD8 u1_timing_info_present_flag; 853 854 /** 855 * Number of units that 856 * correspond to one increment of the 857 * clock. Indicates the resolution 858 */ 859 UWORD32 u4_num_units_in_tick; 860 861 /** 862 * The number of time units that pass in one second 863 */ 864 UWORD32 u4_time_scale; 865 866 /** 867 * Nal- hrd parameters flag 868 */ 869 UWORD8 u1_nal_hrd_parameters_present_flag; 870 871 /** 872 * VCL- hrd parameters flag 873 */ 874 UWORD8 u1_vcl_hrd_parameters_present_flag; 875 876 /** 877 * Indicates the presence of NAL-HRD params or VCL_HRD params 878 * in the bitstream 879 */ 880 UWORD8 u1_cpbdpb_delays_present_flag; 881 882 /** 883 * specifies that sub-picture level CPB removal delay parameters are 884 * present in picture timing SEI messages 885 */ 886 UWORD8 u1_sub_pic_cpb_params_present_flag; 887 888 /** 889 * specify the clock sub-tick 890 * (the minimum interval of time that can be represented in the coded data when sub_pic_cpb_params_present_flag is equal to 1) 891 */ 892 UWORD8 u1_tick_divisor_minus2; 893 894 /** 895 * specifies the length, in bits for the du cpb delay syntax in pt_sei 896 */ 897 UWORD8 u1_du_cpb_removal_delay_increment_length_minus1; 898 899 /** 900 * Indicates presence of sub_pic_cpb_params in pic timing sei 901 */ 902 UWORD8 u1_sub_pic_cpb_params_in_pic_timing_sei_flag; 903 904 /** 905 * Indicates dpb output delay for the du 906 */ 907 UWORD8 u1_dpb_output_delay_du_length_minus1; 908 909 /** 910 * (together with bit_rate_value_minus1) specifies the 911 * maximum input bit rate of the i-th CPB 912 */ 913 UWORD8 u4_bit_rate_scale; 914 915 /** 916 * (together with cpb_size_du_value_minus1) specfies 917 * CPB size of the i-th CPB when the CPB operates 918 * at the access unit level 919 */ 920 UWORD8 u4_cpb_size_scale; 921 922 /** 923 * (together with cpb_size_du_value_minus1) specfies 924 * CPB size of the i-th CPB when the CPB operates 925 * at the sub-picture level 926 */ 927 UWORD8 u4_cpb_size_du_scale; 928 929 930 /** 931 * specifies the length, in bits for initial cpb delay (nal/vcl)sysntax in bp sei 932 */ 933 UWORD8 u1_initial_cpb_removal_delay_length_minus1; 934 935 /** 936 * specifies the length, in bits for the au cpb delay syntax in pt_sei 937 */ 938 UWORD8 u1_au_cpb_removal_delay_length_minus1; 939 940 /** 941 * specifies the length, in bits, of the pic_dpb_output_delay syntax element in the pt SEI message 942 */ 943 UWORD8 u1_dpb_output_delay_length_minus1; 944 945 /** 946 * if 1, , for the highest temporal sub-layers, the temporal distance between the HRD output times 947 * of consecutive pictures in output order is constrained refer to Table E-6 948 */ 949 UWORD8 au1_fixed_pic_rate_general_flag[6]; 950 951 UWORD8 au1_fixed_pic_rate_within_cvs_flag[6]; 952 953 /** 954 * if 1, , for the highest temporal sub-layers, the temporal distance (in clock ticks) between the 955 * element units that specify HRD output times of consecutive pictures in output order is constrained 956 * refer to Table E-6 957 */ 958 UWORD8 au1_elemental_duration_in_tc_minus1[6]; 959 960 /** 961 * specifies the HRD operational mode 962 */ 963 UWORD8 au1_low_delay_hrd_flag[6]; 964 965 /** 966 * 1 specifies the number of alternative CPB specifications in the 967 * bitstream of the cvs when HighestTid is equal to i 968 */ 969 UWORD8 au1_cpb_cnt_minus1[6]; 970 }ihevcd_cxa_ctl_get_vui_params_op_t; 971 972 typedef struct 973 { 974 UWORD32 u4_size; 975 IVD_API_COMMAND_TYPE_T e_cmd; 976 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 977 }ihevcd_cxa_ctl_get_sei_mastering_params_ip_t; 978 979 typedef struct 980 { 981 UWORD32 u4_size; 982 UWORD32 u4_error_code; 983 984 /** 985 * Array to store the display_primaries_x values 986 */ 987 UWORD16 au2_display_primaries_x[3]; 988 989 /** 990 * Array to store the display_primaries_y values 991 */ 992 UWORD16 au2_display_primaries_y[3]; 993 994 /** 995 * Variable to store the white point x value 996 */ 997 UWORD16 u2_white_point_x; 998 999 /** 1000 * Variable to store the white point y value 1001 */ 1002 UWORD16 u2_white_point_y; 1003 1004 /** 1005 * Variable to store the max display mastering luminance value 1006 */ 1007 UWORD32 u4_max_display_mastering_luminance; 1008 1009 /** 1010 * Variable to store the min display mastering luminance value 1011 */ 1012 UWORD32 u4_min_display_mastering_luminance; 1013 1014 }ihevcd_cxa_ctl_get_sei_mastering_params_op_t; 1015 1016 #ifdef __cplusplus 1017 } /* closing brace for extern "C" */ 1018 #endif 1019 #endif /* __IHEVCD_CXA_H__ */ 1020