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