Home | History | Annotate | Download | only in decoder
      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 Name         : ivd.h                                                */
     23 /*                                                                           */
     24 /*  Description       : This file contains all the necessary structure and   */
     25 /*                      enumeration definitions needed for the Application   */
     26 /*                      Program Interface(API) of the Ittiam Video Decoders  */
     27 /*                                                                           */
     28 /*  List of Functions : None                                                 */
     29 /*                                                                           */
     30 /*  Issues / Problems : None                                                 */
     31 /*                                                                           */
     32 /*  Revision History  :                                                      */
     33 /*                                                                           */
     34 /*         DD MM YYYY   Author(s)       Changes (Describe the changes made)  */
     35 /*         26 08 2010   100239(RCY)     Draft                                */
     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 }IVD_ARCH_T;
     74 
     75 /* IVD_SOC_T: SOC Enumeration                               */
     76 typedef 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 
     85 typedef 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 
    101 typedef 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 
    117 typedef 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                                   */
    129 typedef enum {
    130     IVD_CMD_VIDEO_NA                          = 0x7FFFFFFF,
    131     IVD_CMD_VIDEO_CTL                         = IV_CMD_DUMMY_ELEMENT + 1,
    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_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS      = 0xD0,
    232 }IVD_ERROR_CODES_T;
    233 
    234 
    235 /*****************************************************************************/
    236 /* Structure                                                                 */
    237 /*****************************************************************************/
    238 /* structure for passing output buffers to codec during get display buffer   */
    239 /* call                                                                      */
    240 typedef struct {
    241 
    242     /* number of output buffers */
    243     UWORD32             u4_num_bufs;
    244 
    245     /* list of pointers to output buffers */
    246     UWORD8              *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS];
    247 
    248     /* sizes of each output buffer */
    249     UWORD32             u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    250 
    251 }ivd_out_bufdesc_t;
    252 
    253 /*****************************************************************************/
    254 /*   Initialize decoder                                                      */
    255 /*****************************************************************************/
    256 
    257 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_INIT                              */
    258 
    259 
    260 typedef struct {
    261     /* u4_size of the structure                                         */
    262     UWORD32                                 u4_size;
    263     IVD_API_COMMAND_TYPE_T                  e_cmd;
    264     /* no memrecords which are allocated on request of codec through
    265     fill mem records */
    266     UWORD32                                 u4_num_mem_rec;
    267     /* maximum height for which codec should be initialized */
    268     UWORD32                                 u4_frm_max_wd;
    269     /* maximum width for which codec should be initialized  */
    270     UWORD32                                 u4_frm_max_ht;
    271     /* format in which codec has to give out frame data for display */
    272     IV_COLOR_FORMAT_T                       e_output_format;
    273     /* pointer to memrecord array, which contains allocated resources */
    274     iv_mem_rec_t                            *pv_mem_rec_location;
    275 }ivd_init_ip_t;
    276 
    277 
    278 typedef struct{
    279     /* u4_size of the structure                                         */
    280     UWORD32                                 u4_size;
    281     UWORD32                                 u4_error_code;
    282 }ivd_init_op_t;
    283 
    284 
    285 /*****************************************************************************/
    286 /*   Video Decode                                                            */
    287 /*****************************************************************************/
    288 
    289 
    290 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE                      */
    291 
    292 
    293 typedef struct {
    294     /* u4_size of the structure                                         */
    295     UWORD32                                 u4_size;
    296     IVD_API_COMMAND_TYPE_T                  e_cmd;
    297     UWORD32                                 u4_ts;
    298     UWORD32                                 u4_num_Bytes;
    299     void                                    *pv_stream_buffer;
    300 
    301     /* output buffer desc */
    302     ivd_out_bufdesc_t                       s_out_buffer;
    303 
    304 }ivd_video_decode_ip_t;
    305 
    306 
    307 typedef struct{
    308     /* u4_size of the structure                                         */
    309     UWORD32                                 u4_size;
    310     UWORD32                                 u4_error_code;
    311     UWORD32                                 u4_num_bytes_consumed;
    312     UWORD32                                 u4_pic_wd;
    313     UWORD32                                 u4_pic_ht;
    314     IV_PICTURE_CODING_TYPE_T                e_pic_type;
    315     UWORD32                                 u4_frame_decoded_flag;
    316     UWORD32                                 u4_new_seq;
    317 
    318     UWORD32                                 u4_output_present;
    319     UWORD32                                 u4_progressive_frame_flag;
    320     UWORD32                                 u4_is_ref_flag;
    321     IV_COLOR_FORMAT_T                       e_output_format;
    322     iv_yuv_buf_t                            s_disp_frm_buf;
    323     IV_FLD_TYPE_T                           e4_fld_type;
    324     UWORD32                                 u4_ts;
    325     UWORD32                                 u4_disp_buf_id;
    326 }ivd_video_decode_op_t;
    327 
    328 
    329 /*****************************************************************************/
    330 /*   Get Display Frame                                                       */
    331 /*****************************************************************************/
    332 
    333 
    334 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME                 */
    335 
    336 typedef struct
    337 {
    338     /* u4_size of the structure                                         */
    339     UWORD32                                 u4_size;
    340 
    341     IVD_API_COMMAND_TYPE_T                  e_cmd;
    342 
    343     /* output buffer desc */
    344     ivd_out_bufdesc_t                       s_out_buffer;
    345 
    346 }ivd_get_display_frame_ip_t;
    347 
    348 
    349 typedef struct
    350 {
    351     /* u4_size of the structure                                         */
    352     UWORD32                                 u4_size;
    353     UWORD32                                 u4_error_code;
    354     UWORD32                                 u4_progressive_frame_flag;
    355     IV_PICTURE_CODING_TYPE_T                e_pic_type;
    356     UWORD32                                 u4_is_ref_flag;
    357     IV_COLOR_FORMAT_T                       e_output_format;
    358     iv_yuv_buf_t                            s_disp_frm_buf;
    359     IV_FLD_TYPE_T                           e4_fld_type;
    360     UWORD32                                 u4_ts;
    361     UWORD32                                 u4_disp_buf_id;
    362 }ivd_get_display_frame_op_t;
    363 
    364 /*****************************************************************************/
    365 /*   Set Display Frame                                                       */
    366 /*****************************************************************************/
    367 
    368 
    369 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
    370 
    371 typedef struct
    372 {
    373     /* u4_size of the structure                                         */
    374     UWORD32                                 u4_size;
    375 
    376     IVD_API_COMMAND_TYPE_T                  e_cmd;
    377 
    378     UWORD32                                 num_disp_bufs;
    379 
    380     /* output buffer desc */
    381     ivd_out_bufdesc_t                       s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS];
    382 
    383 }ivd_set_display_frame_ip_t;
    384 
    385 
    386 typedef struct
    387 {
    388     /* u4_size of the structure                                         */
    389     UWORD32                                 u4_size;
    390     UWORD32                                 u4_error_code;
    391 }ivd_set_display_frame_op_t;
    392 
    393 
    394 /*****************************************************************************/
    395 /*   Release Display Frame                                                       */
    396 /*****************************************************************************/
    397 
    398 
    399 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
    400 
    401 typedef struct
    402 {
    403     /* u4_size of the structure                                         */
    404     UWORD32                                 u4_size;
    405     IVD_API_COMMAND_TYPE_T                  e_cmd;
    406     UWORD32                                 u4_disp_buf_id;
    407 }ivd_rel_display_frame_ip_t;
    408 
    409 
    410 typedef struct
    411 {
    412     /* u4_size of the structure                                         */
    413     UWORD32                                 u4_size;
    414     UWORD32                                 u4_error_code;
    415 }ivd_rel_display_frame_op_t;
    416 
    417 /*****************************************************************************/
    418 /*   Video control  Flush                                                    */
    419 /*****************************************************************************/
    420 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
    421 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_FLUSH          */
    422 
    423 
    424 
    425 typedef struct{
    426     /* u4_size of the structure                                         */
    427     UWORD32                                 u4_size;
    428     IVD_API_COMMAND_TYPE_T                  e_cmd;
    429     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
    430 }ivd_ctl_flush_ip_t;
    431 
    432 
    433 typedef struct{
    434     /* u4_size of the structure                                         */
    435     UWORD32                                 u4_size;
    436     UWORD32                                 u4_error_code;
    437 }ivd_ctl_flush_op_t;
    438 
    439 /*****************************************************************************/
    440 /*   Video control reset                                                     */
    441 /*****************************************************************************/
    442 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
    443 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_RESET          */
    444 
    445 
    446 typedef struct{
    447     /* u4_size of the structure                                         */
    448     UWORD32                                 u4_size;
    449     IVD_API_COMMAND_TYPE_T                  e_cmd;
    450     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
    451 }ivd_ctl_reset_ip_t;
    452 
    453 
    454 typedef struct{
    455     /* u4_size of the structure                                         */
    456     UWORD32                                 u4_size;
    457     UWORD32                                 u4_error_code;
    458 }ivd_ctl_reset_op_t;
    459 
    460 
    461 /*****************************************************************************/
    462 /*   Video control  Set Params                                               */
    463 /*****************************************************************************/
    464 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
    465 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS           */
    466 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT          */
    467 
    468 
    469 
    470 typedef struct {
    471     /* u4_size of the structure                                         */
    472     UWORD32                                     u4_size;
    473     IVD_API_COMMAND_TYPE_T                      e_cmd;
    474     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    475     IVD_VIDEO_DECODE_MODE_T                     e_vid_dec_mode;
    476     UWORD32                                     u4_disp_wd;
    477     IVD_FRAME_SKIP_MODE_T                       e_frm_skip_mode;
    478     IVD_DISPLAY_FRAME_OUT_MODE_T                e_frm_out_mode;
    479 }ivd_ctl_set_config_ip_t;
    480 
    481 
    482 typedef struct{
    483     /* u4_size of the structure                                         */
    484     UWORD32                                     u4_size;
    485     UWORD32                                     u4_error_code;
    486 }ivd_ctl_set_config_op_t;
    487 
    488 /*****************************************************************************/
    489 /*   Video control:Get Buf Info                                              */
    490 /*****************************************************************************/
    491 
    492 /* IVD_API_COMMAND_TYPE_T::e_cmd         = IVD_CMD_VIDEO_CTL                 */
    493 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO          */
    494 
    495 
    496 typedef struct{
    497     /* u4_size of the structure                                         */
    498     UWORD32                                     u4_size;
    499     IVD_API_COMMAND_TYPE_T                      e_cmd;
    500     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    501 }ivd_ctl_getbufinfo_ip_t;
    502 
    503 
    504 typedef struct{
    505     /* u4_size of the structure                                         */
    506     UWORD32                                     u4_size;
    507     UWORD32                                     u4_error_code;
    508     /* no of display buffer sets required by codec */
    509     UWORD32                                     u4_num_disp_bufs;
    510     /* no of input buffers required for codec */
    511     UWORD32                                     u4_min_num_in_bufs;
    512     /* no of output buffers required for codec */
    513     UWORD32                                     u4_min_num_out_bufs;
    514     /* sizes of each input buffer required */
    515     UWORD32                                     u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    516     /* sizes of each output buffer required */
    517     UWORD32                                     u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    518 }ivd_ctl_getbufinfo_op_t;
    519 
    520 
    521 /*****************************************************************************/
    522 /*   Video control:Getstatus Call                                            */
    523 /*****************************************************************************/
    524 
    525 
    526 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
    527 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS           */
    528 
    529 
    530 typedef struct{
    531     /* u4_size of the structure                                         */
    532     UWORD32                                     u4_size;
    533     IVD_API_COMMAND_TYPE_T                      e_cmd;
    534     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    535 }ivd_ctl_getstatus_ip_t;
    536 
    537 
    538 typedef struct{
    539     UWORD32                  u4_size;
    540     UWORD32                  u4_error_code;
    541     /* no of display buffer sets required by codec */
    542     UWORD32                  u4_num_disp_bufs;
    543     UWORD32                  u4_pic_ht;
    544     UWORD32                  u4_pic_wd;
    545     UWORD32                  u4_frame_rate;
    546     UWORD32                  u4_bit_rate;
    547     IV_CONTENT_TYPE_T        e_content_type;
    548     IV_COLOR_FORMAT_T        e_output_chroma_format;
    549     /* no of input buffers required for codec */
    550     UWORD32                  u4_min_num_in_bufs;
    551     /* no of output buffers required for codec */
    552     UWORD32                  u4_min_num_out_bufs;
    553     /* sizes of each input buffer required */
    554     UWORD32                  u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    555     /* sizes of each output buffer required */
    556     UWORD32                  u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    557 }ivd_ctl_getstatus_op_t;
    558 
    559 
    560 /*****************************************************************************/
    561 /*   Video control:Get Version Info                                          */
    562 /*****************************************************************************/
    563 
    564 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
    565 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION          */
    566 
    567 
    568 typedef struct{
    569     /* u4_size of the structure                                         */
    570     UWORD32                                     u4_size;
    571     IVD_API_COMMAND_TYPE_T                      e_cmd;
    572     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    573     void                                        *pv_version_buffer;
    574     UWORD32                                     u4_version_buffer_size;
    575 }ivd_ctl_getversioninfo_ip_t;
    576 
    577 
    578 typedef struct{
    579     /* u4_size of the structure                                         */
    580     UWORD32                                     u4_size;
    581     UWORD32                                     u4_error_code;
    582 }ivd_ctl_getversioninfo_op_t;
    583 
    584 #endif /* __IVD_H__ */
    585 
    586