xref: /aosp_15_r20/external/libavc/encoder/svc/irc_svc_rate_control_api.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
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 #ifndef _IRC_SVC_RATE_CONTROL_API_H_
22 #define _IRC_SVC_RATE_CONTROL_API_H_
23 
24 /* Dependencies of 'irc_rate_control_api_structs' */
25 #include "irc_picture_type.h"
26 #include "irc_rd_model.h"
27 #include "irc_vbr_storage_vbv.h"
28 #include "irc_est_sad.h"
29 #include "irc_bit_allocation.h"
30 #include "irc_mb_model_based.h"
31 #include "irc_cbr_buffer_control.h"
32 #include "irc_vbr_str_prms.h"
33 #include "irc_common.h"
34 
35 #include "irc_rate_control_api_structs.h"
36 
37 /* Get frame level QP based on BPP and GPP */
38 UWORD8 irc_get_frame_level_init_qp(rate_control_api_t *ps_rate_control_api, rc_type_e e_rc_type,
39                                    picture_type_e e_pic_type, DOUBLE d_bpp, DOUBLE d_gpp);
40 
41 void irc_change_qp_constraints(rate_control_api_t *ps_rate_control_api, UWORD8 *pu1_min_max_qp,
42                                UWORD8 *pu1_min_max_avc_qp);
43 
44 extern UWORD8 irc_is_scenecut(rate_control_api_t *ps_rate_control_api);
45 
46 #endif
47