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 ******************************************************************************* 23 * @file 24 * ih264e_modify_frm_rate.h 25 * 26 * @brief 27 * Handle source frame rate pulldown 28 * 29 * @author 30 * ittiam 31 * 32 * @remarks 33 * none 34 * 35 ******************************************************************************* 36 */ 37 38 #ifndef _IH264E_MODIFY_FRM_RATE_H_ 39 #define _IH264E_MODIFY_FRM_RATE_H_ 40 41 /*****************************************************************************/ 42 /* Constant Definitions */ 43 /*****************************************************************************/ 44 45 #define MAX_NUM_FRAME 120 46 47 48 /*****************************************************************************/ 49 /* Structures */ 50 /*****************************************************************************/ 51 typedef struct pd_frm_rate_t 52 { 53 /* 54 * The input frame rate set in the encoder (per 1000 sec) 55 */ 56 UWORD32 u4_input_frm_rate; 57 58 /* 59 * Frame rate of current frame due to pull down 60 */ 61 UWORD32 u4_cur_frm_rate[MAX_NUM_FRAME]; 62 63 /* 64 * current frame num in the above buffer 65 */ 66 UWORD32 u4_frm_num; 67 68 /* 69 * Total number of frames encoded. 70 * if greater than input frame rate stays at input frame rate 71 */ 72 UWORD32 u4_tot_frm_encoded; 73 74 }pd_frm_rate_t; 75 76 typedef struct pd_frm_rate_t *pd_frm_rate_handle; 77 78 79 /*****************************************************************************/ 80 /* Function Declarations */ 81 /*****************************************************************************/ 82 83 WORD32 ih264e_pd_frm_rate_get_init_free_memtab(pd_frm_rate_handle *pps_pd_frm_rate, 84 itt_memtab_t *ps_memtab, 85 ITT_FUNC_TYPE_E e_func_type); 86 87 void ih264e_init_pd_frm_rate(pd_frm_rate_handle ps_pd_frm_rate, 88 UWORD32 u4_input_frm_rate); 89 90 void ih264e_update_pd_frm_rate(pd_frm_rate_handle ps_pd_frm_rate, 91 UWORD32 u4_cur_frm_rate); 92 93 UWORD32 ih264e_get_pd_avg_frm_rate(pd_frm_rate_handle ps_pd_frm_rate); 94 95 #endif /* _IH264E_MODIFY_FRM_RATE_H_ */ 96