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