xref: /aosp_15_r20/external/libmpeg2/decoder/impeg2d_api.h (revision a97c2a1f0a796dc32bed80d3353c69c5fc07c750)
1 /******************************************************************************
2  *
3  * Copyright (C) 2015 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 /*****************************************************************************/
21 /*                                                                           */
22 /*  File Name         : impeg2d_api.h                                 */
23 /*                                                                           */
24 /*  Description       : This file contains all the necessary examples to     */
25 /*                      establish a consistent use of Ittiam C coding        */
26 /*                      standards (based on Indian Hill C Standards)         */
27 /*                                                                           */
28 /*  List of Functions : <List the functions defined in this file>            */
29 /*                                                                           */
30 /*  Issues / Problems : None                                                 */
31 /*                                                                           */
32 /*  Revision History  :                                                      */
33 /*                                                                           */
34 /*         DD MM YYYY   Author(s)       Changes (Describe the changes made)  */
35 /*         10 10 2005   Ittiam          Draft                                */
36 /*                                                                           */
37 /*****************************************************************************/
38 
39 #ifndef __IMPEG2D_API_H__
40 #define __IMPEG2D_API_H__
41 
42 
43 /*****************************************************************************/
44 /* Constant Macros                                                           */
45 /*****************************************************************************/
46 
47 
48 #define DEBUG_PRINT printf
49 
50 
51 
52 #define THREADS_ACTIVE_MEM_RECORDS (2 * MAX_THREADS)
53 
54 #define NUM_MEM_RECORDS                 (4 * MAX_THREADS + NUM_INT_FRAME_BUFFERS + \
55                                          5 + 2 + 1 + THREADS_ACTIVE_MEM_RECORDS)
56 
57 
58 #define SETBIT(a,i)   ((a) |= (1 << (i)))
59 
60 
61 /*********************/
62 /* Codec Versioning  */
63 /*********************/
64 
65 
66 
67 
68 /*****************************************************************************/
69 /* Function Declarations                                                     */
70 /*****************************************************************************/
71 
72 IV_API_CALL_STATUS_T impeg2d_api_num_mem_rec(void *pv_api_ip, void *pv_api_op);
73 
74 IV_API_CALL_STATUS_T impeg2d_api_fill_mem_rec(void *pv_api_ip, void *pv_api_op);
75 
76 IV_API_CALL_STATUS_T impeg2d_api_init(iv_obj_t *DECHDL,
77                                       void *ps_ip,
78                                       void *ps_op);
79 
80 IV_API_CALL_STATUS_T impeg2d_api_set_display_frame(iv_obj_t *DECHDL,
81                                           void *pv_api_ip,
82                                           void *pv_api_op);
83 
84 IV_API_CALL_STATUS_T impeg2d_api_rel_display_frame(iv_obj_t *DECHDL,
85                                                    void *pv_api_ip,
86                                                    void *pv_api_op);
87 
88 IV_API_CALL_STATUS_T impeg2d_api_retrieve_mem_rec(iv_obj_t *DECHDL,
89                                                         void *pv_api_ip,
90                                                         void *pv_api_op);
91 
92 IV_API_CALL_STATUS_T impeg2d_api_ctl(iv_obj_t *DECHDL,
93                                        void *pv_api_ip,
94                                        void *pv_api_op);
95 
96 IV_API_CALL_STATUS_T impeg2d_api_get_version(iv_obj_t *DECHDL,
97                                                void *pv_api_ip,
98                                                void *pv_api_op);
99 
100 IV_API_CALL_STATUS_T impeg2d_api_get_buf_info(iv_obj_t *DECHDL,
101                                                     void *pv_api_ip,
102                                                     void *pv_api_op);
103 
104 IV_API_CALL_STATUS_T impeg2d_api_set_flush_mode(iv_obj_t *DECHDL,
105                                                       void *pv_api_ip,
106                                                       void *pv_api_op);
107 
108 IV_API_CALL_STATUS_T impeg2d_api_set_default(iv_obj_t *DECHDL,
109                                                    void *pv_api_ip,
110                                                    void *pv_api_op);
111 
112 IV_API_CALL_STATUS_T impeg2d_api_reset(iv_obj_t *DECHDL,
113                                              void *pv_api_ip,
114                                              void *pv_api_op);
115 
116 IV_API_CALL_STATUS_T impeg2d_api_set_params(iv_obj_t *DECHDL,
117                                                   void *pv_api_ip,
118                                                   void *pv_api_op);
119 
120 IV_API_CALL_STATUS_T impeg2d_api_get_status(iv_obj_t *DECHDL,
121                                                   void *pv_api_ip,
122                                                   void *pv_api_op);
123 
124 IV_API_CALL_STATUS_T impeg2d_api_set_params(iv_obj_t *DECHDL,
125                                                   void *pv_api_ip,
126                                                   void *pv_api_op);
127 
128 void impeg2d_fill_mem_rec(impeg2d_fill_mem_rec_ip_t *ps_ip,
129                             impeg2d_fill_mem_rec_op_t *ps_op);
130 
131 void impeg2d_dec_frm(void *dec,
132                                 impeg2d_video_decode_ip_t *ps_ip,
133                                 impeg2d_video_decode_op_t *ps_op);
134 
135 void impeg2d_dec_hdr(void *dec,
136                                impeg2d_video_decode_ip_t *ps_ip,
137                                impeg2d_video_decode_op_t *ps_op);
138 
139 IV_API_CALL_STATUS_T impeg2d_api_entity(iv_obj_t *DECHDL,
140                                         void *pv_api_ip,
141                                         void *pv_api_op);
142 
143 IV_API_CALL_STATUS_T impeg2d_api_check_struct_sanity(iv_obj_t *ps_handle,
144                                                      void *pv_api_ip,
145                                                      void *pv_api_op);
146 
147 
148 
149 
150 #endif /* __IMPEG2D_API_H__ */
151 
152