1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ***************************************************************************** 18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 /** 21 ******************************************************************************* 22 * @file 23 * ivd.h 24 * 25 * @brief 26 * This file contains all the necessary structure and enumeration 27 * definitions needed for the Application Program Interface(API) of the 28 * Ittiam Video Decoders 29 * 30 * @author 31 * 100239(RCY) 32 * 33 * @remarks 34 * None 35 * 36 ******************************************************************************* 37 */ 38 39 #ifndef _IVD_H 40 #define _IVD_H 41 42 /*****************************************************************************/ 43 /* Constant Macros */ 44 /*****************************************************************************/ 45 #define IVD_VIDDEC_MAX_IO_BUFFERS 64 46 47 /** SEI macros */ 48 /* 49 * @brief specifies the number of colour primary components of the mastering display 50 */ 51 #define NUM_SEI_MDCV_PRIMARIES 3 52 53 /* 54 * @brief specifies the number of colour primary components of the nominal content colour volume 55 */ 56 #define NUM_SEI_CCV_PRIMARIES 3 57 58 /*****************************************************************************/ 59 /* Typedefs */ 60 /*****************************************************************************/ 61 62 /*****************************************************************************/ 63 /* Enums */ 64 /*****************************************************************************/ 65 66 /* IVD_ARCH_T: Architecture Enumeration */ 67 typedef enum 68 { 69 ARCH_NA = 0x7FFFFFFF, 70 ARCH_ARM_NONEON = 0x0, 71 ARCH_ARM_A9Q, 72 ARCH_ARM_A9A, 73 ARCH_ARM_A9, 74 ARCH_ARM_A7, 75 ARCH_ARM_A5, 76 ARCH_ARM_A15, 77 ARCH_ARM_NEONINTR, 78 ARCH_ARMV8_GENERIC, 79 ARCH_X86_GENERIC = 0x100, 80 ARCH_X86_SSSE3, 81 ARCH_X86_SSE42, 82 ARCH_X86_AVX2, 83 ARCH_MIPS_GENERIC = 0x200, 84 ARCH_MIPS_32 85 }IVD_ARCH_T; 86 87 /* IVD_SOC_T: SOC Enumeration */ 88 typedef enum 89 { 90 SOC_NA = 0x7FFFFFFF, 91 SOC_GENERIC = 0x0, 92 SOC_HISI_37X = 0x100, 93 }IVD_SOC_T; 94 95 /* IVD_FRAME_SKIP_MODE_T:Skip mode Enumeration */ 96 97 typedef enum { 98 IVD_SKIP_NONE = 0x7FFFFFFF, 99 IVD_SKIP_P = 0x1, 100 IVD_SKIP_B = 0x2, 101 IVD_SKIP_I = 0x3, 102 IVD_SKIP_IP = 0x4, 103 IVD_SKIP_IB = 0x5, 104 IVD_SKIP_PB = 0x6, 105 IVD_SKIP_IPB = 0x7, 106 IVD_SKIP_IDR = 0x8, 107 IVD_SKIP_DEFAULT = IVD_SKIP_NONE, 108 }IVD_FRAME_SKIP_MODE_T; 109 110 /* IVD_VIDEO_DECODE_MODE_T: Set decoder to decode either frame worth of data */ 111 /* or only header worth of data */ 112 113 typedef enum { 114 IVD_DECODE_MODE_NA = 0x7FFFFFFF, 115 116 /* This enables the codec to process all decodable units */ 117 IVD_DECODE_FRAME = 0x0, 118 119 /* This enables the codec to decode header only */ 120 IVD_DECODE_HEADER = 0x1, 121 122 123 124 }IVD_VIDEO_DECODE_MODE_T; 125 126 127 /* IVD_DISPLAY_FRAME_OUT_MODE_T: Video Display Frame Output Mode */ 128 129 typedef enum { 130 131 IVD_DISPLAY_ORDER_NA = 0x7FFFFFFF, 132 /* To set codec to fill output buffers in display order */ 133 IVD_DISPLAY_FRAME_OUT = 0x0, 134 135 /* To set codec to fill output buffers in decode order */ 136 IVD_DECODE_FRAME_OUT = 0x1, 137 }IVD_DISPLAY_FRAME_OUT_MODE_T; 138 139 140 /* IVD_API_COMMAND_TYPE_T:API command type */ 141 typedef enum { 142 IVD_CMD_VIDEO_NA = 0x7FFFFFFF, 143 IVD_CMD_CREATE = IV_CMD_DUMMY_ELEMENT + 1, 144 IVD_CMD_DELETE, 145 IVD_CMD_VIDEO_CTL, 146 IVD_CMD_VIDEO_DECODE, 147 IVD_CMD_GET_DISPLAY_FRAME, 148 IVD_CMD_REL_DISPLAY_FRAME, 149 IVD_CMD_SET_DISPLAY_FRAME 150 }IVD_API_COMMAND_TYPE_T; 151 152 /* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type */ 153 154 typedef enum { 155 IVD_CMD_NA = 0x7FFFFFFF, 156 IVD_CMD_CTL_GETPARAMS = 0x0, 157 IVD_CMD_CTL_SETPARAMS = 0x1, 158 IVD_CMD_CTL_RESET = 0x2, 159 IVD_CMD_CTL_SETDEFAULT = 0x3, 160 IVD_CMD_CTL_FLUSH = 0x4, 161 IVD_CMD_CTL_GETBUFINFO = 0x5, 162 IVD_CMD_CTL_GETVERSION = 0x6, 163 IVD_CMD_CTL_CODEC_SUBCMD_START = 0x7 164 }IVD_CONTROL_API_COMMAND_TYPE_T; 165 166 167 /* IVD_ERROR_BITS_T: A UWORD32 container will be used for reporting the error*/ 168 /* code to the application. The first 8 bits starting from LSB have been */ 169 /* reserved for the codec to report internal error details. The rest of the */ 170 /* bits will be generic for all video decoders and each bit has an associated*/ 171 /* meaning as mentioned below. The unused bit fields are reserved for future */ 172 /* extenstions and will be zero in the current implementation */ 173 174 typedef enum { 175 /* Bit 8 - Applied concealment. */ 176 IVD_APPLIEDCONCEALMENT = 0x8, 177 /* Bit 9 - Insufficient input data. */ 178 IVD_INSUFFICIENTDATA = 0x9, 179 /* Bit 10 - Data problem/corruption. */ 180 IVD_CORRUPTEDDATA = 0xa, 181 /* Bit 11 - Header problem/corruption. */ 182 IVD_CORRUPTEDHEADER = 0xb, 183 /* Bit 12 - Unsupported feature/parameter in input. */ 184 IVD_UNSUPPORTEDINPUT = 0xc, 185 /* Bit 13 - Unsupported input parameter orconfiguration. */ 186 IVD_UNSUPPORTEDPARAM = 0xd, 187 /* Bit 14 - Fatal error (stop the codec).If there is an */ 188 /* error and this bit is not set, the error is a recoverable one. */ 189 IVD_FATALERROR = 0xe, 190 /* Bit 15 - Invalid bitstream. Applies when Bitstream/YUV frame */ 191 /* buffer for encode/decode call is made with non-valid or zero u4_size */ 192 /* data */ 193 IVD_INVALID_BITSTREAM = 0xf, 194 /* Bit 16 */ 195 IVD_INCOMPLETE_BITSTREAM = 0x10, 196 IVD_ERROR_BITS_T_DUMMY_ELEMENT = 0x7FFFFFFF 197 }IVD_ERROR_BITS_T; 198 199 200 /* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type */ 201 typedef enum { 202 IVD_ERROR_NONE = 0x0, 203 IVD_NUM_MEM_REC_FAILED = 0x1, 204 IVD_NUM_REC_NOT_SUFFICIENT = 0x2, 205 IVD_FILL_MEM_REC_FAILED = 0x3, 206 IVD_REQUESTED_WIDTH_NOT_SUPPPORTED = 0x4, 207 IVD_REQUESTED_HEIGHT_NOT_SUPPPORTED = 0x5, 208 IVD_INIT_DEC_FAILED = 0x6, 209 IVD_INIT_DEC_NOT_SUFFICIENT = 0x7, 210 IVD_INIT_DEC_WIDTH_NOT_SUPPPORTED = 0x8, 211 IVD_INIT_DEC_HEIGHT_NOT_SUPPPORTED = 0x9, 212 IVD_INIT_DEC_MEM_NOT_ALIGNED = 0xa, 213 IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED = 0xb, 214 IVD_INIT_DEC_MEM_REC_NOT_SUFFICIENT = 0xc, 215 IVD_GET_VERSION_DATABUFFER_SZ_INSUFFICIENT = 0xd, 216 IVD_BUFFER_SIZE_SET_TO_ZERO = 0xe, 217 IVD_UNEXPECTED_END_OF_STREAM = 0xf, 218 IVD_SEQUENCE_HEADER_NOT_DECODED = 0x10, 219 IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED = 0x11, 220 IVD_MAX_FRAME_LIMIT_REACHED = 0x12, 221 IVD_IP_API_STRUCT_SIZE_INCORRECT = 0x13, 222 IVD_OP_API_STRUCT_SIZE_INCORRECT = 0x14, 223 IVD_HANDLE_NULL = 0x15, 224 IVD_HANDLE_STRUCT_SIZE_INCORRECT = 0x16, 225 IVD_INVALID_HANDLE_NULL = 0x17, 226 IVD_INVALID_API_CMD = 0x18, 227 IVD_UNSUPPORTED_API_CMD = 0x19, 228 IVD_MEM_REC_STRUCT_SIZE_INCORRECT = 0x1a, 229 IVD_DISP_FRM_ZERO_OP_BUFS = 0x1b, 230 IVD_DISP_FRM_OP_BUF_NULL = 0x1c, 231 IVD_DISP_FRM_ZERO_OP_BUF_SIZE = 0x1d, 232 IVD_DEC_FRM_BS_BUF_NULL = 0x1e, 233 IVD_SET_CONFG_INVALID_DEC_MODE = 0x1f, 234 IVD_SET_CONFG_UNSUPPORTED_DISP_WIDTH = 0x20, 235 IVD_RESET_FAILED = 0x21, 236 IVD_INIT_DEC_MEM_REC_OVERLAP_ERR = 0x22, 237 IVD_INIT_DEC_MEM_REC_BASE_NULL = 0x23, 238 IVD_INIT_DEC_MEM_REC_ALIGNMENT_ERR = 0x24, 239 IVD_INIT_DEC_MEM_REC_INSUFFICIENT_SIZE = 0x25, 240 IVD_INIT_DEC_MEM_REC_INCORRECT_TYPE = 0x26, 241 IVD_DEC_NUMBYTES_INV = 0x27, 242 IVD_DEC_REF_BUF_NULL = 0x28, 243 IVD_DEC_FRM_SKIPPED = 0x29, 244 IVD_RES_CHANGED = 0x2a, 245 IVD_MEM_ALLOC_FAILED = 0x2b, 246 IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS = 0xD0, 247 }IVD_ERROR_CODES_T; 248 249 250 /*****************************************************************************/ 251 /* Structure */ 252 /*****************************************************************************/ 253 /* structure for passing output buffers to codec during get display buffer */ 254 /* call */ 255 typedef struct { 256 257 /** 258 * number of output buffers 259 */ 260 UWORD32 u4_num_bufs; 261 262 /** 263 *list of pointers to output buffers 264 */ 265 UWORD8 *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS]; 266 267 /** 268 * sizes of each output buffer 269 */ 270 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 271 272 }ivd_out_bufdesc_t; 273 274 /*****************************************************************************/ 275 /* Create decoder */ 276 /*****************************************************************************/ 277 278 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_CREATE */ 279 280 281 typedef struct { 282 /** 283 * u4_size of the structure 284 */ 285 UWORD32 u4_size; 286 287 /** 288 * e_cmd 289 */ 290 IVD_API_COMMAND_TYPE_T e_cmd; 291 292 /** 293 * format in which codec has to give out frame data for display 294 */ 295 IV_COLOR_FORMAT_T e_output_format; 296 297 /** 298 * Flag to indicate shared display buffer mode 299 */ 300 UWORD32 u4_share_disp_buf; 301 302 /** 303 * Pointer to a function for aligned allocation. 304 */ 305 void *(*pf_aligned_alloc)(void *pv_mem_ctxt, WORD32 alignment, WORD32 size); 306 307 /** 308 * Pointer to a function for aligned free. 309 */ 310 void (*pf_aligned_free)(void *pv_mem_ctxt, void *pv_buf); 311 312 /** 313 * Pointer to memory context that is needed during alloc/free for custom 314 * memory managers. This will be passed as first argument to pf_aligned_alloc and 315 * pf_aligned_free. 316 * If application is using standard memory functions like 317 * malloc/aligned_malloc/memalign/free/aligned_free, 318 * then this is not needed and can be set to NULL 319 */ 320 void *pv_mem_ctxt; 321 322 }ivd_create_ip_t; 323 324 325 typedef struct{ 326 /** 327 * u4_size of the structure 328 */ 329 UWORD32 u4_size; 330 331 /** 332 * u4_error_code 333 */ 334 UWORD32 u4_error_code; 335 336 /** 337 * Codec Handle 338 */ 339 void *pv_handle; 340 341 }ivd_create_op_t; 342 343 344 /*****************************************************************************/ 345 /* Delete decoder */ 346 /*****************************************************************************/ 347 348 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_DELETE */ 349 350 351 352 typedef struct { 353 /** 354 * u4_size of the structure 355 */ 356 UWORD32 u4_size; 357 358 /** 359 * cmd 360 */ 361 IVD_API_COMMAND_TYPE_T e_cmd; 362 363 }ivd_delete_ip_t; 364 365 366 typedef struct{ 367 /** 368 * u4_size of the structure 369 */ 370 UWORD32 u4_size; 371 372 /** 373 * error_code 374 */ 375 UWORD32 u4_error_code; 376 377 }ivd_delete_op_t; 378 379 /*****************************************************************************/ 380 /* Video Decode */ 381 /*****************************************************************************/ 382 383 /* SEI params deocde */ 384 typedef struct { 385 UWORD8 u1_sei_mdcv_params_present_flag; 386 387 UWORD8 u1_sei_cll_params_present_flag; 388 389 UWORD8 u1_sei_ave_params_present_flag; 390 391 UWORD8 u1_sei_ccv_params_present_flag; 392 393 }ivd_sei_decode_op_t; 394 395 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE */ 396 397 398 typedef struct { 399 /** 400 * u4_size of the structure 401 */ 402 UWORD32 u4_size; 403 404 /** 405 * e_cmd 406 */ 407 IVD_API_COMMAND_TYPE_T e_cmd; 408 409 /** 410 * u4_ts 411 */ 412 UWORD32 u4_ts; 413 414 /** 415 * u4_num_Bytes 416 */ 417 UWORD32 u4_num_Bytes; 418 419 /** 420 * pv_stream_buffer 421 */ 422 void *pv_stream_buffer; 423 424 /** 425 * output buffer desc 426 */ 427 ivd_out_bufdesc_t s_out_buffer; 428 429 }ivd_video_decode_ip_t; 430 431 432 typedef struct{ 433 /** 434 * u4_size of the structure 435 */ 436 UWORD32 u4_size; 437 438 /** 439 * u4_error_code 440 */ 441 UWORD32 u4_error_code; 442 443 /** 444 * num_bytes_consumed 445 */ 446 UWORD32 u4_num_bytes_consumed; 447 448 /** 449 * pic_wd 450 */ 451 UWORD32 u4_pic_wd; 452 453 /** 454 * pic_ht 455 */ 456 UWORD32 u4_pic_ht; 457 458 /** 459 * pic_type 460 */ 461 IV_PICTURE_CODING_TYPE_T e_pic_type; 462 463 /** 464 * frame_decoded_flag 465 */ 466 UWORD32 u4_frame_decoded_flag; 467 468 /** 469 * new_seq 470 */ 471 UWORD32 u4_new_seq; 472 473 /** 474 * output_present 475 */ 476 UWORD32 u4_output_present; 477 478 /** 479 * progressive_frame_flag 480 */ 481 UWORD32 u4_progressive_frame_flag; 482 483 /** 484 * is_ref_flag 485 */ 486 UWORD32 u4_is_ref_flag; 487 488 /** 489 * output_format 490 */ 491 IV_COLOR_FORMAT_T e_output_format; 492 493 /** 494 * disp_frm_buf 495 */ 496 iv_yuv_buf_t s_disp_frm_buf; 497 498 /** 499 * sei params o/p struct 500 */ 501 ivd_sei_decode_op_t s_sei_decode_op; 502 503 /** 504 * fld_type 505 */ 506 IV_FLD_TYPE_T e4_fld_type; 507 508 /** 509 * ts 510 */ 511 UWORD32 u4_ts; 512 513 /** 514 * disp_buf_id 515 */ 516 UWORD32 u4_disp_buf_id; 517 518 /** 519 * reorder_depth 520 */ 521 WORD32 i4_reorder_depth; 522 523 /** 524 * disp_buf_id 525 */ 526 WORD32 i4_display_index; 527 528 }ivd_video_decode_op_t; 529 530 531 /*****************************************************************************/ 532 /* Get Display Frame */ 533 /*****************************************************************************/ 534 535 536 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME */ 537 538 typedef struct 539 { 540 /** 541 * u4_size of the structure 542 */ 543 UWORD32 u4_size; 544 545 /** 546 * e_cmd 547 */ 548 IVD_API_COMMAND_TYPE_T e_cmd; 549 550 /** 551 * output buffer desc 552 */ 553 ivd_out_bufdesc_t s_out_buffer; 554 555 }ivd_get_display_frame_ip_t; 556 557 558 typedef struct 559 { 560 /** 561 * u4_size of the structure 562 */ 563 UWORD32 u4_size; 564 565 /** 566 * error_code 567 */ 568 UWORD32 u4_error_code; 569 570 /** 571 * progressive_frame_flag 572 */ 573 UWORD32 u4_progressive_frame_flag; 574 575 /** 576 * pic_type 577 */ 578 IV_PICTURE_CODING_TYPE_T e_pic_type; 579 580 /** 581 * is_ref_flag 582 */ 583 UWORD32 u4_is_ref_flag; 584 585 /** 586 * output_format 587 */ 588 IV_COLOR_FORMAT_T e_output_format; 589 590 /** 591 * disp_frm_buf 592 */ 593 iv_yuv_buf_t s_disp_frm_buf; 594 595 /** 596 * fld_type 597 */ 598 IV_FLD_TYPE_T e4_fld_type; 599 600 /** 601 * ts 602 */ 603 UWORD32 u4_ts; 604 605 /** 606 * disp_buf_id 607 */ 608 UWORD32 u4_disp_buf_id; 609 }ivd_get_display_frame_op_t; 610 611 /*****************************************************************************/ 612 /* Set Display Frame */ 613 /*****************************************************************************/ 614 615 616 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME */ 617 618 typedef struct 619 { 620 /** 621 * u4_size of the structure 622 */ 623 UWORD32 u4_size; 624 625 /** 626 * cmd 627 */ 628 IVD_API_COMMAND_TYPE_T e_cmd; 629 630 /** 631 * num_disp_bufs 632 */ 633 UWORD32 num_disp_bufs; 634 635 /** 636 * output buffer desc 637 */ 638 ivd_out_bufdesc_t s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS]; 639 640 }ivd_set_display_frame_ip_t; 641 642 643 typedef struct 644 { 645 /** 646 * u4_size of the structure 647 */ 648 UWORD32 u4_size; 649 650 /** 651 * error code 652 */ 653 UWORD32 u4_error_code; 654 }ivd_set_display_frame_op_t; 655 656 657 /*****************************************************************************/ 658 /* Release Display Frame */ 659 /*****************************************************************************/ 660 661 662 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME */ 663 664 typedef struct 665 { 666 /** 667 * u4_size of the structure 668 */ 669 UWORD32 u4_size; 670 671 /** 672 * e_cmd 673 */ 674 IVD_API_COMMAND_TYPE_T e_cmd; 675 676 /** 677 * disp_buf_id 678 */ 679 UWORD32 u4_disp_buf_id; 680 }ivd_rel_display_frame_ip_t; 681 682 683 typedef struct 684 { 685 /** 686 * u4_size of the structure 687 */ 688 UWORD32 u4_size; 689 690 /** 691 * error code 692 */ 693 UWORD32 u4_error_code; 694 }ivd_rel_display_frame_op_t; 695 696 /*****************************************************************************/ 697 /* Video control Flush */ 698 /*****************************************************************************/ 699 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 700 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd = IVD_CMD_ctl_FLUSH */ 701 702 703 704 typedef struct{ 705 /** 706 * u4_size of the structure 707 */ 708 UWORD32 u4_size; 709 710 /** 711 * cmd 712 */ 713 IVD_API_COMMAND_TYPE_T e_cmd; 714 715 /** 716 * sub_cmd 717 */ 718 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 719 }ivd_ctl_flush_ip_t; 720 721 722 typedef struct{ 723 /** 724 * u4_size of the structure 725 */ 726 UWORD32 u4_size; 727 728 /** 729 * error code 730 */ 731 UWORD32 u4_error_code; 732 }ivd_ctl_flush_op_t; 733 734 /*****************************************************************************/ 735 /* Video control reset */ 736 /*****************************************************************************/ 737 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 738 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd = IVD_CMD_ctl_RESET */ 739 740 741 typedef struct{ 742 /** 743 * u4_size of the structure 744 */ 745 UWORD32 u4_size; 746 747 /** 748 * cmd 749 */ 750 IVD_API_COMMAND_TYPE_T e_cmd; 751 752 /** 753 * sub_cmd 754 */ 755 756 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 757 }ivd_ctl_reset_ip_t; 758 759 760 typedef struct{ 761 /** 762 * u4_size of the structure 763 */ 764 UWORD32 u4_size; 765 766 /** 767 * error code 768 */ 769 UWORD32 u4_error_code; 770 }ivd_ctl_reset_op_t; 771 772 773 /*****************************************************************************/ 774 /* Video control Set Params */ 775 /*****************************************************************************/ 776 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 777 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS */ 778 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT */ 779 780 781 782 typedef struct { 783 /** 784 * u4_size of the structure 785 */ 786 UWORD32 u4_size; 787 788 /** 789 * cmd 790 */ 791 IVD_API_COMMAND_TYPE_T e_cmd; 792 793 /** 794 * sub_cmd 795 */ 796 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 797 798 /** 799 * vid_dec_mode 800 */ 801 IVD_VIDEO_DECODE_MODE_T e_vid_dec_mode; 802 803 /** 804 * disp_wd 805 */ 806 UWORD32 u4_disp_wd; 807 808 /** 809 * frm_skip_mode 810 */ 811 IVD_FRAME_SKIP_MODE_T e_frm_skip_mode; 812 813 /** 814 * frm_out_mode 815 */ 816 IVD_DISPLAY_FRAME_OUT_MODE_T e_frm_out_mode; 817 }ivd_ctl_set_config_ip_t; 818 819 820 typedef struct{ 821 /** 822 * u4_size of the structure 823 */ 824 UWORD32 u4_size; 825 826 /** 827 * u4_error_code 828 */ 829 UWORD32 u4_error_code; 830 }ivd_ctl_set_config_op_t; 831 832 /*****************************************************************************/ 833 /* Video control:Get Buf Info */ 834 /*****************************************************************************/ 835 836 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 837 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO */ 838 839 840 typedef struct{ 841 /** 842 * u4_size of the structure 843 */ 844 UWORD32 u4_size; 845 846 /** 847 * e_cmd 848 */ 849 IVD_API_COMMAND_TYPE_T e_cmd; 850 851 /** 852 * sub_cmd 853 */ 854 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 855 }ivd_ctl_getbufinfo_ip_t; 856 857 858 typedef struct{ 859 /** 860 * u4_size of the structure 861 */ 862 UWORD32 u4_size; 863 864 /** 865 * error code 866 */ 867 UWORD32 u4_error_code; 868 869 /** 870 * no of display buffer sets required by codec 871 */ 872 UWORD32 u4_num_disp_bufs; 873 874 /** 875 * no of input buffers required for codec 876 */ 877 UWORD32 u4_min_num_in_bufs; 878 879 /** 880 * no of output buffers required for codec 881 */ 882 UWORD32 u4_min_num_out_bufs; 883 884 /** 885 * sizes of each input buffer required 886 */ 887 UWORD32 u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 888 889 /** 890 * sizes of each output buffer required 891 */ 892 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 893 }ivd_ctl_getbufinfo_op_t; 894 895 896 /*****************************************************************************/ 897 /* Video control:Getstatus Call */ 898 /*****************************************************************************/ 899 900 901 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 902 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS */ 903 904 905 typedef struct{ 906 /** 907 * u4_size of the structure 908 */ 909 UWORD32 u4_size; 910 911 /** 912 * cmd 913 */ 914 IVD_API_COMMAND_TYPE_T e_cmd; 915 916 /** 917 * sub_cmd 918 */ 919 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 920 }ivd_ctl_getstatus_ip_t; 921 922 923 typedef struct{ 924 925 /** 926 * u4_size of the structure 927 */ 928 UWORD32 u4_size; 929 930 /** 931 * error code 932 */ 933 UWORD32 u4_error_code; 934 935 /** 936 * no of display buffer sets required by codec 937 */ 938 UWORD32 u4_num_disp_bufs; 939 940 /** 941 * u4_pic_ht 942 */ 943 UWORD32 u4_pic_ht; 944 945 /** 946 * u4_pic_wd 947 */ 948 UWORD32 u4_pic_wd; 949 950 /** 951 * frame_rate 952 */ 953 UWORD32 u4_frame_rate; 954 955 /** 956 * u4_bit_rate 957 */ 958 UWORD32 u4_bit_rate; 959 960 /** 961 * content_type 962 */ 963 IV_CONTENT_TYPE_T e_content_type; 964 965 /** 966 * output_chroma_format 967 */ 968 IV_COLOR_FORMAT_T e_output_chroma_format; 969 970 /** 971 * no of input buffers required for codec 972 */ 973 UWORD32 u4_min_num_in_bufs; 974 975 /** 976 * no of output buffers required for codec 977 */ 978 UWORD32 u4_min_num_out_bufs; 979 980 /** 981 * sizes of each input buffer required 982 */ 983 UWORD32 u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 984 985 /** 986 * sizes of each output buffer required 987 */ 988 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 989 }ivd_ctl_getstatus_op_t; 990 991 992 /*****************************************************************************/ 993 /* Video control:Get Version Info */ 994 /*****************************************************************************/ 995 996 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 997 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION */ 998 999 1000 typedef struct{ 1001 /** 1002 * u4_size of the structure 1003 */ 1004 UWORD32 u4_size; 1005 1006 /** 1007 * cmd 1008 */ 1009 IVD_API_COMMAND_TYPE_T e_cmd; 1010 1011 /** 1012 * sub_cmd 1013 */ 1014 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 1015 1016 /** 1017 * pv_version_buffer 1018 */ 1019 void *pv_version_buffer; 1020 1021 /** 1022 * version_buffer_size 1023 */ 1024 UWORD32 u4_version_buffer_size; 1025 }ivd_ctl_getversioninfo_ip_t; 1026 1027 1028 typedef struct{ 1029 /** 1030 * u4_size of the structure 1031 */ 1032 UWORD32 u4_size; 1033 1034 /** 1035 * error code 1036 */ 1037 UWORD32 u4_error_code; 1038 }ivd_ctl_getversioninfo_op_t; 1039 1040 #endif /* __IVD_H__ */ 1041 1042