• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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                               */
53 typedef 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                               */
74 typedef 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 
83 typedef 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 
99 typedef 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 
115 typedef 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                                   */
127 typedef enum {
128     IVD_CMD_VIDEO_NA                          = 0x7FFFFFFF,
129     IVD_CMD_CREATE                            = IV_CMD_DUMMY_ELEMENT + 1,
130     IVD_CMD_DELETE,
131     IVD_CMD_VIDEO_CTL,
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_MEM_ALLOC_FAILED                        = 0x2b,
232     IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS      = 0xD0,
233 }IVD_ERROR_CODES_T;
234 
235 
236 /*****************************************************************************/
237 /* Structure                                                                 */
238 /*****************************************************************************/
239 /* structure for passing output buffers to codec during get display buffer   */
240 /* call                                                                      */
241 typedef struct {
242 
243     /**
244      * number of output buffers
245      */
246     UWORD32             u4_num_bufs;
247 
248     /**
249      *list of pointers to output buffers
250      */
251     UWORD8              *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS];
252 
253     /**
254      * sizes of each output buffer
255      */
256     UWORD32             u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
257 
258 }ivd_out_bufdesc_t;
259 
260 /*****************************************************************************/
261 /*   Create decoder                                                          */
262 /*****************************************************************************/
263 
264 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_CREATE                            */
265 
266 
267 typedef struct {
268     /**
269      * u4_size of the structure
270      */
271     UWORD32                                 u4_size;
272 
273     /**
274      *  e_cmd
275      */
276     IVD_API_COMMAND_TYPE_T                  e_cmd;
277 
278     /**
279      * format in which codec has to give out frame data for display
280      */
281     IV_COLOR_FORMAT_T                       e_output_format;
282 
283     /**
284      * Flag to indicate shared display buffer mode
285      */
286     UWORD32                                 u4_share_disp_buf;
287 
288     /**
289      * Pointer to a function for aligned allocation.
290      */
291     void    *(*pf_aligned_alloc)(void *pv_mem_ctxt, WORD32 alignment, WORD32 size);
292 
293     /**
294      * Pointer to a function for aligned free.
295      */
296     void   (*pf_aligned_free)(void *pv_mem_ctxt, void *pv_buf);
297 
298     /**
299      * Pointer to memory context that is needed during alloc/free for custom
300      * memory managers. This will be passed as first argument to pf_aligned_alloc and
301      * pf_aligned_free.
302      * If application is using standard memory functions like
303      * malloc/aligned_malloc/memalign/free/aligned_free,
304      * then this is not needed and can be set to NULL
305      */
306     void    *pv_mem_ctxt;
307 
308 }ivd_create_ip_t;
309 
310 
311 typedef struct {
312     /**
313      * u4_size of the structure
314      */
315     UWORD32                                 u4_size;
316 
317     /**
318      * u4_error_code
319      */
320     UWORD32                                 u4_error_code;
321 
322     /**
323      * Codec Handle
324      */
325     void                                    *pv_handle;
326 
327 }ivd_create_op_t;
328 
329 
330 /*****************************************************************************/
331 /*  Delete decoder                                                           */
332 /*****************************************************************************/
333 
334 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_DELETE                              */
335 
336 
337 
338 typedef struct {
339     /**
340      * u4_size of the structure
341      */
342     UWORD32                                     u4_size;
343 
344     /**
345      * cmd
346      */
347     IVD_API_COMMAND_TYPE_T                       e_cmd;
348 
349 }ivd_delete_ip_t;
350 
351 
352 typedef struct {
353     /**
354      * u4_size of the structure
355      */
356     UWORD32                                     u4_size;
357 
358     /**
359      * error_code
360      */
361     UWORD32                                     u4_error_code;
362 
363 }ivd_delete_op_t;
364 
365 /*****************************************************************************/
366 /*   Video Decode                                                            */
367 /*****************************************************************************/
368 
369 
370 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE                      */
371 
372 
373 typedef struct {
374     /**
375      * u4_size of the structure
376      */
377     UWORD32                                 u4_size;
378 
379     /**
380      * e_cmd
381      */
382     IVD_API_COMMAND_TYPE_T                  e_cmd;
383 
384     /**
385      * u4_ts
386      */
387     UWORD32                                 u4_ts;
388 
389     /**
390      * u4_num_Bytes
391      */
392     UWORD32                                 u4_num_Bytes;
393 
394     /**
395      * pv_stream_buffer
396      */
397     void                                    *pv_stream_buffer;
398 
399     /**
400      * output buffer desc
401      */
402     ivd_out_bufdesc_t                       s_out_buffer;
403 
404 }ivd_video_decode_ip_t;
405 
406 
407 typedef struct {
408     /**
409      * u4_size of the structure
410      */
411     UWORD32                                 u4_size;
412 
413     /**
414      * u4_error_code
415      */
416     UWORD32                                 u4_error_code;
417 
418     /**
419      * num_bytes_consumed
420      */
421     UWORD32                                 u4_num_bytes_consumed;
422 
423     /**
424      * pic_wd
425      */
426     UWORD32                                 u4_pic_wd;
427 
428     /**
429      * pic_ht
430      */
431     UWORD32                                 u4_pic_ht;
432 
433     /**
434      * pic_type
435      */
436     IV_PICTURE_CODING_TYPE_T                e_pic_type;
437 
438     /**
439      * frame_decoded_flag
440      */
441     UWORD32                                 u4_frame_decoded_flag;
442 
443     /**
444      * new_seq
445      */
446     UWORD32                                 u4_new_seq;
447 
448     /**
449      * output_present
450      */
451     UWORD32                                 u4_output_present;
452 
453     /**
454      * progressive_frame_flag
455      */
456     UWORD32                                 u4_progressive_frame_flag;
457 
458     /**
459      * is_ref_flag
460      */
461     UWORD32                                 u4_is_ref_flag;
462 
463     /**
464      * output_format
465      */
466     IV_COLOR_FORMAT_T                       e_output_format;
467 
468     /**
469      * disp_frm_buf
470      */
471     iv_yuv_buf_t                            s_disp_frm_buf;
472 
473     /**
474      * fld_type
475      */
476     IV_FLD_TYPE_T                           e4_fld_type;
477 
478     /**
479      * ts
480      */
481     UWORD32                                 u4_ts;
482 
483     /**
484      * disp_buf_id
485      */
486     UWORD32                                 u4_disp_buf_id;
487 
488     /**
489      * reorder_depth
490      */
491     WORD32                                  i4_reorder_depth;
492 
493     /**
494      * display index
495      */
496     WORD32                                  i4_display_index;
497 
498 }ivd_video_decode_op_t;
499 
500 
501 /*****************************************************************************/
502 /*   Get Display Frame                                                       */
503 /*****************************************************************************/
504 
505 
506 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME                 */
507 
508 typedef struct
509 {
510     /**
511      * u4_size of the structure
512      */
513     UWORD32                                 u4_size;
514 
515     /**
516      * e_cmd
517      */
518     IVD_API_COMMAND_TYPE_T                  e_cmd;
519 
520     /**
521      * output buffer desc
522      */
523     ivd_out_bufdesc_t                       s_out_buffer;
524 
525 }ivd_get_display_frame_ip_t;
526 
527 
528 typedef struct
529 {
530     /**
531      * u4_size of the structure
532      */
533     UWORD32                                 u4_size;
534 
535     /**
536      * error_code
537      */
538     UWORD32                                 u4_error_code;
539 
540     /**
541      * progressive_frame_flag
542      */
543     UWORD32                                 u4_progressive_frame_flag;
544 
545     /**
546      * pic_type
547      */
548     IV_PICTURE_CODING_TYPE_T                e_pic_type;
549 
550     /**
551      * is_ref_flag
552      */
553     UWORD32                                 u4_is_ref_flag;
554 
555     /**
556      * output_format
557      */
558     IV_COLOR_FORMAT_T                       e_output_format;
559 
560     /**
561      * disp_frm_buf
562      */
563     iv_yuv_buf_t                            s_disp_frm_buf;
564 
565     /**
566      * fld_type
567      */
568     IV_FLD_TYPE_T                           e4_fld_type;
569 
570     /**
571      * ts
572      */
573     UWORD32                                 u4_ts;
574 
575     /**
576      * disp_buf_id
577      */
578     UWORD32                                 u4_disp_buf_id;
579 }ivd_get_display_frame_op_t;
580 
581 /*****************************************************************************/
582 /*   Set Display Frame                                                       */
583 /*****************************************************************************/
584 
585 
586 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
587 
588 typedef struct
589 {
590     /**
591      * u4_size of the structure
592      */
593     UWORD32                                 u4_size;
594 
595     /**
596      * cmd
597      */
598     IVD_API_COMMAND_TYPE_T                  e_cmd;
599 
600     /**
601      * num_disp_bufs
602      */
603     UWORD32                                 num_disp_bufs;
604 
605     /**
606      * output buffer desc
607      */
608     ivd_out_bufdesc_t                       s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS];
609 
610 }ivd_set_display_frame_ip_t;
611 
612 
613 typedef struct
614 {
615     /**
616      * u4_size of the structure
617      */
618     UWORD32                                 u4_size;
619 
620     /**
621      * error code
622      */
623     UWORD32                                 u4_error_code;
624 }ivd_set_display_frame_op_t;
625 
626 
627 /*****************************************************************************/
628 /*   Release Display Frame                                                       */
629 /*****************************************************************************/
630 
631 
632 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
633 
634 typedef struct
635 {
636     /**
637      * u4_size of the structure
638      */
639     UWORD32                                 u4_size;
640 
641     /**
642      * e_cmd
643      */
644     IVD_API_COMMAND_TYPE_T                  e_cmd;
645 
646     /**
647      * disp_buf_id
648      */
649     UWORD32                                 u4_disp_buf_id;
650 }ivd_rel_display_frame_ip_t;
651 
652 
653 typedef struct
654 {
655     /**
656      * u4_size of the structure
657      */
658     UWORD32                                 u4_size;
659 
660     /**
661      * error code
662      */
663     UWORD32                                 u4_error_code;
664 }ivd_rel_display_frame_op_t;
665 
666 /*****************************************************************************/
667 /*   Video control  Flush                                                    */
668 /*****************************************************************************/
669 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
670 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_FLUSH          */
671 
672 
673 
674 typedef struct {
675     /**
676      * u4_size of the structure
677      */
678     UWORD32                                 u4_size;
679 
680     /**
681      * cmd
682      */
683     IVD_API_COMMAND_TYPE_T                  e_cmd;
684 
685     /**
686      * sub_cmd
687      */
688     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
689 }ivd_ctl_flush_ip_t;
690 
691 
692 typedef struct {
693     /**
694      * u4_size of the structure
695      */
696     UWORD32                                 u4_size;
697 
698     /**
699      * error code
700      */
701     UWORD32                                 u4_error_code;
702 }ivd_ctl_flush_op_t;
703 
704 /*****************************************************************************/
705 /*   Video control reset                                                     */
706 /*****************************************************************************/
707 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
708 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_RESET          */
709 
710 
711 typedef struct {
712     /**
713      * u4_size of the structure
714      */
715     UWORD32                                 u4_size;
716 
717     /**
718      * cmd
719      */
720     IVD_API_COMMAND_TYPE_T                  e_cmd;
721 
722     /**
723      * sub_cmd
724      */
725 
726     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
727 }ivd_ctl_reset_ip_t;
728 
729 
730 typedef struct {
731     /**
732      * u4_size of the structure
733      */
734     UWORD32                                 u4_size;
735 
736     /**
737      * error code
738      */
739     UWORD32                                 u4_error_code;
740 }ivd_ctl_reset_op_t;
741 
742 
743 /*****************************************************************************/
744 /*   Video control  Set Params                                               */
745 /*****************************************************************************/
746 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
747 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS           */
748 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT          */
749 
750 
751 
752 typedef struct {
753     /**
754      * u4_size of the structure
755      */
756     UWORD32                                     u4_size;
757 
758     /**
759      * cmd
760      */
761     IVD_API_COMMAND_TYPE_T                      e_cmd;
762 
763     /**
764      * sub_cmd
765      */
766     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
767 
768     /**
769      * vid_dec_mode
770      */
771     IVD_VIDEO_DECODE_MODE_T                     e_vid_dec_mode;
772 
773     /**
774      * disp_wd
775      */
776     UWORD32                                     u4_disp_wd;
777 
778     /**
779      * frm_skip_mode
780      */
781     IVD_FRAME_SKIP_MODE_T                       e_frm_skip_mode;
782 
783     /**
784      * frm_out_mode
785      */
786     IVD_DISPLAY_FRAME_OUT_MODE_T                e_frm_out_mode;
787 }ivd_ctl_set_config_ip_t;
788 
789 
790 typedef struct {
791     /**
792      * u4_size of the structure
793      */
794     UWORD32                                     u4_size;
795 
796     /**
797      * u4_error_code
798      */
799     UWORD32                                     u4_error_code;
800 }ivd_ctl_set_config_op_t;
801 
802 /*****************************************************************************/
803 /*   Video control:Get Buf Info                                              */
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_GETBUFINFO          */
808 
809 
810 typedef struct {
811     /**
812      * u4_size of the structure
813      */
814     UWORD32                                     u4_size;
815 
816     /**
817      *  e_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_getbufinfo_ip_t;
826 
827 
828 typedef struct {
829     /**
830      * u4_size of the structure
831      */
832     UWORD32                                     u4_size;
833 
834     /**
835      * error code
836      */
837     UWORD32                                     u4_error_code;
838 
839     /**
840      * no of display buffer sets required by codec
841      */
842     UWORD32                                     u4_num_disp_bufs;
843 
844     /**
845      * no of input buffers required for codec
846      */
847     UWORD32                                     u4_min_num_in_bufs;
848 
849     /**
850      * no of output buffers required for codec
851      */
852     UWORD32                                     u4_min_num_out_bufs;
853 
854     /**
855      * sizes of each input buffer required
856      */
857     UWORD32                                     u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
858 
859     /**
860      * sizes of each output buffer required
861      */
862     UWORD32                                     u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
863 }ivd_ctl_getbufinfo_op_t;
864 
865 
866 /*****************************************************************************/
867 /*   Video control:Getstatus Call                                            */
868 /*****************************************************************************/
869 
870 
871 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
872 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS           */
873 
874 
875 typedef struct {
876     /**
877      * u4_size of the structure
878      */
879     UWORD32                                     u4_size;
880 
881     /**
882      * cmd
883      */
884     IVD_API_COMMAND_TYPE_T                      e_cmd;
885 
886     /**
887      * sub_cmd
888      */
889     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
890 }ivd_ctl_getstatus_ip_t;
891 
892 
893 typedef struct {
894 
895     /**
896      * u4_size of the structure
897      */
898     UWORD32                  u4_size;
899 
900     /**
901       * error code
902       */
903     UWORD32                  u4_error_code;
904 
905     /**
906      * no of display buffer sets required by codec
907      */
908     UWORD32                  u4_num_disp_bufs;
909 
910     /**
911      * u4_pic_ht
912      */
913     UWORD32                  u4_pic_ht;
914 
915     /**
916      * u4_pic_wd
917      */
918     UWORD32                  u4_pic_wd;
919 
920     /**
921      * frame_rate
922      */
923     UWORD32                  u4_frame_rate;
924 
925     /**
926      * u4_bit_rate
927      */
928     UWORD32                  u4_bit_rate;
929 
930     /**
931      * content_type
932      */
933     IV_CONTENT_TYPE_T        e_content_type;
934 
935     /**
936      * output_chroma_format
937      */
938     IV_COLOR_FORMAT_T        e_output_chroma_format;
939 
940     /**
941      * no of input buffers required for codec
942      */
943     UWORD32                  u4_min_num_in_bufs;
944 
945     /**
946      * no of output buffers required for codec
947      */
948     UWORD32                  u4_min_num_out_bufs;
949 
950     /**
951      * sizes of each input buffer required
952      */
953     UWORD32                  u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
954 
955     /**
956      * sizes of each output buffer required
957      */
958     UWORD32                  u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
959 }ivd_ctl_getstatus_op_t;
960 
961 
962 /*****************************************************************************/
963 /*   Video control:Get Version Info                                          */
964 /*****************************************************************************/
965 
966 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
967 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION          */
968 
969 
970 typedef struct {
971     /**
972      * u4_size of the structure
973      */
974     UWORD32                                     u4_size;
975 
976     /**
977      * cmd
978      */
979     IVD_API_COMMAND_TYPE_T                      e_cmd;
980 
981     /**
982      * sub_cmd
983      */
984     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
985 
986     /**
987      * pv_version_buffer
988      */
989     void                                        *pv_version_buffer;
990 
991     /**
992      * version_buffer_size
993      */
994     UWORD32                                     u4_version_buffer_size;
995 }ivd_ctl_getversioninfo_ip_t;
996 
997 
998 typedef struct {
999     /**
1000      * u4_size of the structure
1001      */
1002     UWORD32                                     u4_size;
1003 
1004     /**
1005      * error code
1006      */
1007     UWORD32                                     u4_error_code;
1008 }ivd_ctl_getversioninfo_op_t;
1009 
1010 #endif /* __IVD_H__ */
1011 
1012