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 /* Typedefs */ 48 /*****************************************************************************/ 49 50 /*****************************************************************************/ 51 /* Enums */ 52 /*****************************************************************************/ 53 54 /* IVD_ARCH_T: Architecture Enumeration */ 55 typedef enum 56 { 57 ARCH_NA = 0x7FFFFFFF, 58 ARCH_ARM_NONEON = 0x0, 59 ARCH_ARM_A9Q, 60 ARCH_ARM_A9A, 61 ARCH_ARM_A9, 62 ARCH_ARM_A7, 63 ARCH_ARM_A5, 64 ARCH_ARM_A15, 65 ARCH_ARM_NEONINTR, 66 ARCH_ARMV8_GENERIC, 67 ARCH_X86_GENERIC = 0x100, 68 ARCH_X86_SSSE3, 69 ARCH_X86_SSE42, 70 ARCH_X86_AVX2, 71 ARCH_MIPS_GENERIC = 0x200, 72 ARCH_MIPS_32, 73 ARCH_RISCV_GENERIC = 0x300, 74 }IVD_ARCH_T; 75 76 /* IVD_SOC_T: SOC Enumeration */ 77 typedef enum 78 { 79 SOC_NA = 0x7FFFFFFF, 80 SOC_GENERIC = 0x0, 81 SOC_HISI_37X = 0x100, 82 }IVD_SOC_T; 83 84 /* IVD_FRAME_SKIP_MODE_T:Skip mode Enumeration */ 85 86 typedef enum { 87 IVD_SKIP_NONE = 0x7FFFFFFF, 88 IVD_SKIP_P = 0x1, 89 IVD_SKIP_B = 0x2, 90 IVD_SKIP_I = 0x3, 91 IVD_SKIP_IP = 0x4, 92 IVD_SKIP_IB = 0x5, 93 IVD_SKIP_PB = 0x6, 94 IVD_SKIP_IPB = 0x7, 95 IVD_SKIP_IDR = 0x8, 96 IVD_SKIP_DEFAULT = IVD_SKIP_NONE, 97 }IVD_FRAME_SKIP_MODE_T; 98 99 /* IVD_VIDEO_DECODE_MODE_T: Set decoder to decode either frame worth of data */ 100 /* or only header worth of data */ 101 102 typedef enum { 103 IVD_DECODE_MODE_NA = 0x7FFFFFFF, 104 105 /* This enables the codec to process all decodable units */ 106 IVD_DECODE_FRAME = 0x0, 107 108 /* This enables the codec to decode header only */ 109 IVD_DECODE_HEADER = 0x1, 110 111 112 113 }IVD_VIDEO_DECODE_MODE_T; 114 115 116 /* IVD_DISPLAY_FRAME_OUT_MODE_T: Video Display Frame Output Mode */ 117 118 typedef enum { 119 120 IVD_DISPLAY_ORDER_NA = 0x7FFFFFFF, 121 /* To set codec to fill output buffers in display order */ 122 IVD_DISPLAY_FRAME_OUT = 0x0, 123 124 /* To set codec to fill output buffers in decode order */ 125 IVD_DECODE_FRAME_OUT = 0x1, 126 }IVD_DISPLAY_FRAME_OUT_MODE_T; 127 128 129 /* IVD_API_COMMAND_TYPE_T:API command type */ 130 typedef enum { 131 IVD_CMD_VIDEO_NA = 0x7FFFFFFF, 132 IVD_CMD_VIDEO_CTL = IV_CMD_DUMMY_ELEMENT + 1, 133 IVD_CMD_VIDEO_DECODE, 134 IVD_CMD_GET_DISPLAY_FRAME, 135 IVD_CMD_REL_DISPLAY_FRAME, 136 IVD_CMD_SET_DISPLAY_FRAME 137 }IVD_API_COMMAND_TYPE_T; 138 139 /* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type */ 140 141 typedef enum { 142 IVD_CMD_NA = 0x7FFFFFFF, 143 IVD_CMD_CTL_GETPARAMS = 0x0, 144 IVD_CMD_CTL_SETPARAMS = 0x1, 145 IVD_CMD_CTL_RESET = 0x2, 146 IVD_CMD_CTL_SETDEFAULT = 0x3, 147 IVD_CMD_CTL_FLUSH = 0x4, 148 IVD_CMD_CTL_GETBUFINFO = 0x5, 149 IVD_CMD_CTL_GETVERSION = 0x6, 150 IVD_CMD_CTL_CODEC_SUBCMD_START = 0x7 151 }IVD_CONTROL_API_COMMAND_TYPE_T; 152 153 154 /* IVD_ERROR_BITS_T: A UWORD32 container will be used for reporting the error*/ 155 /* code to the application. The first 8 bits starting from LSB have been */ 156 /* reserved for the codec to report internal error details. The rest of the */ 157 /* bits will be generic for all video decoders and each bit has an associated*/ 158 /* meaning as mentioned below. The unused bit fields are reserved for future */ 159 /* extenstions and will be zero in the current implementation */ 160 161 typedef enum { 162 /* Bit 8 - Applied concealment. */ 163 IVD_APPLIEDCONCEALMENT = 0x8, 164 /* Bit 9 - Insufficient input data. */ 165 IVD_INSUFFICIENTDATA = 0x9, 166 /* Bit 10 - Data problem/corruption. */ 167 IVD_CORRUPTEDDATA = 0xa, 168 /* Bit 11 - Header problem/corruption. */ 169 IVD_CORRUPTEDHEADER = 0xb, 170 /* Bit 12 - Unsupported feature/parameter in input. */ 171 IVD_UNSUPPORTEDINPUT = 0xc, 172 /* Bit 13 - Unsupported input parameter orconfiguration. */ 173 IVD_UNSUPPORTEDPARAM = 0xd, 174 /* Bit 14 - Fatal error (stop the codec).If there is an */ 175 /* error and this bit is not set, the error is a recoverable one. */ 176 IVD_FATALERROR = 0xe, 177 /* Bit 15 - Invalid bitstream. Applies when Bitstream/YUV frame */ 178 /* buffer for encode/decode call is made with non-valid or zero u4_size */ 179 /* data */ 180 IVD_INVALID_BITSTREAM = 0xf, 181 /* Bit 16 */ 182 IVD_INCOMPLETE_BITSTREAM = 0x10, 183 IVD_ERROR_BITS_T_DUMMY_ELEMENT = 0x7FFFFFFF 184 }IVD_ERROR_BITS_T; 185 186 187 /* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type */ 188 typedef enum { 189 IVD_ERROR_NONE = 0x0, 190 IVD_NUM_MEM_REC_FAILED = 0x1, 191 IVD_NUM_REC_NOT_SUFFICIENT = 0x2, 192 IVD_FILL_MEM_REC_FAILED = 0x3, 193 IVD_REQUESTED_WIDTH_NOT_SUPPPORTED = 0x4, 194 IVD_REQUESTED_HEIGHT_NOT_SUPPPORTED = 0x5, 195 IVD_INIT_DEC_FAILED = 0x6, 196 IVD_INIT_DEC_NOT_SUFFICIENT = 0x7, 197 IVD_INIT_DEC_WIDTH_NOT_SUPPPORTED = 0x8, 198 IVD_INIT_DEC_HEIGHT_NOT_SUPPPORTED = 0x9, 199 IVD_INIT_DEC_MEM_NOT_ALIGNED = 0xa, 200 IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED = 0xb, 201 IVD_INIT_DEC_MEM_REC_NOT_SUFFICIENT = 0xc, 202 IVD_GET_VERSION_DATABUFFER_SZ_INSUFFICIENT = 0xd, 203 IVD_BUFFER_SIZE_SET_TO_ZERO = 0xe, 204 IVD_UNEXPECTED_END_OF_STREAM = 0xf, 205 IVD_SEQUENCE_HEADER_NOT_DECODED = 0x10, 206 IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED = 0x11, 207 IVD_MAX_FRAME_LIMIT_REACHED = 0x12, 208 IVD_IP_API_STRUCT_SIZE_INCORRECT = 0x13, 209 IVD_OP_API_STRUCT_SIZE_INCORRECT = 0x14, 210 IVD_HANDLE_NULL = 0x15, 211 IVD_HANDLE_STRUCT_SIZE_INCORRECT = 0x16, 212 IVD_INVALID_HANDLE_NULL = 0x17, 213 IVD_INVALID_API_CMD = 0x18, 214 IVD_UNSUPPORTED_API_CMD = 0x19, 215 IVD_MEM_REC_STRUCT_SIZE_INCORRECT = 0x1a, 216 IVD_DISP_FRM_ZERO_OP_BUFS = 0x1b, 217 IVD_DISP_FRM_OP_BUF_NULL = 0x1c, 218 IVD_DISP_FRM_ZERO_OP_BUF_SIZE = 0x1d, 219 IVD_DEC_FRM_BS_BUF_NULL = 0x1e, 220 IVD_SET_CONFG_INVALID_DEC_MODE = 0x1f, 221 IVD_SET_CONFG_UNSUPPORTED_DISP_WIDTH = 0x20, 222 IVD_RESET_FAILED = 0x21, 223 IVD_INIT_DEC_MEM_REC_OVERLAP_ERR = 0x22, 224 IVD_INIT_DEC_MEM_REC_BASE_NULL = 0x23, 225 IVD_INIT_DEC_MEM_REC_ALIGNMENT_ERR = 0x24, 226 IVD_INIT_DEC_MEM_REC_INSUFFICIENT_SIZE = 0x25, 227 IVD_INIT_DEC_MEM_REC_INCORRECT_TYPE = 0x26, 228 IVD_DEC_NUMBYTES_INV = 0x27, 229 IVD_DEC_REF_BUF_NULL = 0x28, 230 IVD_DEC_FRM_SKIPPED = 0x29, 231 IVD_RES_CHANGED = 0x2a, 232 IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS = 0x300, 233 }IVD_ERROR_CODES_T; 234 235 236 /*****************************************************************************/ 237 /* Structure */ 238 /*****************************************************************************/ 239 /* structure for passing output buffers to codec during get display buffer */ 240 /* call */ 241 typedef struct { 242 243 /** 244 * number of output buffers 245 */ 246 UWORD32 u4_num_bufs; 247 248 /** 249 *list of pointers to output buffers 250 */ 251 UWORD8 *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS]; 252 253 /** 254 * sizes of each output buffer 255 */ 256 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 257 258 }ivd_out_bufdesc_t; 259 260 /*****************************************************************************/ 261 /* Initialize decoder */ 262 /*****************************************************************************/ 263 264 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_INIT */ 265 266 267 typedef struct { 268 /** 269 * u4_size of the structure 270 */ 271 UWORD32 u4_size; 272 273 /** 274 * e_cmd 275 */ 276 IVD_API_COMMAND_TYPE_T e_cmd; 277 278 /** 279 *no memrecords which are allocated on request of codec through fill mem records 280 */ 281 UWORD32 u4_num_mem_rec; 282 /** 283 * maximum height for which codec should be initialized 284 */ 285 UWORD32 u4_frm_max_wd; 286 /** 287 * maximum width for which codec should be initialized 288 */ 289 UWORD32 u4_frm_max_ht; 290 /** 291 * format in which codec has to give out frame data for display 292 */ 293 IV_COLOR_FORMAT_T e_output_format; 294 /** 295 * pointer to memrecord array, which contains allocated resources 296 */ 297 iv_mem_rec_t *pv_mem_rec_location; 298 }ivd_init_ip_t; 299 300 301 typedef struct{ 302 /** 303 * u4_size of the structure 304 */ 305 UWORD32 u4_size; 306 307 /** 308 * u4_error_code 309 */ 310 UWORD32 u4_error_code; 311 }ivd_init_op_t; 312 313 314 /*****************************************************************************/ 315 /* Video Decode */ 316 /*****************************************************************************/ 317 318 319 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE */ 320 321 322 typedef struct { 323 /** 324 * u4_size of the structure 325 */ 326 UWORD32 u4_size; 327 328 /** 329 * e_cmd 330 */ 331 IVD_API_COMMAND_TYPE_T e_cmd; 332 333 /** 334 * u4_ts 335 */ 336 UWORD32 u4_ts; 337 338 /** 339 * u4_num_Bytes 340 */ 341 UWORD32 u4_num_Bytes; 342 343 /** 344 * pv_stream_buffer 345 */ 346 void *pv_stream_buffer; 347 348 /** 349 * output buffer desc 350 */ 351 ivd_out_bufdesc_t s_out_buffer; 352 353 }ivd_video_decode_ip_t; 354 355 356 typedef struct{ 357 /** 358 * u4_size of the structure 359 */ 360 UWORD32 u4_size; 361 362 /** 363 * u4_error_code 364 */ 365 UWORD32 u4_error_code; 366 367 /** 368 * num_bytes_consumed 369 */ 370 UWORD32 u4_num_bytes_consumed; 371 372 /** 373 * pic_wd 374 */ 375 UWORD32 u4_pic_wd; 376 377 /** 378 * pic_ht 379 */ 380 UWORD32 u4_pic_ht; 381 382 /** 383 * pic_type 384 */ 385 IV_PICTURE_CODING_TYPE_T e_pic_type; 386 387 /** 388 * frame_decoded_flag 389 */ 390 UWORD32 u4_frame_decoded_flag; 391 392 /** 393 * new_seq 394 */ 395 UWORD32 u4_new_seq; 396 397 /** 398 * output_present 399 */ 400 UWORD32 u4_output_present; 401 402 /** 403 * progressive_frame_flag 404 */ 405 UWORD32 u4_progressive_frame_flag; 406 407 /** 408 * is_ref_flag 409 */ 410 UWORD32 u4_is_ref_flag; 411 412 /** 413 * output_format 414 */ 415 IV_COLOR_FORMAT_T e_output_format; 416 417 /** 418 * disp_frm_buf 419 */ 420 iv_yuv_buf_t s_disp_frm_buf; 421 422 /** 423 * fld_type 424 */ 425 IV_FLD_TYPE_T e4_fld_type; 426 427 /** 428 * ts 429 */ 430 UWORD32 u4_ts; 431 432 /** 433 * disp_buf_id 434 */ 435 UWORD32 u4_disp_buf_id; 436 }ivd_video_decode_op_t; 437 438 439 /*****************************************************************************/ 440 /* Get Display Frame */ 441 /*****************************************************************************/ 442 443 444 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME */ 445 446 typedef struct 447 { 448 /** 449 * u4_size of the structure 450 */ 451 UWORD32 u4_size; 452 453 /** 454 * e_cmd 455 */ 456 IVD_API_COMMAND_TYPE_T e_cmd; 457 458 /** 459 * output buffer desc 460 */ 461 ivd_out_bufdesc_t s_out_buffer; 462 463 }ivd_get_display_frame_ip_t; 464 465 466 typedef struct 467 { 468 /** 469 * u4_size of the structure 470 */ 471 UWORD32 u4_size; 472 473 /** 474 * error_code 475 */ 476 UWORD32 u4_error_code; 477 478 /** 479 * progressive_frame_flag 480 */ 481 UWORD32 u4_progressive_frame_flag; 482 483 /** 484 * pic_type 485 */ 486 IV_PICTURE_CODING_TYPE_T e_pic_type; 487 488 /** 489 * is_ref_flag 490 */ 491 UWORD32 u4_is_ref_flag; 492 493 /** 494 * output_format 495 */ 496 IV_COLOR_FORMAT_T e_output_format; 497 498 /** 499 * disp_frm_buf 500 */ 501 iv_yuv_buf_t s_disp_frm_buf; 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 }ivd_get_display_frame_op_t; 518 519 /*****************************************************************************/ 520 /* Set Display Frame */ 521 /*****************************************************************************/ 522 523 524 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME */ 525 526 typedef struct 527 { 528 /** 529 * u4_size of the structure 530 */ 531 UWORD32 u4_size; 532 533 /** 534 * cmd 535 */ 536 IVD_API_COMMAND_TYPE_T e_cmd; 537 538 /** 539 * num_disp_bufs 540 */ 541 UWORD32 num_disp_bufs; 542 543 /** 544 * output buffer desc 545 */ 546 ivd_out_bufdesc_t s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS]; 547 548 }ivd_set_display_frame_ip_t; 549 550 551 typedef struct 552 { 553 /** 554 * u4_size of the structure 555 */ 556 UWORD32 u4_size; 557 558 /** 559 * error code 560 */ 561 UWORD32 u4_error_code; 562 }ivd_set_display_frame_op_t; 563 564 565 /*****************************************************************************/ 566 /* Release Display Frame */ 567 /*****************************************************************************/ 568 569 570 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME */ 571 572 typedef struct 573 { 574 /** 575 * u4_size of the structure 576 */ 577 UWORD32 u4_size; 578 579 /** 580 * e_cmd 581 */ 582 IVD_API_COMMAND_TYPE_T e_cmd; 583 584 /** 585 * disp_buf_id 586 */ 587 UWORD32 u4_disp_buf_id; 588 }ivd_rel_display_frame_ip_t; 589 590 591 typedef struct 592 { 593 /** 594 * u4_size of the structure 595 */ 596 UWORD32 u4_size; 597 598 /** 599 * error code 600 */ 601 UWORD32 u4_error_code; 602 }ivd_rel_display_frame_op_t; 603 604 /*****************************************************************************/ 605 /* Video control Flush */ 606 /*****************************************************************************/ 607 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 608 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd = IVD_CMD_ctl_FLUSH */ 609 610 611 612 typedef struct{ 613 /** 614 * u4_size of the structure 615 */ 616 UWORD32 u4_size; 617 618 /** 619 * cmd 620 */ 621 IVD_API_COMMAND_TYPE_T e_cmd; 622 623 /** 624 * sub_cmd 625 */ 626 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 627 }ivd_ctl_flush_ip_t; 628 629 630 typedef struct{ 631 /** 632 * u4_size of the structure 633 */ 634 UWORD32 u4_size; 635 636 /** 637 * error code 638 */ 639 UWORD32 u4_error_code; 640 }ivd_ctl_flush_op_t; 641 642 /*****************************************************************************/ 643 /* Video control reset */ 644 /*****************************************************************************/ 645 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 646 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd = IVD_CMD_ctl_RESET */ 647 648 649 typedef struct{ 650 /** 651 * u4_size of the structure 652 */ 653 UWORD32 u4_size; 654 655 /** 656 * cmd 657 */ 658 IVD_API_COMMAND_TYPE_T e_cmd; 659 660 /** 661 * sub_cmd 662 */ 663 664 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 665 }ivd_ctl_reset_ip_t; 666 667 668 typedef struct{ 669 /** 670 * u4_size of the structure 671 */ 672 UWORD32 u4_size; 673 674 /** 675 * error code 676 */ 677 UWORD32 u4_error_code; 678 }ivd_ctl_reset_op_t; 679 680 681 /*****************************************************************************/ 682 /* Video control Set Params */ 683 /*****************************************************************************/ 684 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 685 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS */ 686 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT */ 687 688 689 690 typedef struct { 691 /** 692 * u4_size of the structure 693 */ 694 UWORD32 u4_size; 695 696 /** 697 * cmd 698 */ 699 IVD_API_COMMAND_TYPE_T e_cmd; 700 701 /** 702 * sub_cmd 703 */ 704 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 705 706 /** 707 * vid_dec_mode 708 */ 709 IVD_VIDEO_DECODE_MODE_T e_vid_dec_mode; 710 711 /** 712 * disp_wd 713 */ 714 UWORD32 u4_disp_wd; 715 716 /** 717 * frm_skip_mode 718 */ 719 IVD_FRAME_SKIP_MODE_T e_frm_skip_mode; 720 721 /** 722 * frm_out_mode 723 */ 724 IVD_DISPLAY_FRAME_OUT_MODE_T e_frm_out_mode; 725 }ivd_ctl_set_config_ip_t; 726 727 728 typedef struct{ 729 /** 730 * u4_size of the structure 731 */ 732 UWORD32 u4_size; 733 734 /** 735 * u4_error_code 736 */ 737 UWORD32 u4_error_code; 738 }ivd_ctl_set_config_op_t; 739 740 /*****************************************************************************/ 741 /* Video control:Get Buf Info */ 742 /*****************************************************************************/ 743 744 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 745 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO */ 746 747 748 typedef struct{ 749 /** 750 * u4_size of the structure 751 */ 752 UWORD32 u4_size; 753 754 /** 755 * e_cmd 756 */ 757 IVD_API_COMMAND_TYPE_T e_cmd; 758 759 /** 760 * sub_cmd 761 */ 762 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 763 }ivd_ctl_getbufinfo_ip_t; 764 765 766 typedef struct{ 767 /** 768 * u4_size of the structure 769 */ 770 UWORD32 u4_size; 771 772 /** 773 * error code 774 */ 775 UWORD32 u4_error_code; 776 777 /** 778 * no of display buffer sets required by codec 779 */ 780 UWORD32 u4_num_disp_bufs; 781 782 /** 783 * no of input buffers required for codec 784 */ 785 UWORD32 u4_min_num_in_bufs; 786 787 /** 788 * no of output buffers required for codec 789 */ 790 UWORD32 u4_min_num_out_bufs; 791 792 /** 793 * sizes of each input buffer required 794 */ 795 UWORD32 u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 796 797 /** 798 * sizes of each output buffer required 799 */ 800 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 801 }ivd_ctl_getbufinfo_op_t; 802 803 804 /*****************************************************************************/ 805 /* Video control:Getstatus Call */ 806 /*****************************************************************************/ 807 808 809 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 810 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS */ 811 812 813 typedef struct{ 814 /** 815 * u4_size of the structure 816 */ 817 UWORD32 u4_size; 818 819 /** 820 * cmd 821 */ 822 IVD_API_COMMAND_TYPE_T e_cmd; 823 824 /** 825 * sub_cmd 826 */ 827 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 828 }ivd_ctl_getstatus_ip_t; 829 830 831 typedef struct{ 832 833 /** 834 * u4_size of the structure 835 */ 836 UWORD32 u4_size; 837 838 /** 839 * error code 840 */ 841 UWORD32 u4_error_code; 842 843 /** 844 * no of display buffer sets required by codec 845 */ 846 UWORD32 u4_num_disp_bufs; 847 848 /** 849 * u4_pic_ht 850 */ 851 UWORD32 u4_pic_ht; 852 853 /** 854 * u4_pic_wd 855 */ 856 UWORD32 u4_pic_wd; 857 858 /** 859 * frame_rate 860 */ 861 UWORD32 u4_frame_rate; 862 863 /** 864 * u4_bit_rate 865 */ 866 UWORD32 u4_bit_rate; 867 868 /** 869 * content_type 870 */ 871 IV_CONTENT_TYPE_T e_content_type; 872 873 /** 874 * output_chroma_format 875 */ 876 IV_COLOR_FORMAT_T e_output_chroma_format; 877 878 /** 879 * no of input buffers required for codec 880 */ 881 UWORD32 u4_min_num_in_bufs; 882 883 /** 884 * no of output buffers required for codec 885 */ 886 UWORD32 u4_min_num_out_bufs; 887 888 /** 889 * sizes of each input buffer required 890 */ 891 UWORD32 u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 892 893 /** 894 * sizes of each output buffer required 895 */ 896 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 897 }ivd_ctl_getstatus_op_t; 898 899 900 /*****************************************************************************/ 901 /* Video control:Get Version Info */ 902 /*****************************************************************************/ 903 904 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 905 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION */ 906 907 908 typedef struct{ 909 /** 910 * u4_size of the structure 911 */ 912 UWORD32 u4_size; 913 914 /** 915 * cmd 916 */ 917 IVD_API_COMMAND_TYPE_T e_cmd; 918 919 /** 920 * sub_cmd 921 */ 922 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 923 924 /** 925 * pv_version_buffer 926 */ 927 void *pv_version_buffer; 928 929 /** 930 * version_buffer_size 931 */ 932 UWORD32 u4_version_buffer_size; 933 }ivd_ctl_getversioninfo_ip_t; 934 935 936 typedef struct{ 937 /** 938 * u4_size of the structure 939 */ 940 UWORD32 u4_size; 941 942 /** 943 * error code 944 */ 945 UWORD32 u4_error_code; 946 }ivd_ctl_getversioninfo_op_t; 947 948 #endif /* __IVD_H__ */ 949 950