summaryrefslogtreecommitdiffstats
path: root/decoder/ivd.h
blob: b30b0b1307931db195912a223a2ffb752d144216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
/******************************************************************************
 *
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *****************************************************************************
 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
/*****************************************************************************/
/*                                                                           */
/*  File Name         : ivd.h                                                */
/*                                                                           */
/*  Description       : This file contains all the necessary structure and   */
/*                      enumeration definitions needed for the Application   */
/*                      Program Interface(API) of the Ittiam Video Decoders  */
/*                                                                           */
/*  List of Functions : None                                                 */
/*                                                                           */
/*  Issues / Problems : None                                                 */
/*                                                                           */
/*  Revision History  :                                                      */
/*                                                                           */
/*         DD MM YYYY   Author(s)       Changes (Describe the changes made)  */
/*         26 08 2010   100239(RCY)     Draft                                */
/*                                                                           */
/*****************************************************************************/

#ifndef _IVD_H
#define _IVD_H

/*****************************************************************************/
/* Constant Macros                                                           */
/*****************************************************************************/
#define IVD_VIDDEC_MAX_IO_BUFFERS 64
/*****************************************************************************/
/* Typedefs                                                                  */
/*****************************************************************************/

/*****************************************************************************/
/* Enums                                                                     */
/*****************************************************************************/

/* IVD_ARCH_T: Architecture Enumeration                               */
typedef enum
{
    ARCH_NA                 =   0x7FFFFFFF,
    ARCH_ARM_NONEON         =   0x0,
    ARCH_ARM_A9Q,
    ARCH_ARM_A9A,
    ARCH_ARM_A9,
    ARCH_ARM_A7,
    ARCH_ARM_A5,
    ARCH_ARM_A15,
    ARCH_ARM_NEONINTR,
    ARCH_ARMV8_GENERIC,
    ARCH_X86_GENERIC        =   0x100,
    ARCH_X86_SSSE3,
    ARCH_X86_SSE42,
    ARCH_X86_AVX2,
    ARCH_MIPS_GENERIC       =   0x200,
    ARCH_MIPS_32
}IVD_ARCH_T;

/* IVD_SOC_T: SOC Enumeration                               */
typedef enum
{
    SOC_NA                  = 0x7FFFFFFF,
    SOC_GENERIC             = 0x0,
    SOC_HISI_37X            = 0x100,
}IVD_SOC_T;

/* IVD_FRAME_SKIP_MODE_T:Skip mode Enumeration                               */

typedef enum {
    IVD_SKIP_NONE                               = 0x7FFFFFFF,
    IVD_SKIP_P                                  = 0x1,
    IVD_SKIP_B                                  = 0x2,
    IVD_SKIP_I                                  = 0x3,
    IVD_SKIP_IP                                 = 0x4,
    IVD_SKIP_IB                                 = 0x5,
    IVD_SKIP_PB                                 = 0x6,
    IVD_SKIP_IPB                                = 0x7,
    IVD_SKIP_IDR                                = 0x8,
    IVD_SKIP_DEFAULT                            = IVD_SKIP_NONE,
}IVD_FRAME_SKIP_MODE_T;

/* IVD_VIDEO_DECODE_MODE_T: Set decoder to decode either frame worth of data */
/* or only header worth of data                                              */

typedef enum {
    IVD_DECODE_MODE_NA                          = 0x7FFFFFFF,

    /* This enables the codec to process all decodable units */
    IVD_DECODE_FRAME                            = 0x0,

    /* This enables the codec to decode header only */
    IVD_DECODE_HEADER                           = 0x1,



}IVD_VIDEO_DECODE_MODE_T;


/* IVD_DISPLAY_FRAME_OUT_MODE_T: Video Display Frame Output Mode             */

typedef enum {

    IVD_DISPLAY_ORDER_NA                        = 0x7FFFFFFF,
    /* To set codec to fill output buffers in display order */
    IVD_DISPLAY_FRAME_OUT                       = 0x0,

    /* To set codec to fill output buffers in decode order */
    IVD_DECODE_FRAME_OUT                        = 0x1,
}IVD_DISPLAY_FRAME_OUT_MODE_T;


/* IVD_API_COMMAND_TYPE_T:API command type                                   */
typedef enum {
    IVD_CMD_VIDEO_NA                          = 0x7FFFFFFF,
    IVD_CMD_VIDEO_CTL                         = IV_CMD_DUMMY_ELEMENT + 1,
    IVD_CMD_VIDEO_DECODE,
    IVD_CMD_GET_DISPLAY_FRAME,
    IVD_CMD_REL_DISPLAY_FRAME,
    IVD_CMD_SET_DISPLAY_FRAME
}IVD_API_COMMAND_TYPE_T;

/* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type            */

