xref: /aosp_15_r20/external/libavc/decoder/ivd.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
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 /** SEI macros */
48 /*
49  * @brief  specifies the number of colour primary components of the mastering display
50  */
51 #define NUM_SEI_MDCV_PRIMARIES        3
52 
53 /*
54  * @brief  specifies the number of colour primary components of the nominal content colour volume
55  */
56 #define NUM_SEI_CCV_PRIMARIES         3
57 
58 /*
59  * @brief  specifies maximum number of sub-layers available in the sequence
60  */
61 #define SII_MAX_SUB_LAYERS 8
62 
63 #define SEI_FGC_NUM_COLOUR_COMPONENTS 3
64 #define SEI_FGC_MAX_NUM_MODEL_VALUES 6
65 #define SEI_FGC_MAX_NUM_INTENSITY_INTERVALS 256
66 
67 /*****************************************************************************/
68 /* Typedefs                                                                  */
69 /*****************************************************************************/
70 
71 /*****************************************************************************/
72 /* Enums                                                                     */
73 /*****************************************************************************/
74 
75 /* IVD_ARCH_T: Architecture Enumeration                               */
76 typedef enum
77 {
78     ARCH_NA                 =   0x7FFFFFFF,
79     ARCH_ARM_NONEON         =   0x0,
80     ARCH_ARM_A9Q,
81     ARCH_ARM_A9A,
82     ARCH_ARM_A9,
83     ARCH_ARM_A7,
84     ARCH_ARM_A5,
85     ARCH_ARM_A15,
86     ARCH_ARM_NEONINTR,
87     ARCH_ARMV8_GENERIC,
88     ARCH_X86_GENERIC        =   0x100,
89     ARCH_X86_SSSE3,
90     ARCH_X86_SSE42,
91     ARCH_X86_AVX2,
92     ARCH_MIPS_GENERIC       =   0x200,
93     ARCH_MIPS_32
94 }IVD_ARCH_T;
95 
96 /* IVD_SOC_T: SOC Enumeration                               */
97 typedef enum
98 {
99     SOC_NA                  = 0x7FFFFFFF,
100     SOC_GENERIC             = 0x0,
101     SOC_HISI_37X            = 0x100,
102 }IVD_SOC_T;
103 
104 /* IVD_FRAME_SKIP_MODE_T:Skip mode Enumeration                               */
105 
106 typedef enum {
107     IVD_SKIP_NONE                               = 0x7FFFFFFF,
108     IVD_SKIP_P                                  = 0x1,
109     IVD_SKIP_B                                  = 0x2,
110     IVD_SKIP_I                                  = 0x3,
111     IVD_SKIP_IP                                 = 0x4,
112     IVD_SKIP_IB                                 = 0x5,
113     IVD_SKIP_PB                                 = 0x6,
114     IVD_SKIP_IPB                                = 0x7,
115     IVD_SKIP_IDR                                = 0x8,
116     IVD_SKIP_DEFAULT                            = IVD_SKIP_NONE,
117 }IVD_FRAME_SKIP_MODE_T;
118 
119 /* IVD_VIDEO_DECODE_MODE_T: Set decoder to decode either frame worth of data */
120 /* or only header worth of data                                              */
121 
122 typedef enum {
123     IVD_DECODE_MODE_NA                          = 0x7FFFFFFF,
124 
125     /* This enables the codec to process all decodable units */
126     IVD_DECODE_FRAME                            = 0x0,
127 
128     /* This enables the codec to decode header only */
129     IVD_DECODE_HEADER                           = 0x1,
130 
131 
132 
133 }IVD_VIDEO_DECODE_MODE_T;
134 
135 
136 /* IVD_DISPLAY_FRAME_OUT_MODE_T: Video Display Frame Output Mode             */
137 
138 typedef enum {
139 
140     IVD_DISPLAY_ORDER_NA                        = 0x7FFFFFFF,
141     /* To set codec to fill output buffers in display order */
142     IVD_DISPLAY_FRAME_OUT                       = 0x0,
143 
144     /* To set codec to fill output buffers in decode order */
145     IVD_DECODE_FRAME_OUT                        = 0x1,
146 }IVD_DISPLAY_FRAME_OUT_MODE_T;
147 
148 
149 /* IVD_API_COMMAND_TYPE_T:API command type                                   */
150 typedef enum {
151     IVD_CMD_VIDEO_NA                          = 0x7FFFFFFF,
152     IVD_CMD_CREATE                            = IV_CMD_DUMMY_ELEMENT + 1,
153     IVD_CMD_DELETE,
154     IVD_CMD_VIDEO_CTL,
155     IVD_CMD_VIDEO_DECODE,
156     IVD_CMD_GET_DISPLAY_FRAME,
157     IVD_CMD_REL_DISPLAY_FRAME,
158     IVD_CMD_SET_DISPLAY_FRAME
159 }IVD_API_COMMAND_TYPE_T;
160 
161 /* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type            */
162 
163 typedef enum {
164     IVD_CMD_NA                          = 0x7FFFFFFF,
165     IVD_CMD_CTL_GETPARAMS               = 0x0,
166     IVD_CMD_CTL_SETPARAMS               = 0x1,
167     IVD_CMD_CTL_RESET                   = 0x2,
168     IVD_CMD_CTL_SETDEFAULT              = 0x3,
169     IVD_CMD_CTL_FLUSH                   = 0x4,
170     IVD_CMD_CTL_GETBUFINFO              = 0x5,
171     IVD_CMD_CTL_GETVERSION              = 0x6,
172     IVD_CMD_CTL_CODEC_SUBCMD_START         = 0x7
173 }IVD_CONTROL_API_COMMAND_TYPE_T;
174 
175 
176 /* IVD_ERROR_BITS_T: A UWORD32 container will be used for reporting the error*/
177 /* code to the application. The first 8 bits starting from LSB have been     */
178 /* reserved for the codec to report internal error details. The rest of the  */
179 /* bits will be generic for all video decoders and each bit has an associated*/
180 /* meaning as mentioned below. The unused bit fields are reserved for future */
181 /* extenstions and will be zero in the current implementation                */
182 
183 typedef enum {
184     /* Bit 8  - Applied concealment.                                         */
185     IVD_APPLIEDCONCEALMENT                      = 0x8,
186     /* Bit 9 - Insufficient input data.                                     */
187     IVD_INSUFFICIENTDATA                        = 0x9,
188     /* Bit 10 - Data problem/corruption.                                     */
189     IVD_CORRUPTEDDATA                           = 0xa,
190     /* Bit 11 - Header problem/corruption.                                   */
191     IVD_CORRUPTEDHEADER                         = 0xb,
192     /* Bit 12 - Unsupported feature/parameter in input.                      */
193     IVD_UNSUPPORTEDINPUT                        = 0xc,
194     /* Bit 13 - Unsupported input parameter orconfiguration.                 */
195     IVD_UNSUPPORTEDPARAM                        = 0xd,
196     /* Bit 14 - Fatal error (stop the codec).If there is an                  */
197     /* error and this bit is not set, the error is a recoverable one.        */
198     IVD_FATALERROR                              = 0xe,
199     /* Bit 15 - Invalid bitstream. Applies when Bitstream/YUV frame          */
200     /* buffer for encode/decode call is made with non-valid or zero u4_size  */
201     /* data                                                                  */
202     IVD_INVALID_BITSTREAM                       = 0xf,
203     /* Bit 16          */
204     IVD_INCOMPLETE_BITSTREAM                    = 0x10,
205     IVD_ERROR_BITS_T_DUMMY_ELEMENT              = 0x7FFFFFFF
206 }IVD_ERROR_BITS_T;
207 
208 
209 /* IVD_CONTROL_API_COMMAND_TYPE_T: Video Control API command type            */
210 typedef enum {
211     IVD_ERROR_NONE                              = 0x0,
212     IVD_NUM_MEM_REC_FAILED                      = 0x1,
213     IVD_NUM_REC_NOT_SUFFICIENT                  = 0x2,
214     IVD_FILL_MEM_REC_FAILED                     = 0x3,
215     IVD_REQUESTED_WIDTH_NOT_SUPPPORTED          = 0x4,
216     IVD_REQUESTED_HEIGHT_NOT_SUPPPORTED         = 0x5,
217     IVD_INIT_DEC_FAILED                         = 0x6,
218     IVD_INIT_DEC_NOT_SUFFICIENT                 = 0x7,
219     IVD_INIT_DEC_WIDTH_NOT_SUPPPORTED           = 0x8,
220     IVD_INIT_DEC_HEIGHT_NOT_SUPPPORTED          = 0x9,
221     IVD_INIT_DEC_MEM_NOT_ALIGNED                = 0xa,
222     IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED          = 0xb,
223     IVD_INIT_DEC_MEM_REC_NOT_SUFFICIENT         = 0xc,
224     IVD_GET_VERSION_DATABUFFER_SZ_INSUFFICIENT  = 0xd,
225     IVD_BUFFER_SIZE_SET_TO_ZERO                 = 0xe,
226     IVD_UNEXPECTED_END_OF_STREAM                = 0xf,
227     IVD_SEQUENCE_HEADER_NOT_DECODED             = 0x10,
228     IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED       = 0x11,
229     IVD_MAX_FRAME_LIMIT_REACHED                 = 0x12,
230     IVD_IP_API_STRUCT_SIZE_INCORRECT            = 0x13,
231     IVD_OP_API_STRUCT_SIZE_INCORRECT            = 0x14,
232     IVD_HANDLE_NULL                             = 0x15,
233     IVD_HANDLE_STRUCT_SIZE_INCORRECT            = 0x16,
234     IVD_INVALID_HANDLE_NULL                     = 0x17,
235     IVD_INVALID_API_CMD                         = 0x18,
236     IVD_UNSUPPORTED_API_CMD                     = 0x19,
237     IVD_MEM_REC_STRUCT_SIZE_INCORRECT           = 0x1a,
238     IVD_DISP_FRM_ZERO_OP_BUFS                   = 0x1b,
239     IVD_DISP_FRM_OP_BUF_NULL                    = 0x1c,
240     IVD_DISP_FRM_ZERO_OP_BUF_SIZE               = 0x1d,
241     IVD_DEC_FRM_BS_BUF_NULL                     = 0x1e,
242     IVD_SET_CONFG_INVALID_DEC_MODE              = 0x1f,
243     IVD_SET_CONFG_UNSUPPORTED_DISP_WIDTH        = 0x20,
244     IVD_RESET_FAILED                            = 0x21,
245     IVD_INIT_DEC_MEM_REC_OVERLAP_ERR            = 0x22,
246     IVD_INIT_DEC_MEM_REC_BASE_NULL              = 0x23,
247     IVD_INIT_DEC_MEM_REC_ALIGNMENT_ERR          = 0x24,
248     IVD_INIT_DEC_MEM_REC_INSUFFICIENT_SIZE      = 0x25,
249     IVD_INIT_DEC_MEM_REC_INCORRECT_TYPE         = 0x26,
250     IVD_DEC_NUMBYTES_INV                        = 0x27,
251     IVD_DEC_REF_BUF_NULL                        = 0x28,
252     IVD_DEC_FRM_SKIPPED                         = 0x29,
253     IVD_RES_CHANGED                             = 0x2a,
254     IVD_MEM_ALLOC_FAILED                        = 0x2b,
255     IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS      = 0xD0,
256 }IVD_ERROR_CODES_T;
257 
258 
259 /*****************************************************************************/
260 /* Structure                                                                 */
261 /*****************************************************************************/
262 /* structure for passing output buffers to codec during get display buffer   */
263 /* call                                                                      */
264 typedef struct {
265 
266     /**
267      * number of output buffers
268      */
269     UWORD32             u4_num_bufs;
270 
271     /**
272      *list of pointers to output buffers
273      */
274     UWORD8              *pu1_bufs[IVD_VIDDEC_MAX_IO_BUFFERS];
275 
276     /**
277      * sizes of each output buffer
278      */
279     UWORD32             u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
280 
281 }ivd_out_bufdesc_t;
282 
283 /*****************************************************************************/
284 /*   Create decoder                                                          */
285 /*****************************************************************************/
286 
287 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_CREATE                            */
288 
289 
290 typedef struct {
291     /**
292      * u4_size of the structure
293      */
294     UWORD32                                 u4_size;
295 
296     /**
297      *  e_cmd
298      */
299     IVD_API_COMMAND_TYPE_T                  e_cmd;
300 
301     /**
302      * format in which codec has to give out frame data for display
303      */
304     IV_COLOR_FORMAT_T                       e_output_format;
305 
306     /**
307      * Flag to indicate shared display buffer mode
308      */
309     UWORD32                                 u4_share_disp_buf;
310 
311     /**
312      * Pointer to a function for aligned allocation.
313      */
314     void    *(*pf_aligned_alloc)(void *pv_mem_ctxt, WORD32 alignment, WORD32 size);
315 
316     /**
317      * Pointer to a function for aligned free.
318      */
319     void   (*pf_aligned_free)(void *pv_mem_ctxt, void *pv_buf);
320 
321     /**
322      * Pointer to memory context that is needed during alloc/free for custom
323      * memory managers. This will be passed as first argument to pf_aligned_alloc and
324      * pf_aligned_free.
325      * If application is using standard memory functions like
326      * malloc/aligned_malloc/memalign/free/aligned_free,
327      * then this is not needed and can be set to NULL
328      */
329     void    *pv_mem_ctxt;
330 
331 }ivd_create_ip_t;
332 
333 
334 typedef struct{
335     /**
336      * u4_size of the structure
337      */
338     UWORD32                                 u4_size;
339 
340     /**
341      * u4_error_code
342      */
343     UWORD32                                 u4_error_code;
344 
345     /**
346      * Codec Handle
347      */
348     void                                    *pv_handle;
349 
350 }ivd_create_op_t;
351 
352 
353 /*****************************************************************************/
354 /*  Delete decoder                                                           */
355 /*****************************************************************************/
356 
357 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_DELETE                              */
358 
359 
360 
361 typedef struct {
362     /**
363      * u4_size of the structure
364      */
365     UWORD32                                     u4_size;
366 
367     /**
368      * cmd
369      */
370     IVD_API_COMMAND_TYPE_T                       e_cmd;
371 
372 }ivd_delete_ip_t;
373 
374 
375 typedef struct{
376     /**
377      * u4_size of the structure
378      */
379     UWORD32                                     u4_size;
380 
381     /**
382      * error_code
383      */
384     UWORD32                                     u4_error_code;
385 
386 }ivd_delete_op_t;
387 
388 /*****************************************************************************/
389 /*   Video Decode                                                            */
390 /*****************************************************************************/
391 
392 /* SEI params deocde */
393 typedef struct {
394     UWORD8                                         u1_sei_mdcv_params_present_flag;
395 
396     UWORD8                                         u1_sei_cll_params_present_flag;
397 
398     UWORD8                                         u1_sei_ave_params_present_flag;
399 
400     UWORD8                                         u1_sei_ccv_params_present_flag;
401 
402     UWORD8                                         u1_sei_sii_params_present_flag;
403 
404     UWORD8                                         u1_sei_fgc_params_present_flag;
405 
406 }ivd_sei_decode_op_t;
407 
408 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_VIDEO_DECODE                      */
409 
410 
411 typedef struct {
412     /**
413      * u4_size of the structure
414      */
415     UWORD32                                 u4_size;
416 
417     /**
418      * e_cmd
419      */
420     IVD_API_COMMAND_TYPE_T                  e_cmd;
421 
422     /**
423      * u4_ts
424      */
425     UWORD32                                 u4_ts;
426 
427     /**
428      * u4_num_Bytes
429      */
430     UWORD32                                 u4_num_Bytes;
431 
432     /**
433      * pv_stream_buffer
434      */
435     void                                    *pv_stream_buffer;
436 
437     /**
438      * output buffer desc
439      */
440     ivd_out_bufdesc_t                       s_out_buffer;
441 
442 }ivd_video_decode_ip_t;
443 
444 
445 typedef struct{
446     /**
447      * u4_size of the structure
448      */
449     UWORD32                                 u4_size;
450 
451     /**
452      * u4_error_code
453      */
454     UWORD32                                 u4_error_code;
455 
456     /**
457      * num_bytes_consumed
458      */
459     UWORD32                                 u4_num_bytes_consumed;
460 
461     /**
462      * pic_wd
463      */
464     UWORD32                                 u4_pic_wd;
465 
466     /**
467      * pic_ht
468      */
469     UWORD32                                 u4_pic_ht;
470 
471     /**
472      * pic_type
473      */
474     IV_PICTURE_CODING_TYPE_T                e_pic_type;
475 
476     /**
477      * frame_decoded_flag
478      */
479     UWORD32                                 u4_frame_decoded_flag;
480 
481     /**
482      * new_seq
483      */
484     UWORD32                                 u4_new_seq;
485 
486     /**
487      * output_present
488      */
489     UWORD32                                 u4_output_present;
490 
491     /**
492      * progressive_frame_flag
493      */
494     UWORD32                                 u4_progressive_frame_flag;
495 
496     /**
497      * is_ref_flag
498      */
499     UWORD32                                 u4_is_ref_flag;
500 
501     /**
502      * output_format
503      */
504     IV_COLOR_FORMAT_T                       e_output_format;
505 
506     /**
507      * disp_frm_buf
508      */
509     iv_yuv_buf_t                            s_disp_frm_buf;
510 
511     /**
512      * sei params o/p struct
513      */
514     ivd_sei_decode_op_t                     s_sei_decode_op;
515 
516     /**
517      * fld_type
518      */
519     IV_FLD_TYPE_T                           e4_fld_type;
520 
521     /**
522      * ts
523      */
524     UWORD32                                 u4_ts;
525 
526     /**
527      * disp_buf_id
528      */
529     UWORD32                                 u4_disp_buf_id;
530 
531     /**
532      * reorder_depth
533      */
534     WORD32                                  i4_reorder_depth;
535 
536     /**
537      * disp_buf_id
538      */
539     WORD32                                  i4_display_index;
540 
541 }ivd_video_decode_op_t;
542 
543 
544 /*****************************************************************************/
545 /*   Get Display Frame                                                       */
546 /*****************************************************************************/
547 
548 
549 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_GET_DISPLAY_FRAME                 */
550 
551 typedef struct
552 {
553     /**
554      * u4_size of the structure
555      */
556     UWORD32                                 u4_size;
557 
558     /**
559      * e_cmd
560      */
561     IVD_API_COMMAND_TYPE_T                  e_cmd;
562 
563     /**
564      * output buffer desc
565      */
566     ivd_out_bufdesc_t                       s_out_buffer;
567 
568 }ivd_get_display_frame_ip_t;
569 
570 
571 typedef struct
572 {
573     /**
574      * u4_size of the structure
575      */
576     UWORD32                                 u4_size;
577 
578     /**
579      * error_code
580      */
581     UWORD32                                 u4_error_code;
582 
583     /**
584      * progressive_frame_flag
585      */
586     UWORD32                                 u4_progressive_frame_flag;
587 
588     /**
589      * pic_type
590      */
591     IV_PICTURE_CODING_TYPE_T                e_pic_type;
592 
593     /**
594      * is_ref_flag
595      */
596     UWORD32                                 u4_is_ref_flag;
597 
598     /**
599      * output_format
600      */
601     IV_COLOR_FORMAT_T                       e_output_format;
602 
603     /**
604      * disp_frm_buf
605      */
606     iv_yuv_buf_t                            s_disp_frm_buf;
607 
608     /**
609      * fld_type
610      */
611     IV_FLD_TYPE_T                           e4_fld_type;
612 
613     /**
614      * ts
615      */
616     UWORD32                                 u4_ts;
617 
618     /**
619      * disp_buf_id
620      */
621     UWORD32                                 u4_disp_buf_id;
622 }ivd_get_display_frame_op_t;
623 
624 /*****************************************************************************/
625 /*   Set Display Frame                                                       */
626 /*****************************************************************************/
627 
628 
629 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
630 
631 typedef struct
632 {
633     /**
634      * u4_size of the structure
635      */
636     UWORD32                                 u4_size;
637 
638     /**
639      * cmd
640      */
641     IVD_API_COMMAND_TYPE_T                  e_cmd;
642 
643     /**
644      * num_disp_bufs
645      */
646     UWORD32                                 num_disp_bufs;
647 
648     /**
649      * output buffer desc
650      */
651     ivd_out_bufdesc_t                       s_disp_buffer[IVD_VIDDEC_MAX_IO_BUFFERS];
652 
653 }ivd_set_display_frame_ip_t;
654 
655 
656 typedef struct
657 {
658     /**
659      * u4_size of the structure
660      */
661     UWORD32                                 u4_size;
662 
663     /**
664      * error code
665      */
666     UWORD32                                 u4_error_code;
667 }ivd_set_display_frame_op_t;
668 
669 
670 /*****************************************************************************/
671 /*   Release Display Frame                                                       */
672 /*****************************************************************************/
673 
674 
675 /* IVD_API_COMMAND_TYPE_T::e_cmd = IVD_CMD_SET_DISPLAY_FRAME                 */
676 
677 typedef struct
678 {
679     /**
680      * u4_size of the structure
681      */
682     UWORD32                                 u4_size;
683 
684     /**
685      * e_cmd
686      */
687     IVD_API_COMMAND_TYPE_T                  e_cmd;
688 
689     /**
690      * disp_buf_id
691      */
692     UWORD32                                 u4_disp_buf_id;
693 }ivd_rel_display_frame_ip_t;
694 
695 
696 typedef struct
697 {
698     /**
699      * u4_size of the structure
700      */
701     UWORD32                                 u4_size;
702 
703     /**
704      * error code
705      */
706     UWORD32                                 u4_error_code;
707 }ivd_rel_display_frame_op_t;
708 
709 /*****************************************************************************/
710 /*   Video control  Flush                                                    */
711 /*****************************************************************************/
712 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
713 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_FLUSH          */
714 
715 
716 
717 typedef struct{
718     /**
719      * u4_size of the structure
720      */
721     UWORD32                                 u4_size;
722 
723     /**
724      * cmd
725      */
726     IVD_API_COMMAND_TYPE_T                  e_cmd;
727 
728     /**
729      * sub_cmd
730      */
731     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
732 }ivd_ctl_flush_ip_t;
733 
734 
735 typedef struct{
736     /**
737      * u4_size of the structure
738      */
739     UWORD32                                 u4_size;
740 
741     /**
742      * error code
743      */
744     UWORD32                                 u4_error_code;
745 }ivd_ctl_flush_op_t;
746 
747 /*****************************************************************************/
748 /*   Video control reset                                                     */
749 /*****************************************************************************/
750 /* IVD_API_COMMAND_TYPE_T::e_cmd            = IVD_CMD_VIDEO_CTL              */
751 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd    = IVD_CMD_ctl_RESET          */
752 
753 
754 typedef struct{
755     /**
756      * u4_size of the structure
757      */
758     UWORD32                                 u4_size;
759 
760     /**
761      * cmd
762      */
763     IVD_API_COMMAND_TYPE_T                  e_cmd;
764 
765     /**
766      * sub_cmd
767      */
768 
769     IVD_CONTROL_API_COMMAND_TYPE_T          e_sub_cmd;
770 }ivd_ctl_reset_ip_t;
771 
772 
773 typedef struct{
774     /**
775      * u4_size of the structure
776      */
777     UWORD32                                 u4_size;
778 
779     /**
780      * error code
781      */
782     UWORD32                                 u4_error_code;
783 }ivd_ctl_reset_op_t;
784 
785 
786 /*****************************************************************************/
787 /*   Video control  Set Params                                               */
788 /*****************************************************************************/
789 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
790 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETPARAMS           */
791 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_SETDEFAULT          */
792 
793 
794 
795 typedef struct {
796     /**
797      * u4_size of the structure
798      */
799     UWORD32                                     u4_size;
800 
801     /**
802      * cmd
803      */
804     IVD_API_COMMAND_TYPE_T                      e_cmd;
805 
806     /**
807      * sub_cmd
808      */
809     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
810 
811     /**
812      * vid_dec_mode
813      */
814     IVD_VIDEO_DECODE_MODE_T                     e_vid_dec_mode;
815 
816     /**
817      * disp_wd
818      */
819     UWORD32                                     u4_disp_wd;
820 
821     /**
822      * frm_skip_mode
823      */
824     IVD_FRAME_SKIP_MODE_T                       e_frm_skip_mode;
825 
826     /**
827      * frm_out_mode
828      */
829     IVD_DISPLAY_FRAME_OUT_MODE_T                e_frm_out_mode;
830 }ivd_ctl_set_config_ip_t;
831 
832 
833 typedef struct{
834     /**
835      * u4_size of the structure
836      */
837     UWORD32                                     u4_size;
838 
839     /**
840      * u4_error_code
841      */
842     UWORD32                                     u4_error_code;
843 }ivd_ctl_set_config_op_t;
844 
845 /*****************************************************************************/
846 /*   Video control:Get Buf Info                                              */
847 /*****************************************************************************/
848 
849 /* IVD_API_COMMAND_TYPE_T::e_cmd         = IVD_CMD_VIDEO_CTL                 */
850 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETBUFINFO          */
851 
852 
853 typedef struct{
854     /**
855      * u4_size of the structure
856      */
857     UWORD32                                     u4_size;
858 
859     /**
860      *  e_cmd
861      */
862     IVD_API_COMMAND_TYPE_T                      e_cmd;
863 
864     /**
865      * sub_cmd
866      */
867     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
868 }ivd_ctl_getbufinfo_ip_t;
869 
870 
871 typedef struct{
872     /**
873      * u4_size of the structure
874      */
875     UWORD32                                     u4_size;
876 
877     /**
878      * error code
879      */
880     UWORD32                                     u4_error_code;
881 
882     /**
883      * no of display buffer sets required by codec
884      */
885     UWORD32                                     u4_num_disp_bufs;
886 
887     /**
888      * no of input buffers required for codec
889      */
890     UWORD32                                     u4_min_num_in_bufs;
891 
892     /**
893      * no of output buffers required for codec
894      */
895     UWORD32                                     u4_min_num_out_bufs;
896 
897     /**
898      * sizes of each input buffer required
899      */
900     UWORD32                                     u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
901 
902     /**
903      * sizes of each output buffer required
904      */
905     UWORD32                                     u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
906 }ivd_ctl_getbufinfo_op_t;
907 
908 
909 /*****************************************************************************/
910 /*   Video control:Getstatus Call                                            */
911 /*****************************************************************************/
912 
913 
914 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
915 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETPARAMS           */
916 
917 
918 typedef struct{
919     /**
920      * u4_size of the structure
921      */
922     UWORD32                                     u4_size;
923 
924     /**
925      * cmd
926      */
927     IVD_API_COMMAND_TYPE_T                      e_cmd;
928 
929     /**
930      * sub_cmd
931      */
932     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
933 }ivd_ctl_getstatus_ip_t;
934 
935 
936 typedef struct{
937 
938      /**
939       * u4_size of the structure
940       */
941     UWORD32                  u4_size;
942 
943     /**
944       * error code
945       */
946     UWORD32                  u4_error_code;
947 
948     /**
949      * no of display buffer sets required by codec
950      */
951     UWORD32                  u4_num_disp_bufs;
952 
953     /**
954      * u4_pic_ht
955      */
956     UWORD32                  u4_pic_ht;
957 
958     /**
959      * u4_pic_wd
960      */
961     UWORD32                  u4_pic_wd;
962 
963     /**
964      * frame_rate
965      */
966     UWORD32                  u4_frame_rate;
967 
968     /**
969      * u4_bit_rate
970      */
971     UWORD32                  u4_bit_rate;
972 
973     /**
974      * content_type
975      */
976     IV_CONTENT_TYPE_T        e_content_type;
977 
978     /**
979      * output_chroma_format
980      */
981     IV_COLOR_FORMAT_T        e_output_chroma_format;
982 
983     /**
984      * no of input buffers required for codec
985      */
986     UWORD32                  u4_min_num_in_bufs;
987 
988     /**
989      * no of output buffers required for codec
990      */
991     UWORD32                  u4_min_num_out_bufs;
992 
993     /**
994      * sizes of each input buffer required
995      */
996     UWORD32                  u4_min_in_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
997 
998     /**
999      * sizes of each output buffer required
1000      */
1001     UWORD32                  u4_min_out_buf_size[IVD_VIDDEC_MAX_IO_BUFFERS];
1002 }ivd_ctl_getstatus_op_t;
1003 
1004 
1005 /*****************************************************************************/
1006 /*   Video control:Get Version Info                                          */
1007 /*****************************************************************************/
1008 
1009 /* IVD_API_COMMAND_TYPE_T::e_cmd        = IVD_CMD_VIDEO_CTL                  */
1010 /* IVD_CONTROL_API_COMMAND_TYPE_T::e_sub_cmd=IVD_CMD_ctl_GETVERSION          */
1011 
1012 
1013 typedef struct{
1014     /**
1015      * u4_size of the structure
1016      */
1017     UWORD32                                     u4_size;
1018 
1019     /**
1020      * cmd
1021      */
1022     IVD_API_COMMAND_TYPE_T                      e_cmd;
1023 
1024     /**
1025      * sub_cmd
1026      */
1027     IVD_CONTROL_API_COMMAND_TYPE_T              e_sub_cmd;
1028 
1029     /**
1030      * pv_version_buffer
1031      */
1032     void                                        *pv_version_buffer;
1033 
1034     /**
1035      * version_buffer_size
1036      */
1037     UWORD32                                     u4_version_buffer_size;
1038 }ivd_ctl_getversioninfo_ip_t;
1039 
1040 
1041 typedef struct{
1042     /**
1043      * u4_size of the structure
1044      */
1045     UWORD32                                     u4_size;
1046 
1047     /**
1048      * error code
1049      */
1050     UWORD32                                     u4_error_code;
1051 }ivd_ctl_getversioninfo_op_t;
1052 
1053 #endif /* __IVD_H__ */
1054 
1055