Home | History | Annotate | Download | only in encoder
      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 #ifndef _MB_MODEL_BASED_H_
     22 #define _MB_MODEL_BASED_H_
     23 
     24 typedef struct mb_rate_control_t *mb_rate_control_handle;
     25 
     26 WORD32 irc_mbrc_num_fill_use_free_memtab(mb_rate_control_handle *pps_mb_rate_control,
     27                                          itt_memtab_t *ps_memtab,
     28                                          ITT_FUNC_TYPE_E e_func_type);
     29 
     30 /* Initializing the state structure */
     31 void irc_init_mb_level_rc(mb_rate_control_handle ps_mb_rate_control);
     32 
     33 /* MB parameters that are to be initialized at a frame level */
     34 void irc_mb_init_frame_level(mb_rate_control_handle ps_mb_rate_control,
     35                              UWORD8 u1_frame_qp);
     36 
     37 /* MB Level call to get the mb_level QP */
     38 void irc_get_mb_qp(mb_rate_control_handle ps_mb_rate_control,
     39                    WORD32 i4_cur_mb_activity,
     40                    WORD32 *pi4_mb_qp);
     41 
     42 /* MB Parameters that are to be updated at a frame level */
     43 void irc_mb_update_frame_level(mb_rate_control_handle ps_mb_rate_control,
     44                                WORD32 i4_avg_activity);
     45 
     46 /****************************************************************************
     47  CONTROL FUCNTIONS FROM FRAME LEVEL
     48  ****************************************************************************/
     49 
     50 /* Returns the stored frame level QP */
     51 UWORD8 irc_get_frm_level_qp(mb_rate_control_handle ps_mb_rate_control);
     52 
     53 /* Disables activity based qp modulation */
     54 void irc_reset_mb_activity(mb_rate_control_handle ps_mb_rate_control);
     55 
     56 #endif
     57 
     58