typedef enum {
    IVD_CMD_NA                          = 0x7FFFFFFF,
    IVD_CMD_CTL_GETPARAMS               = 0x0,
    IVD_CMD_CTL_SETPARAMS               = 0x1,
    IVD_CMD_CTL_RESET                   = 0x2,
    IVD_CMD_CTL_SETDEFAULT              = 0x3,
    IVD_CMD_CTL_FLUSH                   = 0x4,
    IVD_CMD_CTL_GETBUFINFO              = 0x5,
    IVD_CMD_CTL_GETVERSION              = 0x6,
    IVD_CMD_CTL_CODEC_SUBCMD_START         = 0x7
}IVD_CONTROL_API_COMMAND_TYPE_T;


/* IVD_ERROR_BITS_T: A UWORD32 container will be used for reporting the error*/
/* code to the application. The first 8 bits starting from LSB have been     */
/* reserved for the codec to report internal error details. The rest of the  */
/* bits will be generic for all video decoders and each bit has an associated*/
/* meaning as mentioned below. The unused bit fields are reserved for future */
/* extenstions and will be zero in the current implementation                */

typedef enum {
    /* Bit 8  - Applied concealment.                                         */
    IVD_APPLIEDCONCEALMENT                      = 0x8,
    /* Bit 9 - Insufficient input data.                                     */
    IVD_INSUFFICIENTDATA                        = 0x9,
    /* Bit 10 - Data problem/corruption.                                     */
    IVD_CORRUPTEDDATA                           = 0xa,
    /* Bit 11 - Header problem/corruption.                                   */
    IVD_CORRUPTEDHEADER                         = 0xb,
    /* Bit 12 - Unsupported feature/parameter in input.                      */
    IVD_UNSUPPORTEDINPUT                        = 0xc,
    /* Bit 13 - Unsupported input parameter orconfiguration.                 */
    IVD_UNSUPPORTEDPARAM                        = 0xd,
    /* Bit 14 - Fatal error (stop the codec).If there is an                  */
    /* error and this bit is not set, the error is a recoverable one.        */
    IVD_FATALERROR                              = 0xe,
    /* Bit 15 - Invalid bitstream. Applies when Bitstream/YUV frame          */
    /* buffer for encode/decode call is made with non-valid or zero u4_size  */
    /* data                                                                  */
    IVD_INVALID_BITSTREAM                       = 0xf,
    /* Bit 16          */
    IVD_INCOMPLETE_BITSTREAM                    = 0x10,
    IVD_ERROR_BITS_T_DUMMY_ELEMENT              = 0x7FFFFFFF
}IVD_ERROR_BITS_T;


/* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type            */
typedef enum {
    IVD_ERROR_NONE                              = 0x0,
    IVD_NUM_MEM_REC_FAILED                      = 0x1,
    IVD_NUM_REC_NOT_SUFFICIENT                  = 0x2,
    IVD_FILL_MEM_REC_FAILED                     = 0x3,
    IVD_REQUESTED_WIDTH_NOT_SUPPPORTED          = 0x4,
    IVD_REQUESTED_HEIGHT_NOT_SUPPPORTED         = 0x5,
    IVD_INIT_DEC_FAILED                         = 0x6,
    IVD_INIT_DEC_NOT_SUFFICIENT                 = 0x7,
    IVD_INIT_DEC_WIDTH_NOT_SUPPPORTED           = 0x8,
    IVD_INIT_DEC_HEIGHT_NOT_SUPPPORTED          = 0x9,
    IVD_INIT_DEC_MEM_NOT_ALIGNED                = 0xa,
    IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED          = 0xb,
    IVD_INIT_DEC_MEM_REC_NOT_SUFFICIENT         = 0xc,
    IVD_GET_VERSION_DATABUFFER_SZ_INSUFFICIENT  = 0xd,
    IVD_BUFFER_SIZE_SET_TO_ZERO                 = 0xe,
    IVD_UNEXPECTED_END_OF_STREAM                = 0xf,
    IVD_SEQUENCE_HEADER_NOT_DECODED             = 0x10,
    IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED       = 0x11,
    IVD_MAX_FRAME_LIMIT_REACHED                 = 0x12,
    IVD_IP_API_STRUCT_SIZE_INCORRECT            = 0x13,
    IVD_OP_API_STRUCT_SIZE_INCORRECT            = 0x14,
    IVD_HANDLE_NULL                             = 0x15,
    IVD_HANDLE_STRUCT_SIZE_INCORRECT            = 0x16,
    IVD_INVALID_HANDLE_NULL                     = 0x17,
    IVD_INVALID_API_CMD                         = 0x18,
    IVD_UNSUPPORTED_API_CMD                     = 0x19,
    IVD_MEM_REC_STRUCT_SIZE_INCORRECT           = 0x1a,
    IVD_DISP_FRM_ZERO_OP_BUFS                   = 0x1b,
    IVD_DISP_FRM_OP_BUF_NULL                    = 0x1c,
    IVD_DISP_FRM_ZERO_OP_BUF_SIZE               = 0x1d,
    IVD_DEC_FRM_BS_BUF_NULL                     = 0x1e,
    IVD_SET_CONFG_INVALID_DEC_MODE              = 0x1f,
    IVD_SET_CONFG_UNSUPPORTED_DISP_WIDTH        = 0x20,
    IVD_RESET_FAILED                            = 0x21,
    IVD_INIT_DEC_MEM_REC_OVERLAP_ERR            = 0x22,
    IVD_INIT_DEC_MEM_REC_BASE_NULL              = 0x23,
    IVD_INIT_DEC_MEM_REC_ALIGNMENT_ERR          = 0x24,
    IVD_INIT_DEC_MEM_REC_INSUFFICIENT_SIZE      = 0x25,
    IVD_INIT_DEC_MEM_REC_INCORRECT_TYPE         = 0x26,
    IVD_DEC_NUMBYTES_INV                        = 0x27,
    IVD_DEC_REF_BUF_NULL                        = 0x28,
    IVD_DEC_FRM_SKIPPED                         = 0x29,
    IVD_RES_CHANGED                             = 0x2a,
    IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS      = 0xD0,
}IVD_ERROR_CODES_T;


