1 /****************************************************************************** 2 * 3 * Copyright (C) 2018 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 ****************************************************************************** 23 * @file 24 * ihevce_lap_interface.h 25 * 26 * @brief 27 * This file contains structure definitions related to look-ahead processing 28 * 29 * @author 30 * ittiam 31 * 32 ****************************************************************************** 33 */ 34 35 #ifndef _IHEVCE_LAP_INTERFACE_H_ 36 #define _IHEVCE_LAP_INTERFACE_H_ 37 38 /*****************************************************************************/ 39 /* Structures */ 40 /*****************************************************************************/ 41 42 /** 43 ****************************************************************************** 44 * @brief lap interface ctxt 45 ****************************************************************************** 46 */ 47 typedef struct 48 { 49 ihevce_sys_api_t *ps_sys_api; 50 void *pv_hle_ctxt; 51 void *pv_lap_module_ctxt; 52 53 /** 54 * Control Input buffer Queue id 55 */ 56 57 WORD32 i4_ctrl_in_que_id; 58 /** 59 * 60 *EnC and application owned command buffer size 61 */ 62 WORD32 i4_ctrl_cmd_buf_size; 63 64 /** 65 * Control Input buffer blocking mode 66 */ 67 WORD32 i4_ctrl_in_que_blocking_mode; 68 69 /** 70 * Control output buffer Queue id 71 */ 72 WORD32 i4_ctrl_out_que_id; 73 74 /** 75 * Dynamic bitrate change Callback function 76 */ 77 void (*ihevce_dyn_bitrate_cb)(void *pv_hle_ctxt, void *pv_dyn_bitrate_prms); 78 79 } lap_intface_t; 80 81 /*****************************************************************************/ 82 /* Function Declarations */ 83 /*****************************************************************************/ 84 85 WORD32 ihevce_lap_get_num_mem_recs(void); 86 87 WORD32 ihevce_lap_get_mem_recs(iv_mem_rec_t *ps_mem_tab, WORD32 i4_mem_space); 88 89 WORD32 ihevce_lap_get_num_ip_bufs(ihevce_lap_static_params_t *ps_lap_stat_prms); 90 91 void *ihevce_lap_init( 92 iv_mem_rec_t *ps_mem_tab, 93 ihevce_lap_static_params_t *ps_lap_params, 94 ihevce_static_cfg_params_t *ps_static_cfg_prms); 95 96 ihevce_lap_enc_buf_t * 97 ihevce_lap_process(void *pv_interface_ctxt, ihevce_lap_enc_buf_t *ps_curr_inp); 98 99 WORD32 ihevce_check_last_inp_buf(WORD32 *pi4_cmd_buf); 100 101 #endif /* _IHEVCE_LAP_INTERFACE_H_ */ 102