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 * \file mb_model_based.h 23 * 24 * \brief 25 * This file contains all the necessary declarations for 26 * mb level API functions 27 * 28 * \date 29 * 30 * \author 31 * ittiam 32 * 33 ****************************************************************************** 34 */ 35 #ifndef _MB_MODEL_BASED_H_ 36 #define _MB_MODEL_BASED_H_ 37 38 /*****************************************************************************/ 39 /* Structure */ 40 /*****************************************************************************/ 41 typedef struct mb_rate_control_t *mb_rate_control_handle; 42 43 /*****************************************************************************/ 44 /* Function Declarations */ 45 /*****************************************************************************/ 46 WORD32 mbrc_num_fill_use_free_memtab( 47 mb_rate_control_handle *pps_mb_rate_control, 48 itt_memtab_t *ps_memtab, 49 ITT_FUNC_TYPE_E e_func_type); 50 /* Initialising the state structure */ 51 void init_mb_level_rc(mb_rate_control_handle ps_mb_rate_control); 52 /* MB parameters that are to be initalised at a frame level */ 53 void mb_init_frame_level(mb_rate_control_handle ps_mb_rate_control, UWORD8 u1_frame_qp); 54 /* MB Level call to get the mb_level QP */ 55 void get_mb_qp( 56 mb_rate_control_handle ps_mb_rate_control, WORD32 i4_cur_mb_activity, WORD32 *pi4_mb_qp); 57 /* MB Parameters that are to be updated at a frame level */ 58 void mb_update_frame_level(mb_rate_control_handle ps_mb_rate_control, WORD32 i4_avg_activity); 59 /**************************************************************************** 60 CONTROL FUCNTIONS FROM FRAME LEVEL 61 ****************************************************************************/ 62 /* Returns the stored frame level QP */ 63 UWORD8 get_frm_level_qp(mb_rate_control_handle ps_mb_rate_control); 64 /* Disables activity based qp modulation */ 65 void reset_mb_activity(mb_rate_control_handle ps_mb_rate_control); 66 67 #endif 68