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