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