1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ***************************************************************************** 18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 /*****************************************************************************/ 21 /* */ 22 /* File Name : ih264d.h */ 23 /* */ 24 /* Description : This file contains all the necessary structure and */ 25 /* enumeration definitions needed for the Application */ 26 /* Program Interface(API) of the Ittiam H264 ASP */ 27 /* Decoder on Cortex A8 - Neon platform */ 28 /* */ 29 /* List of Functions : ih264d_api_function */ 30 /* */ 31 /* Issues / Problems : None */ 32 /* */ 33 /* Revision History : */ 34 /* */ 35 /* DD MM YYYY Author(s) Changes (Describe the changes made) */ 36 /* 26 08 2010 100239(RCY) Draft */ 37 /* */ 38 /*****************************************************************************/ 39 40 #ifndef _IH264D_H_ 41 #define _IH264D_H_ 42 #ifdef __cplusplus 43 extern "C" { 44 #endif 45 46 #include "iv.h" 47 #include "ivd.h" 48 49 50 /*****************************************************************************/ 51 /* Constant Macros */ 52 /*****************************************************************************/ 53 #define IVD_ERROR_MASK 0xFF 54 55 /*****************************************************************************/ 56 /* Function Macros */ 57 /*****************************************************************************/ 58 #define IS_IVD_CONCEALMENT_APPLIED(x) (x & (1 << IVD_APPLIEDCONCEALMENT)) 59 #define IS_IVD_INSUFFICIENTDATA_ERROR(x) (x & (1 << IVD_INSUFFICIENTDATA)) 60 #define IS_IVD_CORRUPTEDDATA_ERROR(x) (x & (1 << IVD_CORRUPTEDDATA)) 61 #define IS_IVD_CORRUPTEDHEADER_ERROR(x) (x & (1 << IVD_CORRUPTEDHEADER)) 62 #define IS_IVD_UNSUPPORTEDINPUT_ERROR(x) (x & (1 << IVD_UNSUPPORTEDINPUT)) 63 #define IS_IVD_UNSUPPORTEDPARAM_ERROR(x) (x & (1 << IVD_UNSUPPORTEDPARAM)) 64 #define IS_IVD_FATAL_ERROR(x) (x & (1 << IVD_FATALERROR)) 65 #define IS_IVD_INVALID_BITSTREAM_ERROR(x) (x & (1 << IVD_INVALID_BITSTREAM)) 66 #define IS_IVD_INCOMPLETE_BITSTREAM_ERROR(x) (x & (1 << IVD_INCOMPLETE_BITSTREAM)) 67 68 69 /*****************************************************************************/ 70 /* API Function Prototype */ 71 /*****************************************************************************/ 72 IV_API_CALL_STATUS_T ih264d_api_function(iv_obj_t *ps_handle, void *pv_api_ip,void *pv_api_op); 73 74 /*****************************************************************************/ 75 /* Enums */ 76 /*****************************************************************************/ 77 /* Codec Error codes for H264 ASP Decoder */ 78 79 typedef enum { 80 81 IH264D_VID_HDR_DEC_NUM_FRM_BUF_NOT_SUFFICIENT = IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS + 1, 82 IH264D_FRAME_INFO_OP_BUF_NULL, 83 IH264D_INSUFFICIENT_METADATA_BUFFER, 84 85 }IH264D_ERROR_CODES_T; 86 87 /*****************************************************************************/ 88 /* Extended Structures */ 89 /*****************************************************************************/ 90 91 92 /*****************************************************************************/ 93 /* Delete Codec */ 94 /*****************************************************************************/ 95 96 97 typedef struct { 98 ivd_delete_ip_t s_ivd_delete_ip_t; 99 }ih264d_delete_ip_t; 100 101 102 typedef struct{ 103 ivd_delete_op_t s_ivd_delete_op_t; 104 }ih264d_delete_op_t; 105 106 107 /*****************************************************************************/ 108 /* Initialize decoder */ 109 /*****************************************************************************/ 110 111 112 typedef struct { 113 ivd_create_ip_t s_ivd_create_ip_t; 114 115 /** 116 * enable_frm_info 117 */ 118 UWORD32 u4_enable_frame_info; 119 120 /** 121 * enable_threads 122 */ 123 UWORD32 u4_keep_threads_active; 124 }ih264d_create_ip_t; 125 126 127 typedef struct{ 128 ivd_create_op_t s_ivd_create_op_t; 129 }ih264d_create_op_t; 130 131 132 /*****************************************************************************/ 133 /* Video Decode */ 134 /*****************************************************************************/ 135 136 137 typedef struct { 138 ivd_video_decode_ip_t s_ivd_video_decode_ip_t; 139 140 /** 141 * 8x8 block QP map size 142 */ 143 UWORD32 u4_8x8_blk_qp_map_size; 144 145 /** 146 * 8x8 block QP map 147 */ 148 UWORD8 *pu1_8x8_blk_qp_map; 149 150 /** 151 * 8x8 block type map size 152 */ 153 UWORD32 u4_8x8_blk_type_map_size; 154 155 /** 156 * 8x8 block type map 157 */ 158 UWORD8 *pu1_8x8_blk_type_map; 159 }ih264d_video_decode_ip_t; 160 161 /*****************************************************************************/ 162 /* QP and block type maps are defined for each 8x8 MB sub-block. */ 163 /* QP can range from <0, 51> and block type can be INTER/INTRA/SKIP. */ 164 /* */ 165 /* Let’s say, a frame has a total of ‘m’ MBs (each 16x16). Since the QP */ 166 /* and block type are defined for each 8x8 block, hence each MB has */ 167 /* 4 entries giving m x 4 total entires for QP and block type map each. */ 168 /* */ 169 /* For example, for a frame of size 60x60 shown in the figure down, both */ 170 /* maps (QP and MB type) have the same layout. */ 171 /* Each block represents an 8x8 sub-block. Both width and height are aligned */ 172 /* to next largest multiple of 8, 64 in this case. */ 173 /* */ 174 /* 0 8 16 24 32 40 48 56 64 */ 175 /* 0 ------------------------------------------------ */ 176 /* | 0th | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | */ 177 /* 8 ------------------------------------------------ */ 178 /* | 8th | 9th | 10th | - | - | - | - | - | */ 179 /* 16 ------------------------------------------------ */ 180 /* | - | - | - | - | - | - | - | - | */ 181 /* 24 ------------------------------------------------ */ 182 /* | - | - | - | - | - | - | - | - | */ 183 /* 32 ------------------------------------------------ */ 184 /* | - | - | - | - | - | - | - | - | */ 185 /* 40 ------------------------------------------------ */ 186 /* | - | - | - | - | - | - | - | - | */ 187 /* 48 ------------------------------------------------ */ 188 /* | - | - | - | - | - | - | - | - | */ 189 /* 56 ------------------------------------------------ */ 190 /* | - | - | - | - | - | - | - | - | */ 191 /* 64 ------------------------------------------------ */ 192 /* */ 193 /*****************************************************************************/ 194 195 typedef struct{ 196 ivd_video_decode_op_t s_ivd_video_decode_op_t; 197 198 /** 199 * 8x8 block QP map size 200 */ 201 UWORD32 u4_8x8_blk_qp_map_size; 202 203 /** 204 * 8x8 block QP map 205 */ 206 UWORD8 *pu1_8x8_blk_qp_map; 207 208 /** 209 * 8x8 block type map size 210 */ 211 UWORD32 u4_8x8_blk_type_map_size; 212 213 /** 214 * 8x8 block type map 215 */ 216 UWORD8 *pu1_8x8_blk_type_map; 217 }ih264d_video_decode_op_t; 218 219 220 /*****************************************************************************/ 221 /* Get Display Frame */ 222 /*****************************************************************************/ 223 224 225 typedef struct 226 { 227 ivd_get_display_frame_ip_t s_ivd_get_display_frame_ip_t; 228 }ih264d_get_display_frame_ip_t; 229 230 231 typedef struct 232 { 233 ivd_get_display_frame_op_t s_ivd_get_display_frame_op_t; 234 }ih264d_get_display_frame_op_t; 235 236 /*****************************************************************************/ 237 /* Set Display Frame */ 238 /*****************************************************************************/ 239 240 241 typedef struct 242 { 243 ivd_set_display_frame_ip_t s_ivd_set_display_frame_ip_t; 244 }ih264d_set_display_frame_ip_t; 245 246 247 typedef struct 248 { 249 ivd_set_display_frame_op_t s_ivd_set_display_frame_op_t; 250 }ih264d_set_display_frame_op_t; 251 252 /*****************************************************************************/ 253 /* Release Display Buffers */ 254 /*****************************************************************************/ 255 256 257 typedef struct 258 { 259 ivd_rel_display_frame_ip_t s_ivd_rel_display_frame_ip_t; 260 }ih264d_rel_display_frame_ip_t; 261 262 263 typedef struct 264 { 265 ivd_rel_display_frame_op_t s_ivd_rel_display_frame_op_t; 266 }ih264d_rel_display_frame_op_t; 267 268 typedef enum { 269 /** Set number of cores/threads to be used */ 270 IH264D_CMD_CTL_SET_NUM_CORES = IVD_CMD_CTL_CODEC_SUBCMD_START, 271 272 /** Set processor details */ 273 IH264D_CMD_CTL_SET_PROCESSOR = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x001, 274 275 /** Get display buffer dimensions */ 276 IH264D_CMD_CTL_GET_BUFFER_DIMENSIONS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x100, 277 278 /** Get VUI parameters */ 279 IH264D_CMD_CTL_GET_VUI_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x101, 280 281 /** Enable/disable GPU, supported on select platforms */ 282 IH264D_CMD_CTL_GPU_ENABLE_DISABLE = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x200, 283 284 /** Set degrade level */ 285 IH264D_CMD_CTL_DEGRADE = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x300, 286 287 /** Get SEI MDCV parameters */ 288 IH264D_CMD_CTL_GET_SEI_MDCV_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x301, 289 290 /** Get SEI CLL parameters */ 291 IH264D_CMD_CTL_GET_SEI_CLL_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x302, 292 293 /** Get SEI AVE parameters */ 294 IH264D_CMD_CTL_GET_SEI_AVE_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x303, 295 296 /** Get SEI CCV parameters */ 297 IH264D_CMD_CTL_GET_SEI_CCV_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x304, 298 299 /** Get SEI SII parameters */ 300 IH264D_CMD_CTL_GET_SEI_SII_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x305, 301 302 /** Get SEI FGC parameters */ 303 IH264D_CMD_CTL_GET_SEI_FGC_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x306 304 305 }IH264D_CMD_CTL_SUB_CMDS; 306 /*****************************************************************************/ 307 /* Video control Flush */ 308 /*****************************************************************************/ 309 310 311 typedef struct{ 312 ivd_ctl_flush_ip_t s_ivd_ctl_flush_ip_t; 313 }ih264d_ctl_flush_ip_t; 314 315 316 typedef struct{ 317 ivd_ctl_flush_op_t s_ivd_ctl_flush_op_t; 318 }ih264d_ctl_flush_op_t; 319 320 /*****************************************************************************/ 321 /* Video control reset */ 322 /*****************************************************************************/ 323 324 325 typedef struct{ 326 ivd_ctl_reset_ip_t s_ivd_ctl_reset_ip_t; 327 }ih264d_ctl_reset_ip_t; 328 329 330 typedef struct{ 331 ivd_ctl_reset_op_t s_ivd_ctl_reset_op_t; 332 }ih264d_ctl_reset_op_t; 333 334 335 /*****************************************************************************/ 336 /* Video control Set Params */ 337 /*****************************************************************************/ 338 339 340 typedef struct { 341 ivd_ctl_set_config_ip_t s_ivd_ctl_set_config_ip_t; 342 }ih264d_ctl_set_config_ip_t; 343 344 345 typedef struct{ 346 ivd_ctl_set_config_op_t s_ivd_ctl_set_config_op_t; 347 }ih264d_ctl_set_config_op_t; 348 349 /*****************************************************************************/ 350 /* Video control:Get Buf Info */ 351 /*****************************************************************************/ 352 353 354 typedef struct{ 355 ivd_ctl_getbufinfo_ip_t s_ivd_ctl_getbufinfo_ip_t; 356 }ih264d_ctl_getbufinfo_ip_t; 357 358 359 360 typedef struct{ 361 ivd_ctl_getbufinfo_op_t s_ivd_ctl_getbufinfo_op_t; 362 }ih264d_ctl_getbufinfo_op_t; 363 364 365 /*****************************************************************************/ 366 /* Video control:Getstatus Call */ 367 /*****************************************************************************/ 368 369 370 typedef struct{ 371 ivd_ctl_getstatus_ip_t s_ivd_ctl_getstatus_ip_t; 372 }ih264d_ctl_getstatus_ip_t; 373 374 375 376 typedef struct{ 377 ivd_ctl_getstatus_op_t s_ivd_ctl_getstatus_op_t; 378 }ih264d_ctl_getstatus_op_t; 379 380 381 /*****************************************************************************/ 382 /* Video control:Get Version Info */ 383 /*****************************************************************************/ 384 385 386 typedef struct{ 387 ivd_ctl_getversioninfo_ip_t s_ivd_ctl_getversioninfo_ip_t; 388 }ih264d_ctl_getversioninfo_ip_t; 389 390 391 392 typedef struct{ 393 ivd_ctl_getversioninfo_op_t s_ivd_ctl_getversioninfo_op_t; 394 }ih264d_ctl_getversioninfo_op_t; 395 396 typedef struct{ 397 398 /** 399 * u4_size 400 */ 401 UWORD32 u4_size; 402 403 /** 404 * cmd 405 */ 406 IVD_API_COMMAND_TYPE_T e_cmd; 407 408 /** 409 * sub_cmd 410 */ 411 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 412 413 /** 414 * Pictures that are are degraded 415 * 0 : No degrade 416 * 1 : Only on non-reference frames 417 * 2 : Use interval specified by u4_nondegrade_interval 418 * 3 : All non-key frames 419 * 4 : All frames 420 */ 421 WORD32 i4_degrade_pics; 422 423 /** 424 * Interval for pictures which are completely decoded without any degradation 425 */ 426 WORD32 i4_nondegrade_interval; 427 428 /** 429 * bit position (lsb is zero): Type of degradation 430 * 1 : Disable deblocking 431 * 2 : Faster inter prediction filters 432 * 3 : Fastest inter prediction filters 433 */ 434 WORD32 i4_degrade_type; 435 436 }ih264d_ctl_degrade_ip_t; 437 438 typedef struct 439 { 440 /** 441 * u4_size 442 */ 443 UWORD32 u4_size; 444 445 /** 446 * error_code 447 */ 448 UWORD32 u4_error_code; 449 }ih264d_ctl_degrade_op_t; 450 451 typedef struct{ 452 UWORD32 u4_size; 453 IVD_API_COMMAND_TYPE_T e_cmd; 454 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 455 UWORD32 u4_disable_deblk_level; 456 }ih264d_ctl_disable_deblock_ip_t; 457 458 typedef struct{ 459 UWORD32 u4_size; 460 UWORD32 u4_error_code; 461 }ih264d_ctl_disable_deblock_op_t; 462 463 464 typedef struct{ 465 UWORD32 u4_size; 466 IVD_API_COMMAND_TYPE_T e_cmd; 467 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 468 UWORD32 u4_num_cores; 469 }ih264d_ctl_set_num_cores_ip_t; 470 471 typedef struct{ 472 UWORD32 u4_size; 473 UWORD32 u4_error_code; 474 }ih264d_ctl_set_num_cores_op_t; 475 476 typedef struct 477 { 478 /** 479 * i4_size 480 */ 481 UWORD32 u4_size; 482 /** 483 * cmd 484 */ 485 IVD_API_COMMAND_TYPE_T e_cmd; 486 /** 487 * sub cmd 488 */ 489 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 490 /** 491 * Processor type 492 */ 493 UWORD32 u4_arch; 494 /** 495 * SOC type 496 */ 497 UWORD32 u4_soc; 498 499 /** 500 * num_cores 501 */ 502 UWORD32 u4_num_cores; 503 504 }ih264d_ctl_set_processor_ip_t; 505 506 typedef struct 507 { 508 /** 509 * i4_size 510 */ 511 UWORD32 u4_size; 512 /** 513 * error_code 514 */ 515 UWORD32 u4_error_code; 516 }ih264d_ctl_set_processor_op_t; 517 518 typedef struct{ 519 UWORD32 u4_size; 520 IVD_API_COMMAND_TYPE_T e_cmd; 521 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 522 }ih264d_ctl_get_frame_dimensions_ip_t; 523 524 525 typedef struct{ 526 UWORD32 u4_size; 527 UWORD32 u4_error_code; 528 UWORD32 u4_x_offset[3]; 529 UWORD32 u4_y_offset[3]; 530 UWORD32 u4_disp_wd[3]; 531 UWORD32 u4_disp_ht[3]; 532 UWORD32 u4_buffer_wd[3]; 533 UWORD32 u4_buffer_ht[3]; 534 }ih264d_ctl_get_frame_dimensions_op_t; 535 536 typedef struct 537 { 538 UWORD32 u4_size; 539 IVD_API_COMMAND_TYPE_T e_cmd; 540 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 541 }ih264d_ctl_get_vui_params_ip_t; 542 543 typedef struct 544 { 545 UWORD32 u4_size; 546 UWORD32 u4_error_code; 547 UWORD8 u1_aspect_ratio_idc; 548 UWORD16 u2_sar_width; 549 UWORD16 u2_sar_height; 550 UWORD8 u1_overscan_appropriate_flag; 551 UWORD8 u1_video_format; 552 UWORD8 u1_video_full_range_flag; 553 UWORD8 u1_colour_primaries; 554 UWORD8 u1_tfr_chars; 555 UWORD8 u1_matrix_coeffs; 556 UWORD8 u1_cr_top_field; 557 UWORD8 u1_cr_bottom_field; 558 UWORD32 u4_num_units_in_tick; 559 UWORD32 u4_time_scale; 560 UWORD8 u1_fixed_frame_rate_flag; 561 UWORD8 u1_nal_hrd_params_present; 562 UWORD8 u1_vcl_hrd_params_present; 563 UWORD8 u1_low_delay_hrd_flag; 564 UWORD8 u1_pic_struct_present_flag; 565 UWORD8 u1_bitstream_restriction_flag; 566 UWORD8 u1_mv_over_pic_boundaries_flag; 567 UWORD32 u4_max_bytes_per_pic_denom; 568 UWORD32 u4_max_bits_per_mb_denom; 569 UWORD32 u4_log2_max_mv_length_horz; 570 UWORD32 u4_log2_max_mv_length_vert; 571 UWORD32 u4_num_reorder_frames; 572 UWORD32 u4_max_dec_frame_buffering; 573 }ih264d_ctl_get_vui_params_op_t; 574 575 576 typedef struct 577 { 578 /** 579 * u4_size 580 */ 581 UWORD32 u4_size; 582 583 /** 584 * cmd 585 */ 586 IVD_API_COMMAND_TYPE_T e_cmd; 587 588 /** 589 * sub_cmd 590 */ 591 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 592 }ih264d_ctl_get_sei_mdcv_params_ip_t; 593 594 typedef struct 595 { 596 /** 597 * u4_size 598 */ 599 UWORD32 u4_size; 600 601 /** 602 * error_code 603 */ 604 UWORD32 u4_error_code; 605 606 /** 607 * Array to store the display_primaries_x values 608 */ 609 UWORD16 au2_display_primaries_x[NUM_SEI_MDCV_PRIMARIES]; 610 611 /** 612 * Array to store the display_primaries_y values 613 */ 614 UWORD16 au2_display_primaries_y[NUM_SEI_MDCV_PRIMARIES]; 615 616 /** 617 * Variable to store the white point x value 618 */ 619 UWORD16 u2_white_point_x; 620 621 /** 622 * Variable to store the white point y value 623 */ 624 UWORD16 u2_white_point_y; 625 626 /** 627 * Variable to store the max display mastering luminance value 628 */ 629 UWORD32 u4_max_display_mastering_luminance; 630 631 /** 632 * Variable to store the min display mastering luminance value 633 */ 634 UWORD32 u4_min_display_mastering_luminance; 635 }ih264d_ctl_get_sei_mdcv_params_op_t; 636 637 typedef struct 638 { 639 /** 640 * u4_size 641 */ 642 UWORD32 u4_size; 643 644 /** 645 * cmd 646 */ 647 IVD_API_COMMAND_TYPE_T e_cmd; 648 649 /** 650 * sub_cmd 651 */ 652 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 653 }ih264d_ctl_get_sei_cll_params_ip_t; 654 655 typedef struct 656 { 657 /** 658 * u4_size 659 */ 660 UWORD32 u4_size; 661 662 /** 663 * error_code 664 */ 665 UWORD32 u4_error_code; 666 667 /** 668 * The maximum pixel intensity of all samples 669 */ 670 UWORD16 u2_max_content_light_level; 671 672 /** 673 * The average pixel intensity of all samples 674 */ 675 UWORD16 u2_max_pic_average_light_level; 676 } ih264d_ctl_get_sei_cll_params_op_t; 677 678 typedef struct 679 { 680 /** 681 * u4_size 682 */ 683 UWORD32 u4_size; 684 685 /** 686 * cmd 687 */ 688 IVD_API_COMMAND_TYPE_T e_cmd; 689 690 /** 691 * sub_cmd 692 */ 693 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 694 }ih264d_ctl_get_sei_ave_params_ip_t; 695 696 typedef struct 697 { 698 /** 699 * u4_size 700 */ 701 UWORD32 u4_size; 702 703 /** 704 * error_code 705 */ 706 UWORD32 u4_error_code; 707 708 /** 709 * specifies the environmental illluminance of the ambient viewing environment 710 */ 711 UWORD32 u4_ambient_illuminance; 712 713 /* 714 * specify the normalized x chromaticity coordinates of the 715 * environmental ambient light in the nominal viewing environment 716 */ 717 UWORD16 u2_ambient_light_x; 718 719 /* 720 * specify the normalized y chromaticity coordinates of the 721 * environmental ambient light in the nominal viewing environment 722 */ 723 UWORD16 u2_ambient_light_y; 724 } ih264d_ctl_get_sei_ave_params_op_t; 725 726 typedef struct 727 { 728 /** 729 * u4_size 730 */ 731 UWORD32 u4_size; 732 733 /** 734 * cmd 735 */ 736 IVD_API_COMMAND_TYPE_T e_cmd; 737 738 /** 739 * sub_cmd 740 */ 741 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 742 }ih264d_ctl_get_sei_ccv_params_ip_t; 743 744 typedef struct 745 { 746 /** 747 * u4_size 748 */ 749 UWORD32 u4_size; 750 751 /** 752 * error_code 753 */ 754 UWORD32 u4_error_code; 755 756 /* 757 * Flag used to control persistence of CCV SEI messages 758 */ 759 UWORD8 u1_ccv_cancel_flag; 760 761 /* 762 * specifies the persistence of the CCV SEI message for the current layer 763 */ 764 UWORD8 u1_ccv_persistence_flag; 765 766 /* 767 * specifies the presence of syntax elements ccv_primaries_x and ccv_primaries_y 768 */ 769 UWORD8 u1_ccv_primaries_present_flag; 770 771 /* 772 * specifies that the syntax element ccv_min_luminance_value is present 773 */ 774 UWORD8 u1_ccv_min_luminance_value_present_flag; 775 776 /* 777 * specifies that the syntax element ccv_max_luminance_value is present 778 */ 779 UWORD8 u1_ccv_max_luminance_value_present_flag; 780 781 /* 782 * specifies that the syntax element ccv_avg_luminance_value is present 783 */ 784 UWORD8 u1_ccv_avg_luminance_value_present_flag; 785 786 /* 787 * shall be equal to 0 in bitstreams conforming to this version. Other values 788 * for reserved_zero_2bits are reserved for future use 789 */ 790 UWORD8 u1_ccv_reserved_zero_2bits; 791 792 /* 793 * specify the normalized x chromaticity coordinates of the colour 794 * primary component c of the nominal content colour volume 795 */ 796 WORD32 ai4_ccv_primaries_x[NUM_SEI_CCV_PRIMARIES]; 797 798 /* 799 * specify the normalized y chromaticity coordinates of the colour 800 * primary component c of the nominal content colour volume 801 */ 802 WORD32 ai4_ccv_primaries_y[NUM_SEI_CCV_PRIMARIES]; 803 804 /* 805 * specifies the normalized minimum luminance value 806 */ 807 UWORD32 u4_ccv_min_luminance_value; 808 809 /* 810 * specifies the normalized maximum luminance value 811 */ 812 UWORD32 u4_ccv_max_luminance_value; 813 814 /* 815 * specifies the normalized average luminance value 816 */ 817 UWORD32 u4_ccv_avg_luminance_value; 818 } ih264d_ctl_get_sei_ccv_params_op_t; 819 820 typedef struct 821 { 822 /** 823 * u4_size 824 */ 825 UWORD32 u4_size; 826 827 /** 828 * cmd 829 */ 830 IVD_API_COMMAND_TYPE_T e_cmd; 831 832 /** 833 * sub_cmd 834 */ 835 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 836 } ih264d_ctl_get_sei_sii_params_ip_t; 837 838 typedef struct 839 { 840 /** 841 * u4_size 842 */ 843 UWORD32 u4_size; 844 845 /** 846 * error_code 847 */ 848 UWORD32 u4_error_code; 849 850 /** 851 * specifies if the sei sii is enabled 852 */ 853 UWORD8 u1_shutter_interval_info_present_flag; 854 855 /** 856 * specifies the shutter interval temporal sub-layer index 857 * of the current picture 858 */ 859 UWORD32 u4_sii_sub_layer_idx; 860 861 /** 862 * specify the number of time units that pass in one second 863 */ 864 UWORD32 u4_sii_time_scale; 865 866 /** 867 * specifies that the indicated shutter interval is the same for all 868 * pictures in the coded video sequence 869 */ 870 UWORD8 u1_fixed_shutter_interval_within_cvs_flag; 871 872 /** 873 * specifies the the number of time units of a clock operating at the 874 * frequency sii_time_scale Hz that corresponds to the indicated shutter 875 * interval of each picture in the coded video sequence 876 */ 877 UWORD32 u4_sii_num_units_in_shutter_interval; 878 879 /** 880 * sii_max_sub_layers_minus1 plus 1 specifies the maximum number of 881 * shutter interval temporal sub-layers indexes that may be present 882 * in the coded video sequence 883 */ 884 UWORD8 u1_sii_max_sub_layers_minus1; 885 886 /** 887 * specifies the number of time units of a clock operating at the 888 * frequency sii_time_scale Hz that corresponds to the shutter 889 * interval of each picture in the coded video sequence 890 */ 891 UWORD32 au4_sub_layer_num_units_in_shutter_interval[SII_MAX_SUB_LAYERS]; 892 893 } ih264d_ctl_get_sei_sii_params_op_t; 894 895 typedef struct 896 { 897 /** 898 * u4_size 899 */ 900 UWORD32 u4_size; 901 902 /** 903 * cmd 904 */ 905 IVD_API_COMMAND_TYPE_T e_cmd; 906 907 /** 908 * sub_cmd 909 */ 910 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 911 } ih264d_ctl_get_sei_fgc_params_ip_t; 912 913 typedef struct 914 { 915 /** 916 * u4_size 917 */ 918 UWORD32 u4_size; 919 920 /** 921 * error_code 922 */ 923 UWORD32 u4_error_code; 924 925 /** 926 * Flag to control the presence of FGC SEI params 927 */ 928 UWORD8 u1_film_grain_characteristics_cancel_flag; 929 930 /** 931 * Specifies the pic order count 932 */ 933 WORD32 i4_poc; 934 935 /** 936 * Specifies IDR pic ID 937 */ 938 UWORD32 u4_idr_pic_id; 939 940 /** 941 * Specifies film grain model for simulation 942 */ 943 UWORD8 u1_film_grain_model_id; 944 945 /** 946 * Specifies separate color format for decoded samples and grain 947 */ 948 UWORD8 u1_separate_colour_description_present_flag; 949 950 /** 951 * Specifies the bit depth used for the luma component 952 */ 953 UWORD8 u1_film_grain_bit_depth_luma_minus8; 954 955 /** 956 * Specifies the bit depth used for the Cb and Cr components 957 */ 958 UWORD8 u1_film_grain_bit_depth_chroma_minus8; 959 960 /** 961 * Specifies the colour space of the FGC in SEI 962 */ 963 UWORD8 u1_film_grain_full_range_flag; 964 965 /** 966 * Specifies the colour space of the FGC in SEI 967 */ 968 UWORD8 u1_film_grain_colour_primaries; 969 970 /** 971 * Specifies the colour space of the FGC in SEI 972 */ 973 UWORD8 u1_film_grain_transfer_characteristics; 974 975 /** 976 * Specifies the colour space of the FGC in SEI 977 */ 978 UWORD8 u1_film_grain_matrix_coefficients; 979 980 /** 981 * identifies the blending mode used to blend the simulated film grain with the decoded images 982 */ 983 UWORD8 u1_blending_mode_id; 984 985 /** 986 * Specifies a scale factor used in the film grain characterization equations 987 */ 988 UWORD8 u1_log2_scale_factor; 989 990 /** 991 * Indicates whether film grain is modelled or not on the colour component 992 */ 993 UWORD8 au1_comp_model_present_flag[SEI_FGC_NUM_COLOUR_COMPONENTS]; 994 995 /** 996 * Specifies the number of intensity intervals for which 997 * a specific set of model values has been estimated 998 */ 999 UWORD8 au1_num_intensity_intervals_minus1[SEI_FGC_NUM_COLOUR_COMPONENTS]; 1000 1001 /** 1002 * Specifies the number of model values present for each intensity interval in which 1003 * the film grain has been modelled 1004 */ 1005 UWORD8 au1_num_model_values_minus1[SEI_FGC_NUM_COLOUR_COMPONENTS]; 1006 1007 /** 1008 * Specifies the lower bound of the interval of intensity levels for which 1009 * the set of model values applies 1010 */ 1011 UWORD8 au1_intensity_interval_lower_bound[SEI_FGC_NUM_COLOUR_COMPONENTS] 1012 [SEI_FGC_MAX_NUM_INTENSITY_INTERVALS]; 1013 1014 /** 1015 * Specifies the upper bound of the interval of intensity levels for which 1016 * the set of model values applies 1017 */ 1018 UWORD8 au1_intensity_interval_upper_bound[SEI_FGC_NUM_COLOUR_COMPONENTS] 1019 [SEI_FGC_MAX_NUM_INTENSITY_INTERVALS]; 1020 1021 /** 1022 * Represents each one of the model values present for 1023 * the colour component and intensity interval 1024 */ 1025 WORD32 ai4_comp_model_value[SEI_FGC_NUM_COLOUR_COMPONENTS][SEI_FGC_MAX_NUM_INTENSITY_INTERVALS] 1026 [SEI_FGC_MAX_NUM_MODEL_VALUES]; 1027 1028 /** 1029 * Specifies the persistence of the film grain characteristics SEI message 1030 */ 1031 UWORD32 u4_film_grain_characteristics_repetition_period; 1032 } ih264d_ctl_get_sei_fgc_params_op_t; 1033 1034 #ifdef __cplusplus 1035 } /* closing brace for extern "C" */ 1036 #endif 1037 #endif /* _IH264D_H_ */ 1038