/*****************************************************************************/
/* Structure                                                                 */
/*****************************************************************************/
/* structure for passing output buffers to codec during get display buffer   */
/* call                                                                      */
typedef struct {

    /* number of output buffers */
    UWORD32             u4_num_bufs;

    /* list of pointers to output buffers */
    UWORD8              *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS];

    /* sizes of each output buffer */
    UWORD32             u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];

}ivd_out_bufdesc_t;

/*****************************************************************************/
/*   Initialize decoder                                                      */
/*****************************************************************************/

/* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_INIT                              */


typedef struct {
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    IVD_API_COMMAND_TYPE_T                  e_cmd;
    /* no memrecords which are allocated on request of codec through
    fill mem records */
    UWORD32                                 u4_num_mem_rec;
    /* maximum height for which codec should be initialized */
    UWORD32                                 u4_frm_max_wd;
    /* maximum width for which codec should be initialized  */
    UWORD32                                 u4_frm_max_ht;
    /* format in which codec has to give out frame data for display */
    IV_COLOR_FORMAT_T                       e_output_format;
    /* pointer to memrecord array, which contains allocated resources */
    iv_mem_rec_t                            *pv_mem_rec_location;
}ivd_init_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
}ivd_init_op_t;


/*****************************************************************************/
/*   Video Decode                                                            */
/*****************************************************************************/


/* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE                      */


typedef struct {
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    IVD_API_COMMAND_TYPE_T                  e_cmd;
    UWORD32                                 u4_ts;
    UWORD32                                 u4_num_Bytes;
    void                                    *pv_stream_buffer;

    /* output buffer desc */
    ivd_out_bufdesc_t                       s_out_buffer;

}ivd_video_decode_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
    UWORD32                                 u4_num_bytes_consumed;
    UWORD32                                 u4_pic_wd;
    UWORD32                                 u4_pic_ht;
    IV_PICTURE_CODING_TYPE_T                e_pic_type;
    UWORD32                                 u4_frame_decoded_flag;
    UWORD32                                 u4_new_seq;

    UWORD32                                 u4_output_present;
    UWORD32                                 u4_progressive_frame_flag;
    UWORD32                                 u4_is_ref_flag;
    IV_COLOR_FORMAT_T                       e_output_format;
    iv_yuv_buf_t                            s_disp_frm_buf;
    IV_FLD_TYPE_T                           e4_fld_type;
    UWORD32                                 u4_ts;
    UWORD32                                 u4_disp_buf_id;
}ivd_video_decode_op_t;


/*****************************************************************************/
/*   Get Display Frame                                                       */
/*****************************************************************************/


/* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME                 */

typedef struct
{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;

    IVD_API_COMMAND_TYPE_T                  e_cmd;

    /* output buffer desc */
    ivd_out_bufdesc_t                       s_out_buffer;

}ivd_get_display_frame_ip_t;


typedef struct
{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
    UWORD32                                 u4_progressive_frame_flag;
    IV_PICTURE_CODING_TYPE_T                e_pic_type;
    UWORD32                                 u4_is_ref_flag;
    IV_COLOR_FORMAT_T                       e_output_format;
    iv_yuv_buf_t                            s_disp_frm_buf;
    IV_FLD_TYPE_T                           e4_fld_type;
    UWORD32                                 u4_ts;
    UWORD32                                 u4_disp_buf_id;
}ivd_get_display_frame_op_t;

