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 ARCH_RISCV64_GENERIC = 0x400, 72 }IVD_ARCH_T; 73 74 /* IVD_SOC_T: SOC Enumeration */ 75 typedef enum 76 { 77 SOC_NA = 0x7FFFFFFF, 78 SOC_GENERIC = 0x0, 79 SOC_HISI_37X = 0x100, 80 }IVD_SOC_T; 81 82 /* IVD_FRAME_SKIP_MODE_T:Skip mode Enumeration */ 83 84 typedef enum { 85 IVD_SKIP_NONE = 0x7FFFFFFF, 86 IVD_SKIP_P = 0x1, 87 IVD_SKIP_B = 0x2, 88 IVD_SKIP_I = 0x3, 89 IVD_SKIP_IP = 0x4, 90 IVD_SKIP_IB = 0x5, 91 IVD_SKIP_PB = 0x6, 92 IVD_SKIP_IPB = 0x7, 93 IVD_SKIP_IDR = 0x8, 94 IVD_SKIP_DEFAULT = IVD_SKIP_NONE, 95 }IVD_FRAME_SKIP_MODE_T; 96 97 /* IVD_VIDEO_DECODE_MODE_T: Set decoder to decode either frame worth of data */ 98 /* or only header worth of data */ 99 100 typedef enum { 101 IVD_DECODE_MODE_NA = 0x7FFFFFFF, 102 103 /* This enables the codec to process all decodable units */ 104 IVD_DECODE_FRAME = 0x0, 105 106 /* This enables the codec to decode header only */ 107 IVD_DECODE_HEADER = 0x1, 108 109 110 111 }IVD_VIDEO_DECODE_MODE_T; 112 113 114 /* IVD_DISPLAY_FRAME_OUT_MODE_T: Video Display Frame Output Mode */ 115 116 typedef enum { 117 118 IVD_DISPLAY_ORDER_NA = 0x7FFFFFFF, 119 /* To set codec to fill output buffers in display order */ 120 IVD_DISPLAY_FRAME_OUT = 0x0, 121 122 /* To set codec to fill output buffers in decode order */ 123 IVD_DECODE_FRAME_OUT = 0x1, 124 }IVD_DISPLAY_FRAME_OUT_MODE_T; 125 126 127 /* IVD_API_COMMAND_TYPE_T:API command type */ 128 typedef enum { 129 IVD_CMD_VIDEO_NA = 0x7FFFFFFF, 130 IVD_CMD_CREATE = IV_CMD_DUMMY_ELEMENT + 1, 131 IVD_CMD_DELETE, 132 IVD_CMD_VIDEO_CTL, 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_MEM_ALLOC_FAILED = 0x2b, 233 IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS = 0xD0, 234 }IVD_ERROR_CODES_T; 235 236 237 /*****************************************************************************/ 238 /* Structure */ 239 /*****************************************************************************/ 240 /* structure for passing output buffers to codec during get display buffer */ 241 /* call */ 242 typedef struct { 243 244 /** 245 * number of output buffers 246 */ 247 UWORD32 u4_num_bufs; 248 249 /** 250 *list of pointers to output buffers 251 */ 252 UWORD8 *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS]; 253 254 /** 255 * sizes of each output buffer 256 */ 257 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 258 259 }ivd_out_bufdesc_t; 260 261 /*****************************************************************************/ 262 /* Create decoder */ 263 /*****************************************************************************/ 264 265 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_CREATE */ 266 267 268 typedef struct { 269 /** 270 * u4_size of the structure 271 */ 272 UWORD32 u4_size; 273 274 /** 275 * e_cmd 276 */ 277 IVD_API_COMMAND_TYPE_T e_cmd; 278 279 /** 280 * format in which codec has to give out frame data for display 281 */ 282 IV_COLOR_FORMAT_T e_output_format; 283 284 /** 285 * Flag to indicate shared display buffer mode 286 */ 287 UWORD32 u4_share_disp_buf; 288 289 /** 290 * Pointer to a function for aligned allocation. 291 */ 292 void *(*pf_aligned_alloc)(void *pv_mem_ctxt, WORD32 alignment, WORD32 size); 293 294 /** 295 * Pointer to a function for aligned free. 296 */ 297 void (*pf_aligned_free)(void *pv_mem_ctxt, void *pv_buf); 298 299 /** 300 * Pointer to memory context that is needed during alloc/free for custom 301 * memory managers. This will be passed as first argument to pf_aligned_alloc and 302 * pf_aligned_free. 303 * If application is using standard memory functions like 304 * malloc/aligned_malloc/memalign/free/aligned_free, 305 * then this is not needed and can be set to NULL 306 */ 307 void *pv_mem_ctxt; 308 309 }ivd_create_ip_t; 310 311 312 typedef struct { 313 /** 314 * u4_size of the structure 315 */ 316 UWORD32 u4_size; 317 318 /** 319 * u4_error_code 320 */ 321 UWORD32 u4_error_code; 322 323 /** 324 * Codec Handle 325 */ 326 void *pv_handle; 327 328 }ivd_create_op_t; 329 330 331 /*****************************************************************************/ 332 /* Delete decoder */ 333 /*****************************************************************************/ 334 335 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_DELETE */ 336 337 338 339 typedef struct { 340 /** 341 * u4_size of the structure 342 */ 343 UWORD32 u4_size; 344 345 /** 346 * cmd 347 */ 348 IVD_API_COMMAND_TYPE_T e_cmd; 349 350 }ivd_delete_ip_t; 351 352 353 typedef struct { 354 /** 355 * u4_size of the structure 356 */ 357 UWORD32 u4_size; 358 359 /** 360 * error_code 361 */ 362 UWORD32 u4_error_code; 363 364 }ivd_delete_op_t; 365 366 /*****************************************************************************/ 367 /* Video Decode */ 368 /*****************************************************************************/ 369 370 371 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE */ 372 373 374 typedef struct { 375 /** 376 * u4_size of the structure 377 */ 378 UWORD32 u4_size; 379 380 /** 381 * e_cmd 382 */ 383 IVD_API_COMMAND_TYPE_T e_cmd; 384 385 /** 386 * u4_ts 387 */ 388 UWORD32 u4_ts; 389 390 /** 391 * u4_num_Bytes 392 */ 393 UWORD32 u4_num_Bytes; 394 395 /** 396 * pv_stream_buffer 397 */ 398 void *pv_stream_buffer; 399 400 /** 401 * output buffer desc 402 */ 403 ivd_out_bufdesc_t s_out_buffer; 404 405 }ivd_video_decode_ip_t; 406 407 408 typedef struct { 409 /** 410 * u4_size of the structure 411 */ 412 UWORD32 u4_size; 413 414 /** 415 * u4_error_code 416 */ 417 UWORD32 u4_error_code; 418 419 /** 420 * num_bytes_consumed 421 */ 422 UWORD32 u4_num_bytes_consumed; 423 424 /** 425 * pic_wd 426 */ 427 UWORD32 u4_pic_wd; 428 429 /** 430 * pic_ht 431 */ 432 UWORD32 u4_pic_ht; 433 434 /** 435 * pic_type 436 */ 437 IV_PICTURE_CODING_TYPE_T e_pic_type; 438 439 /** 440 * frame_decoded_flag 441 */ 442 UWORD32 u4_frame_decoded_flag; 443 444 /** 445 * new_seq 446 */ 447 UWORD32 u4_new_seq; 448 449 /** 450 * output_present 451 */ 452 UWORD32 u4_output_present; 453 454 /** 455 * progressive_frame_flag 456 */ 457 UWORD32 u4_progressive_frame_flag; 458 459 /** 460 * is_ref_flag 461 */ 462 UWORD32 u4_is_ref_flag; 463 464 /** 465 * output_format 466 */ 467 IV_COLOR_FORMAT_T e_output_format; 468 469 /** 470 * disp_frm_buf 471 */ 472 iv_yuv_buf_t s_disp_frm_buf; 473 474 /** 475 * fld_type 476 */ 477 IV_FLD_TYPE_T e4_fld_type; 478 479 /** 480 * ts 481 */ 482 UWORD32 u4_ts; 483 484 /** 485 * disp_buf_id 486 */ 487 UWORD32 u4_disp_buf_id; 488 489 /** 490 * reorder_depth 491 */ 492 WORD32 i4_reorder_depth; 493 494 /** 495 * display index 496 */ 497 WORD32 i4_display_index; 498 499 }ivd_video_decode_op_t; 500 501 502 /*****************************************************************************/ 503 /* Get Display Frame */ 504 /*****************************************************************************/ 505 506 507 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME */ 508 509 typedef struct 510 { 511 /** 512 * u4_size of the structure 513 */ 514 UWORD32 u4_size; 515 516 /** 517 * e_cmd 518 */ 519 IVD_API_COMMAND_TYPE_T e_cmd; 520 521 /** 522 * output buffer desc 523 */ 524 ivd_out_bufdesc_t s_out_buffer; 525 526 }ivd_get_display_frame_ip_t; 527 528 529 typedef struct 530 { 531 /** 532 * u4_size of the structure 533 */ 534 UWORD32 u4_size; 535 536 /** 537 * error_code 538 */ 539 UWORD32 u4_error_code; 540 541 /** 542 * progressive_frame_flag 543 */ 544 UWORD32 u4_progressive_frame_flag; 545 546 /** 547 * pic_type 548 */ 549 IV_PICTURE_CODING_TYPE_T e_pic_type; 550 551 /** 552 * is_ref_flag 553 */ 554 UWORD32 u4_is_ref_flag; 555 556 /** 557 * output_format 558 */ 559 IV_COLOR_FORMAT_T e_output_format; 560 561 /** 562 * disp_frm_buf 563 */ 564 iv_yuv_buf_t s_disp_frm_buf; 565 566 /** 567 * fld_type 568 */ 569 IV_FLD_TYPE_T e4_fld_type; 570 571 /** 572 * ts 573 */ 574 UWORD32 u4_ts; 575 576 /** 577 * disp_buf_id 578 */ 579 UWORD32 u4_disp_buf_id; 580 }ivd_get_display_frame_op_t; 581 582 /*****************************************************************************/ 583 /* Set Display Frame */ 584 /*****************************************************************************/ 585 586 587 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME */ 588 589 typedef struct 590 { 591 /** 592 * u4_size of the structure 593 */ 594 UWORD32 u4_size; 595 596 /** 597 * cmd 598 */ 599 IVD_API_COMMAND_TYPE_T e_cmd; 600 601 /** 602 * num_disp_bufs 603 */ 604 UWORD32 num_disp_bufs; 605 606 /** 607 * output buffer desc 608 */ 609 ivd_out_bufdesc_t s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS]; 610 611 }ivd_set_display_frame_ip_t; 612 613 614 typedef struct 615 { 616 /** 617 * u4_size of the structure 618 */ 619 UWORD32 u4_size; 620 621 /** 622 * error code 623 */ 624 UWORD32 u4_error_code; 625 }ivd_set_display_frame_op_t; 626 627 628 /*****************************************************************************/ 629 /* Release Display Frame */ 630 /*****************************************************************************/ 631 632 633 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME */ 634 635 typedef struct 636 { 637 /** 638 * u4_size of the structure 639 */ 640 UWORD32 u4_size; 641 642 /** 643 * e_cmd 644 */ 645 IVD_API_COMMAND_TYPE_T e_cmd; 646 647 /** 648 * disp_buf_id 649 */ 650 UWORD32 u4_disp_buf_id; 651 }ivd_rel_display_frame_ip_t; 652 653 654 typedef struct 655 { 656 /** 657 * u4_size of the structure 658 */ 659 UWORD32 u4_size; 660 661 /** 662 * error code 663 */ 664 UWORD32 u4_error_code; 665 }ivd_rel_display_frame_op_t; 666 667 /*****************************************************************************/ 668 /* Video control Flush */ 669 /*****************************************************************************/ 670 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 671 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd = IVD_CMD_ctl_FLUSH */ 672 673 674 675 typedef struct { 676 /** 677 * u4_size of the structure 678 */ 679 UWORD32 u4_size; 680 681 /** 682 * cmd 683 */ 684 IVD_API_COMMAND_TYPE_T e_cmd; 685 686 /** 687 * sub_cmd 688 */ 689 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 690 }ivd_ctl_flush_ip_t; 691 692 693 typedef struct { 694 /** 695 * u4_size of the structure 696 */ 697 UWORD32 u4_size; 698 699 /** 700 * error code 701 */ 702 UWORD32 u4_error_code; 703 }ivd_ctl_flush_op_t; 704 705 /*****************************************************************************/ 706 /* Video control reset */ 707 /*****************************************************************************/ 708 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 709 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd = IVD_CMD_ctl_RESET */ 710 711 712 typedef struct { 713 /** 714 * u4_size of the structure 715 */ 716 UWORD32 u4_size; 717 718 /** 719 * cmd 720 */ 721 IVD_API_COMMAND_TYPE_T e_cmd; 722 723 /** 724 * sub_cmd 725 */ 726 727 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 728 }ivd_ctl_reset_ip_t; 729 730 731 typedef struct { 732 /** 733 * u4_size of the structure 734 */ 735 UWORD32 u4_size; 736 737 /** 738 * error code 739 */ 740 UWORD32 u4_error_code; 741 }ivd_ctl_reset_op_t; 742 743 744 /*****************************************************************************/ 745 /* Video control Set Params */ 746 /*****************************************************************************/ 747 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 748 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS */ 749 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT */ 750 751 752 753 typedef struct { 754 /** 755 * u4_size of the structure 756 */ 757 UWORD32 u4_size; 758 759 /** 760 * cmd 761 */ 762 IVD_API_COMMAND_TYPE_T e_cmd; 763 764 /** 765 * sub_cmd 766 */ 767 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 768 769 /** 770 * vid_dec_mode 771 */ 772 IVD_VIDEO_DECODE_MODE_T e_vid_dec_mode; 773 774 /** 775 * disp_wd 776 */ 777 UWORD32 u4_disp_wd; 778 779 /** 780 * frm_skip_mode 781 */ 782 IVD_FRAME_SKIP_MODE_T e_frm_skip_mode; 783 784 /** 785 * frm_out_mode 786 */ 787 IVD_DISPLAY_FRAME_OUT_MODE_T e_frm_out_mode; 788 }ivd_ctl_set_config_ip_t; 789 790 791 typedef struct { 792 /** 793 * u4_size of the structure 794 */ 795 UWORD32 u4_size; 796 797 /** 798 * u4_error_code 799 */ 800 UWORD32 u4_error_code; 801 }ivd_ctl_set_config_op_t; 802 803 /*****************************************************************************/ 804 /* Video control:Get Buf Info */ 805 /*****************************************************************************/ 806 807 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 808 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO */ 809 810 811 typedef struct { 812 /** 813 * u4_size of the structure 814 */ 815 UWORD32 u4_size; 816 817 /** 818 * e_cmd 819 */ 820 IVD_API_COMMAND_TYPE_T e_cmd; 821 822 /** 823 * sub_cmd 824 */ 825 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 826 }ivd_ctl_getbufinfo_ip_t; 827 828 829 typedef struct { 830 /** 831 * u4_size of the structure 832 */ 833 UWORD32 u4_size; 834 835 /** 836 * error code 837 */ 838 UWORD32 u4_error_code; 839 840 /** 841 * no of display buffer sets required by codec 842 */ 843 UWORD32 u4_num_disp_bufs; 844 845 /** 846 * no of input buffers required for codec 847 */ 848 UWORD32 u4_min_num_in_bufs; 849 850 /** 851 * no of output buffers required for codec 852 */ 853 UWORD32 u4_min_num_out_bufs; 854 855 /** 856 * sizes of each input buffer required 857 */ 858 UWORD32 u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 859 860 /** 861 * sizes of each output buffer required 862 */ 863 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 864 }ivd_ctl_getbufinfo_op_t; 865 866 867 /*****************************************************************************/ 868 /* Video control:Getstatus Call */ 869 /*****************************************************************************/ 870 871 872 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 873 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS */ 874 875 876 typedef struct { 877 /** 878 * u4_size of the structure 879 */ 880 UWORD32 u4_size; 881 882 /** 883 * cmd 884 */ 885 IVD_API_COMMAND_TYPE_T e_cmd; 886 887 /** 888 * sub_cmd 889 */ 890 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 891 }ivd_ctl_getstatus_ip_t; 892 893 894 typedef struct { 895 896 /** 897 * u4_size of the structure 898 */ 899 UWORD32 u4_size; 900 901 /** 902 * error code 903 */ 904 UWORD32 u4_error_code; 905 906 /** 907 * no of display buffer sets required by codec 908 */ 909 UWORD32 u4_num_disp_bufs; 910 911 /** 912 * u4_pic_ht 913 */ 914 UWORD32 u4_pic_ht; 915 916 /** 917 * u4_pic_wd 918 */ 919 UWORD32 u4_pic_wd; 920 921 /** 922 * frame_rate 923 */ 924 UWORD32 u4_frame_rate; 925 926 /** 927 * u4_bit_rate 928 */ 929 UWORD32 u4_bit_rate; 930 931 /** 932 * content_type 933 */ 934 IV_CONTENT_TYPE_T e_content_type; 935 936 /** 937 * output_chroma_format 938 */ 939 IV_COLOR_FORMAT_T e_output_chroma_format; 940 941 /** 942 * no of input buffers required for codec 943 */ 944 UWORD32 u4_min_num_in_bufs; 945 946 /** 947 * no of output buffers required for codec 948 */ 949 UWORD32 u4_min_num_out_bufs; 950 951 /** 952 * sizes of each input buffer required 953 */ 954 UWORD32 u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 955 956 /** 957 * sizes of each output buffer required 958 */ 959 UWORD32 u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS]; 960 }ivd_ctl_getstatus_op_t; 961 962 963 /*****************************************************************************/ 964 /* Video control:Get Version Info */ 965 /*****************************************************************************/ 966 967 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_CTL */ 968 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION */ 969 970 971 typedef struct { 972 /** 973 * u4_size of the structure 974 */ 975 UWORD32 u4_size; 976 977 /** 978 * cmd 979 */ 980 IVD_API_COMMAND_TYPE_T e_cmd; 981 982 /** 983 * sub_cmd 984 */ 985 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd; 986 987 /** 988 * pv_version_buffer 989 */ 990 void *pv_version_buffer; 991 992 /** 993 * version_buffer_size 994 */ 995 UWORD32 u4_version_buffer_size; 996 }ivd_ctl_getversioninfo_ip_t; 997 998 999 typedef struct { 1000 /** 1001 * u4_size of the structure 1002 */ 1003 UWORD32 u4_size; 1004 1005 /** 1006 * error code 1007 */ 1008 UWORD32 u4_error_code; 1009 }ivd_ctl_getversioninfo_op_t; 1010 1011 #endif /* __IVD_H__ */ 1012 1013