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 #ifdef KEEP_THREADS_ACTIVE 53 #define THREADS_ACTIVE_MEM_RECORDS (2 * MAX_THREADS) 54 #else 55 #define THREADS_ACTIVE_MEM_RECORDS 0 56 #endif 57 58 #define NUM_MEM_RECORDS (4 * MAX_THREADS + NUM_INT_FRAME_BUFFERS + \ 59 5 + 2 + 1 + THREADS_ACTIVE_MEM_RECORDS) 60 61 62 #define SETBIT(a,i) ((a) |= (1 << (i))) 63 64 65 /*********************/ 66 /* Codec Versioning */ 67 /*********************/ 68 69 70 71 72 /*****************************************************************************/ 73 /* Function Declarations */ 74 /*****************************************************************************/ 75 76 IV_API_CALL_STATUS_T impeg2d_api_num_mem_rec(void *pv_api_ip, void *pv_api_op); 77 78 IV_API_CALL_STATUS_T impeg2d_api_fill_mem_rec(void *pv_api_ip, void *pv_api_op); 79 80 IV_API_CALL_STATUS_T impeg2d_api_init(iv_obj_t *DECHDL, 81 void *ps_ip, 82 void *ps_op); 83 84 IV_API_CALL_STATUS_T impeg2d_api_set_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_rel_display_frame(iv_obj_t *DECHDL, 89 void *pv_api_ip, 90 void *pv_api_op); 91 92 IV_API_CALL_STATUS_T impeg2d_api_retrieve_mem_rec(iv_obj_t *DECHDL, 93 void *pv_api_ip, 94 void *pv_api_op); 95 96 IV_API_CALL_STATUS_T impeg2d_api_ctl(iv_obj_t *DECHDL, 97 void *pv_api_ip, 98 void *pv_api_op); 99 100 IV_API_CALL_STATUS_T impeg2d_api_get_version(iv_obj_t *DECHDL, 101 void *pv_api_ip, 102 void *pv_api_op); 103 104 IV_API_CALL_STATUS_T impeg2d_api_get_buf_info(iv_obj_t *DECHDL, 105 void *pv_api_ip, 106 void *pv_api_op); 107 108 IV_API_CALL_STATUS_T impeg2d_api_set_flush_mode(iv_obj_t *DECHDL, 109 void *pv_api_ip, 110 void *pv_api_op); 111 112 IV_API_CALL_STATUS_T impeg2d_api_set_default(iv_obj_t *DECHDL, 113 void *pv_api_ip, 114 void *pv_api_op); 115 116 IV_API_CALL_STATUS_T impeg2d_api_reset(iv_obj_t *DECHDL, 117 void *pv_api_ip, 118 void *pv_api_op); 119 120 IV_API_CALL_STATUS_T impeg2d_api_set_params(iv_obj_t *DECHDL, 121 void *pv_api_ip, 122 void *pv_api_op); 123 124 IV_API_CALL_STATUS_T impeg2d_api_get_status(iv_obj_t *DECHDL, 125 void *pv_api_ip, 126 void *pv_api_op); 127 128 IV_API_CALL_STATUS_T impeg2d_api_set_params(iv_obj_t *DECHDL, 129 void *pv_api_ip, 130 void *pv_api_op); 131 132 void impeg2d_fill_mem_rec(impeg2d_fill_mem_rec_ip_t *ps_ip, 133 impeg2d_fill_mem_rec_op_t *ps_op); 134 135 void impeg2d_dec_frm(void *dec, 136 impeg2d_video_decode_ip_t *ps_ip, 137 impeg2d_video_decode_op_t *ps_op); 138 139 void impeg2d_dec_hdr(void *dec, 140 impeg2d_video_decode_ip_t *ps_ip, 141 impeg2d_video_decode_op_t *ps_op); 142 143 IV_API_CALL_STATUS_T impeg2d_api_entity(iv_obj_t *DECHDL, 144 void *pv_api_ip, 145 void *pv_api_op); 146 147 IV_API_CALL_STATUS_T impeg2d_api_check_struct_sanity(iv_obj_t *ps_handle, 148 void *pv_api_ip, 149 void *pv_api_op); 150 151 152 153 154 #endif /* __IMPEG2D_API_H__ */ 155 156