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
     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                               */
     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      = 0x300,
    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     /**
    243      * number of output buffers
    244      */
    245     UWORD32             u4_num_bufs;
    246 
    247     /**
    248      *list of pointers to output buffers
    249      */
    250     UWORD8              *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS];
    251 
    252     /**
    253      * sizes of each output buffer
    254      */
    255     UWORD32             u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    256 
    257 }ivd_out_bufdesc_t;
    258 
    259 /*****************************************************************************/
    260 /*   Initialize decoder                                                      */
    261 /*****************************************************************************/
    262 
    263 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_INIT                              */
    264 
    265 
    266 typedef struct {
    267     /**
    268      * u4_size of the structure
    269      */
    270     UWORD32                                 u4_size;
    271 
    272     /**
    273      *  e_cmd
    274      */
    275     IVD_API_COMMAND_TYPE_T                  e_cmd;
    276 
    277     /**
    278      *no memrecords which are allocated on request of codec through fill mem records
    279      */
    280     UWORD32                                 u4_num_mem_rec;
    281     /**
    282      * maximum height for which codec should be initialized
    283      */
    284     UWORD32                                 u4_frm_max_wd;
    285     /**
    286      * maximum width for which codec should be initialized
    287      */
    288     UWORD32                                 u4_frm_max_ht;
    289     /**
    290      * format in which codec has to give out frame data for display
    291      */
    292     IV_COLOR_FORMAT_T                       e_output_format;
    293     /**
    294      * pointer to memrecord array, which contains allocated resources
    295      */
    296     iv_mem_rec_t                            *pv_mem_rec_location;
    297 }ivd_init_ip_t;
    298 
    299 
    300 typedef struct{
    301     /**
    302      * u4_size of the structure
    303      */
    304     UWORD32                                 u4_size;
    305 
    306     /**
    307      * u4_error_code
    308      */
    309     UWORD32                                 u4_error_code;
    310 }ivd_init_op_t;
    311 
    312 
    313 /*****************************************************************************/
    314 /*   Video Decode                                                            */
    315 /*****************************************************************************/
    316 
    317 
    318 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE                      */
    319 
    320 
    321 typedef struct {
    322     /**
    323      * u4_size of the structure
    324      */
    325     UWORD32                                 u4_size;
    326 
    327     /**
    328      * e_cmd
    329      */
    330     IVD_API_COMMAND_TYPE_T                  e_cmd;
    331 
    332     /**
    333      * u4_ts
    334      */
    335     UWORD32                                 u4_ts;
    336 
    337     /**
    338      * u4_num_Bytes
    339      */
    340     UWORD32                                 u4_num_Bytes;
    341 
    342     /**
    343      * pv_stream_buffer
    344      */
    345     void                                    *pv_stream_buffer;
    346 
    347     /**
    348      * output buffer desc
    349      */
    350     ivd_out_bufdesc_t                       s_out_buffer;
    351 
    352 }ivd_video_decode_ip_t;
    353 
    354 
    355 typedef struct{
    356     /**
    357      * u4_size of the structure
    358      */
    359     UWORD32                                 u4_size;
    360 
    361     /**
    362      * u4_error_code
    363      */
    364     UWORD32                                 u4_error_code;
    365 
    366     /**
    367      * num_bytes_consumed
    368      */
    369     UWORD32                                 u4_num_bytes_consumed;
    370 
    371     /**
    372      * pic_wd
    373      */
    374     UWORD32                                 u4_pic_wd;
    375 
    376     /**
    377      * pic_ht
    378      */
    379     UWORD32                                 u4_pic_ht;
    380 
    381     /**
    382      * pic_type
    383      */
    384     IV_PICTURE_CODING_TYPE_T                e_pic_type;
    385 
    386     /**
    387      * frame_decoded_flag
    388      */
    389     UWORD32                                 u4_frame_decoded_flag;
    390 
    391     /**
    392      * new_seq
    393      */
    394     UWORD32                                 u4_new_seq;
    395 
    396     /**
    397      * output_present
    398      */
    399     UWORD32                                 u4_output_present;
    400 
    401     /**
    402      * progressive_frame_flag
    403      */
    404     UWORD32                                 u4_progressive_frame_flag;
    405 
    406     /**
    407      * is_ref_flag
    408      */
    409     UWORD32                                 u4_is_ref_flag;
    410 
    411     /**
    412      * output_format
    413      */
    414     IV_COLOR_FORMAT_T                       e_output_format;
    415 
    416     /**
    417      * disp_frm_buf
    418      */
    419     iv_yuv_buf_t                            s_disp_frm_buf;
    420 
    421     /**
    422      * fld_type
    423      */
    424     IV_FLD_TYPE_T                           e4_fld_type;
    425 
    426     /**
    427      * ts
    428      */
    429     UWORD32                                 u4_ts;
    430 
    431     /**
    432      * disp_buf_id
    433      */
    434     UWORD32                                 u4_disp_buf_id;
    435 }ivd_video_decode_op_t;
    436 
    437 
    438 /*****************************************************************************/
    439 /*   Get Display Frame                                                       */
    440 /*****************************************************************************/
    441 
    442 
    443 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME                 */
    444 
    445 typedef struct
    446 {
    447     /**
    448      * u4_size of the structure
    449      */
    450     UWORD32                                 u4_size;
    451 
    452     /**
    453      * e_cmd
    454      */
    455     IVD_API_COMMAND_TYPE_T                  e_cmd;
    456 
    457     /**
    458      * output buffer desc
    459      */
    460     ivd_out_bufdesc_t                       s_out_buffer;
    461 
    462 }ivd_get_display_frame_ip_t;
    463 
    464 
    465 typedef struct
    466 {
    467     /**
    468      * u4_size of the structure
    469      */
    470     UWORD32                                 u4_size;
    471 
    472     /**
    473      * error_code
    474      */
    475     UWORD32                                 u4_error_code;
    476 
    477     /**
    478      * progressive_frame_flag
    479      */
    480     UWORD32                                 u4_progressive_frame_flag;
    481 
    482     /**
    483      * pic_type
    484      */
    485     IV_PICTURE_CODING_TYPE_T                e_pic_type;
    486 
    487     /**
    488      * is_ref_flag
    489      */
    490     UWORD32                                 u4_is_ref_flag;
    491 
    492     /**
    493      * output_format
    494      */
    495     IV_COLOR_FORMAT_T                       e_output_format;
    496 
    497     /**
    498      * disp_frm_buf
    499      */
    500     iv_yuv_buf_t                            s_disp_frm_buf;
    501 
    502     /**
    503      * fld_type
    504      */
    505     IV_FLD_TYPE_T                           e4_fld_type;
    506 
    507     /**
    508      * ts
    509      */
    510     UWORD32                                 u4_ts;
    511 
    512     /**
    513      * disp_buf_id
    514      */
    515     UWORD32                                 u4_disp_buf_id;
    516 }ivd_get_display_frame_op_t;
    517 
    518 /*****************************************************************************/
    519 /*   Set Display Frame                                                       */
    520 /*****************************************************************************/
    521 
    522 
    523 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
    524 
    525 typedef struct
    526 {
    527     /**
    528      * u4_size of the structure
    529      */
    530     UWORD32                                 u4_size;
    531 
    532     /**
    533      * cmd
    534      */
    535     IVD_API_COMMAND_TYPE_T                  e_cmd;
    536 
    537     /**
    538      * num_disp_bufs
    539      */
    540     UWORD32                                 num_disp_bufs;
    541 
    542     /**
    543      * output buffer desc
    544      */
    545     ivd_out_bufdesc_t                       s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS];
    546 
    547 }ivd_set_display_frame_ip_t;
    548 
    549 
    550 typedef struct
    551 {
    552     /**
    553      * u4_size of the structure
    554      */
    555     UWORD32                                 u4_size;
    556 
    557     /**
    558      * error code
    559      */
    560     UWORD32                                 u4_error_code;
    561 }ivd_set_display_frame_op_t;
    562 
    563 
    564 /*****************************************************************************/
    565 /*   Release Display Frame                                                       */
    566 /*****************************************************************************/
    567 
    568 
    569 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
    570 
    571 typedef struct
    572 {
    573     /**
    574      * u4_size of the structure
    575      */
    576     UWORD32                                 u4_size;
    577 
    578     /**
    579      * e_cmd
    580      */
    581     IVD_API_COMMAND_TYPE_T                  e_cmd;
    582 
    583     /**
    584      * disp_buf_id
    585      */
    586     UWORD32                                 u4_disp_buf_id;
    587 }ivd_rel_display_frame_ip_t;
    588 
    589 
    590 typedef struct
    591 {
    592     /**
    593      * u4_size of the structure
    594      */
    595     UWORD32                                 u4_size;
    596 
    597     /**
    598      * error code
    599      */
    600     UWORD32                                 u4_error_code;
    601 }ivd_rel_display_frame_op_t;
    602 
    603 /*****************************************************************************/
    604 /*   Video control  Flush                                                    */
    605 /*****************************************************************************/
    606 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
    607 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_FLUSH          */
    608 
    609 
    610 
    611 typedef struct{
    612     /**
    613      * u4_size of the structure
    614      */
    615     UWORD32                                 u4_size;
    616 
    617     /**
    618      * cmd
    619      */
    620     IVD_API_COMMAND_TYPE_T                  e_cmd;
    621 
    622     /**
    623      * sub_cmd
    624      */
    625     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
    626 }ivd_ctl_flush_ip_t;
    627 
    628 
    629 typedef struct{
    630     /**
    631      * u4_size of the structure
    632      */
    633     UWORD32                                 u4_size;
    634 
    635     /**
    636      * error code
    637      */
    638     UWORD32                                 u4_error_code;
    639 }ivd_ctl_flush_op_t;
    640 
    641 /*****************************************************************************/
    642 /*   Video control reset                                                     */
    643 /*****************************************************************************/
    644 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
    645 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_RESET          */
    646 
    647 
    648 typedef struct{
    649     /**
    650      * u4_size of the structure
    651      */
    652     UWORD32                                 u4_size;
    653 
    654     /**
    655      * cmd
    656      */
    657     IVD_API_COMMAND_TYPE_T                  e_cmd;
    658 
    659     /**
    660      * sub_cmd
    661      */
    662 
    663     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
    664 }ivd_ctl_reset_ip_t;
    665 
    666 
    667 typedef struct{
    668     /**
    669      * u4_size of the structure
    670      */
    671     UWORD32                                 u4_size;
    672 
    673     /**
    674      * error code
    675      */
    676     UWORD32                                 u4_error_code;
    677 }ivd_ctl_reset_op_t;
    678 
    679 
    680 /*****************************************************************************/
    681 /*   Video control  Set Params                                               */
    682 /*****************************************************************************/
    683 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
    684 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS           */
    685 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT          */
    686 
    687 
    688 
    689 typedef struct {
    690     /**
    691      * u4_size of the structure
    692      */
    693     UWORD32                                     u4_size;
    694 
    695     /**
    696      * cmd
    697      */
    698     IVD_API_COMMAND_TYPE_T                      e_cmd;
    699 
    700     /**
    701      * sub_cmd
    702      */
    703     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    704 
    705     /**
    706      * vid_dec_mode
    707      */
    708     IVD_VIDEO_DECODE_MODE_T                     e_vid_dec_mode;
    709 
    710     /**
    711      * disp_wd
    712      */
    713     UWORD32                                     u4_disp_wd;
    714 
    715     /**
    716      * frm_skip_mode
    717      */
    718     IVD_FRAME_SKIP_MODE_T                       e_frm_skip_mode;
    719 
    720     /**
    721      * frm_out_mode
    722      */
    723     IVD_DISPLAY_FRAME_OUT_MODE_T                e_frm_out_mode;
    724 }ivd_ctl_set_config_ip_t;
    725 
    726 
    727 typedef struct{
    728     /**
    729      * u4_size of the structure
    730      */
    731     UWORD32                                     u4_size;
    732 
    733     /**
    734      * u4_error_code
    735      */
    736     UWORD32                                     u4_error_code;
    737 }ivd_ctl_set_config_op_t;
    738 
    739 /*****************************************************************************/
    740 /*   Video control:Get Buf Info                                              */
    741 /*****************************************************************************/
    742 
    743 /* IVD_API_COMMAND_TYPE_T::e_cmd         = IVD_CMD_VIDEO_CTL                 */
    744 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO          */
    745 
    746 
    747 typedef struct{
    748     /**
    749      * u4_size of the structure
    750      */
    751     UWORD32                                     u4_size;
    752 
    753     /**
    754      *  e_cmd
    755      */
    756     IVD_API_COMMAND_TYPE_T                      e_cmd;
    757 
    758     /**
    759      * sub_cmd
    760      */
    761     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    762 }ivd_ctl_getbufinfo_ip_t;
    763 
    764 
    765 typedef struct{
    766     /**
    767      * u4_size of the structure
    768      */
    769     UWORD32                                     u4_size;
    770 
    771     /**
    772      * error code
    773      */
    774     UWORD32                                     u4_error_code;
    775 
    776     /**
    777      * no of display buffer sets required by codec
    778      */
    779     UWORD32                                     u4_num_disp_bufs;
    780 
    781     /**
    782      * no of input buffers required for codec
    783      */
    784     UWORD32                                     u4_min_num_in_bufs;
    785 
    786     /**
    787      * no of output buffers required for codec
    788      */
    789     UWORD32                                     u4_min_num_out_bufs;
    790 
    791     /**
    792      * sizes of each input buffer required
    793      */
    794     UWORD32                                     u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    795 
    796     /**
    797      * sizes of each output buffer required
    798      */
    799     UWORD32                                     u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    800 }ivd_ctl_getbufinfo_op_t;
    801 
    802 
    803 /*****************************************************************************/
    804 /*   Video control:Getstatus Call                                            */
    805 /*****************************************************************************/
    806 
    807 
    808 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
    809 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS           */
    810 
    811 
    812 typedef struct{
    813     /**
    814      * u4_size of the structure
    815      */
    816     UWORD32                                     u4_size;
    817 
    818     /**
    819      * cmd
    820      */
    821     IVD_API_COMMAND_TYPE_T                      e_cmd;
    822 
    823     /**
    824      * sub_cmd
    825      */
    826     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    827 }ivd_ctl_getstatus_ip_t;
    828 
    829 
    830 typedef struct{
    831 
    832      /**
    833       * u4_size of the structure
    834       */
    835     UWORD32                  u4_size;
    836 
    837     /**
    838       * error code
    839       */
    840     UWORD32                  u4_error_code;
    841 
    842     /**
    843      * no of display buffer sets required by codec
    844      */
    845     UWORD32                  u4_num_disp_bufs;
    846 
    847     /**
    848      * u4_pic_ht
    849      */
    850     UWORD32                  u4_pic_ht;
    851 
    852     /**
    853      * u4_pic_wd
    854      */
    855     UWORD32                  u4_pic_wd;
    856 
    857     /**
    858      * frame_rate
    859      */
    860     UWORD32                  u4_frame_rate;
    861 
    862     /**
    863      * u4_bit_rate
    864      */
    865     UWORD32                  u4_bit_rate;
    866 
    867     /**
    868      * content_type
    869      */
    870     IV_CONTENT_TYPE_T        e_content_type;
    871 
    872     /**
    873      * output_chroma_format
    874      */
    875     IV_COLOR_FORMAT_T        e_output_chroma_format;
    876 
    877     /**
    878      * no of input buffers required for codec
    879      */
    880     UWORD32                  u4_min_num_in_bufs;
    881 
    882     /**
    883      * no of output buffers required for codec
    884      */
    885     UWORD32                  u4_min_num_out_bufs;
    886 
    887     /**
    888      * sizes of each input buffer required
    889      */
    890     UWORD32                  u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    891 
    892     /**
    893      * sizes of each output buffer required
    894      */
    895     UWORD32                  u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    896 }ivd_ctl_getstatus_op_t;
    897 
    898 
    899 /*****************************************************************************/
    900 /*   Video control:Get Version Info                                          */
    901 /*****************************************************************************/
    902 
    903 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
    904 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION          */
    905 
    906 
    907 typedef struct{
    908     /**
    909      * u4_size of the structure
    910      */
    911     UWORD32                                     u4_size;
    912 
    913     /**
    914      * cmd
    915      */
    916     IVD_API_COMMAND_TYPE_T                      e_cmd;
    917 
    918     /**
    919      * sub_cmd
    920      */
    921     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    922 
    923     /**
    924      * pv_version_buffer
    925      */
    926     void                                        *pv_version_buffer;
    927 
    928     /**
    929      * version_buffer_size
    930      */
    931     UWORD32                                     u4_version_buffer_size;
    932 }ivd_ctl_getversioninfo_ip_t;
    933 
    934 
    935 typedef struct{
    936     /**
    937      * u4_size of the structure
    938      */
    939     UWORD32                                     u4_size;
    940 
    941     /**
    942      * error code
    943      */
    944     UWORD32                                     u4_error_code;
    945 }ivd_ctl_getversioninfo_op_t;
    946 
    947 #endif /* __IVD_H__ */
    948 
    949