/*****************************************************************************/
/*   Set Display Frame                                                       */
/*****************************************************************************/


/* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */

typedef struct
{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;

    IVD_API_COMMAND_TYPE_T                  e_cmd;

    UWORD32                                 num_disp_bufs;

    /* output buffer desc */
    ivd_out_bufdesc_t                       s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS];

}ivd_set_display_frame_ip_t;


typedef struct
{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
}ivd_set_display_frame_op_t;


/*****************************************************************************/
/*   Release Display Frame                                                       */
/*****************************************************************************/


/* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */

typedef struct
{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    IVD_API_COMMAND_TYPE_T                  e_cmd;
    UWORD32                                 u4_disp_buf_id;
}ivd_rel_display_frame_ip_t;


typedef struct
{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
}ivd_rel_display_frame_op_t;

/*****************************************************************************/
/*   Video control  Flush                                                    */
/*****************************************************************************/
/* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_FLUSH          */



typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    IVD_API_COMMAND_TYPE_T                  e_cmd;
    IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
}ivd_ctl_flush_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
}ivd_ctl_flush_op_t;

/*****************************************************************************/
/*   Video control reset                                                     */
/*****************************************************************************/
/* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_RESET          */


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    IVD_API_COMMAND_TYPE_T                  e_cmd;
    IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
}ivd_ctl_reset_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                 u4_size;
    UWORD32                                 u4_error_code;
}ivd_ctl_reset_op_t;


/*****************************************************************************/
/*   Video control  Set Params                                               */
/*****************************************************************************/
/* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS           */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT          */



typedef struct {
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    IVD_API_COMMAND_TYPE_T                      e_cmd;
    IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    IVD_VIDEO_DECODE_MODE_T                     e_vid_dec_mode;
    UWORD32                                     u4_disp_wd;
    IVD_FRAME_SKIP_MODE_T                       e_frm_skip_mode;
    IVD_DISPLAY_FRAME_OUT_MODE_T                e_frm_out_mode;
}ivd_ctl_set_config_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    UWORD32                                     u4_error_code;
}ivd_ctl_set_config_op_t;

/*****************************************************************************/
/*   Video control:Get Buf Info                                              */
/*****************************************************************************/

/* IVD_API_COMMAND_TYPE_T::e_cmd         = IVD_CMD_VIDEO_CTL                 */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO          */


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    IVD_API_COMMAND_TYPE_T                      e_cmd;
    IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
}ivd_ctl_getbufinfo_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    UWORD32                                     u4_error_code;
    /* no of display buffer sets required by codec */
    UWORD32                                     u4_num_disp_bufs;
    /* no of input buffers required for codec */
    UWORD32                                     u4_min_num_in_bufs;
    /* no of output buffers required for codec */
    UWORD32                                     u4_min_num_out_bufs;
    /* sizes of each input buffer required */
    UWORD32                                     u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    /* sizes of each output buffer required */
    UWORD32                                     u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
}ivd_ctl_getbufinfo_op_t;


/*****************************************************************************/
/*   Video control:Getstatus Call                                            */
/*****************************************************************************/


/* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS           */


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    IVD_API_COMMAND_TYPE_T                      e_cmd;
    IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
}ivd_ctl_getstatus_ip_t;


typedef struct{
    UWORD32                  u4_size;
    UWORD32                  u4_error_code;
    /* no of display buffer sets required by codec */
    UWORD32                  u4_num_disp_bufs;
    UWORD32                  u4_pic_ht;
    UWORD32                  u4_pic_wd;
    UWORD32                  u4_frame_rate;
    UWORD32                  u4_bit_rate;
    IV_CONTENT_TYPE_T        e_content_type;
    IV_COLOR_FORMAT_T        e_output_chroma_format;
    /* no of input buffers required for codec */
    UWORD32                  u4_min_num_in_bufs;
    /* no of output buffers required for codec */
    UWORD32                  u4_min_num_out_bufs;
    /* sizes of each input buffer required */
    UWORD32                  u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
    /* sizes of each output buffer required */
    UWORD32                  u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
}ivd_ctl_getstatus_op_t;


/*****************************************************************************/
/*   Video control:Get Version Info                                          */
/*****************************************************************************/

/* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
/* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION          */


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    IVD_API_COMMAND_TYPE_T                      e_cmd;
    IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
    void                                        *pv_version_buffer;
    UWORD32                                     u4_version_buffer_size;
}ivd_ctl_getversioninfo_ip_t;


typedef struct{
    /* u4_size of the structure                                         */
    UWORD32                                     u4_size;
    UWORD32                                     u4_error_code;
}ivd_ctl_getversioninfo_op_t;

#endif /* __IVD_H__ */