1 /****************************************************************************** 2 * 3 * Copyright (C) 2022 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 * isvce_rc_utils.h 25 * 26 * @brief 27 * Contains get gpp function required by the SVC encoder 28 * 29 * @author 30 * ittiam 31 * 32 * @par List of Functions: 33 * - isvce_rc_utils_init() 34 * - isvce_get_rc_utils_data_size() 35 * - isvce_compute_gpp() 36 * 37 * @remarks 38 * None 39 * 40 ******************************************************************************* 41 */ 42 43 #ifndef _ISVCE_RC_UTILS_H_ 44 #define _ISVCE_RC_UTILS_H_ 45 46 #include "ih264_typedefs.h" 47 #include "isvc_structs.h" 48 49 typedef struct 50 { 51 /** 52 * pointer to the state of rc utils 53 */ 54 void *pv_rc_utils_state; 55 56 } svc_rc_utils_ctxt_t; 57 58 /** 59 ******************************************************************************* 60 * 61 * @brief 62 * initializes the rc utils context 63 * 64 * @par Description: 65 * initializes the rc utils context 66 * 67 * @param[in] ps_svc_rc_utils_ctxt 68 * pointer to svc rc utils context 69 * 70 * @param[in] ps_mem_rec 71 * pointer to memory allocated to compute gpp process 72 * 73 * @param[in] e_arch 74 * architecure type 75 * 76 * @returns 77 * 78 * @remarks 79 * none 80 * 81 ******************************************************************************* 82 */ 83 84 extern void isvce_rc_utils_init(svc_rc_utils_ctxt_t *ps_svc_rc_utils_ctxt, iv_mem_rec_t *ps_mem_rec, 85 IV_ARCH_T e_arch); 86 87 /** 88 ******************************************************************************* 89 * 90 * @brief 91 * gets the memory size required for compute gpp 92 * 93 * @par Description: 94 * returns the memory required by the rc utils context and state structs 95 * for allocation. 96 * 97 * @returns 98 * 99 * @remarks 100 * 101 * 102 ******************************************************************************* 103 */ 104 105 extern UWORD32 isvce_get_rc_utils_data_size(); 106 107 /** 108 ******************************************************************************* 109 * 110 * @brief 111 * compute gpp process 112 * 113 * @par Description: 114 * calls the function to compute gpp 115 * 116 * @param[in] ps_svc_rc_utils_ctxt 117 * pointer to svc rc utils context 118 * 119 * @param[in] ps_input_buf 120 * pointer to yuv buffer properties 121 * 122 * @returns 123 * calculated gpp value 124 * 125 * @remarks 126 * none 127 * 128 ******************************************************************************* 129 */ 130 131 extern DOUBLE isvce_compute_gpp(svc_rc_utils_ctxt_t *ps_svc_rc_utils_ctxt, 132 yuv_buf_props_t *ps_input_buf); 133 134 #endif 135