xref: /aosp_15_r20/external/libhevc/encoder/ihevce_recur_bracketing.h (revision c83a76b084498d55f252f48b2e3786804cdf24b7)
1*c83a76b0SSuyog Pawar /******************************************************************************
2*c83a76b0SSuyog Pawar  *
3*c83a76b0SSuyog Pawar  * Copyright (C) 2018 The Android Open Source Project
4*c83a76b0SSuyog Pawar  *
5*c83a76b0SSuyog Pawar  * Licensed under the Apache License, Version 2.0 (the "License");
6*c83a76b0SSuyog Pawar  * you may not use this file except in compliance with the License.
7*c83a76b0SSuyog Pawar  * You may obtain a copy of the License at:
8*c83a76b0SSuyog Pawar  *
9*c83a76b0SSuyog Pawar  * http://www.apache.org/licenses/LICENSE-2.0
10*c83a76b0SSuyog Pawar  *
11*c83a76b0SSuyog Pawar  * Unless required by applicable law or agreed to in writing, software
12*c83a76b0SSuyog Pawar  * distributed under the License is distributed on an "AS IS" BASIS,
13*c83a76b0SSuyog Pawar  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*c83a76b0SSuyog Pawar  * See the License for the specific language governing permissions and
15*c83a76b0SSuyog Pawar  * limitations under the License.
16*c83a76b0SSuyog Pawar  *
17*c83a76b0SSuyog Pawar  *****************************************************************************
18*c83a76b0SSuyog Pawar  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*c83a76b0SSuyog Pawar */
20*c83a76b0SSuyog Pawar /*!
21*c83a76b0SSuyog Pawar ******************************************************************************
22*c83a76b0SSuyog Pawar * \file ihevce_recur_bracketing.h
23*c83a76b0SSuyog Pawar *
24*c83a76b0SSuyog Pawar * \brief
25*c83a76b0SSuyog Pawar *    This file contains interface definition of structs and fucntions for
26*c83a76b0SSuyog Pawar *    recursive bracketing
27*c83a76b0SSuyog Pawar *
28*c83a76b0SSuyog Pawar * \date
29*c83a76b0SSuyog Pawar *    12/02/2012
30*c83a76b0SSuyog Pawar *
31*c83a76b0SSuyog Pawar * \author
32*c83a76b0SSuyog Pawar *    Ittiam
33*c83a76b0SSuyog Pawar *
34*c83a76b0SSuyog Pawar ******************************************************************************
35*c83a76b0SSuyog Pawar */
36*c83a76b0SSuyog Pawar 
37*c83a76b0SSuyog Pawar #ifndef _IHEVCE_RECUR_BRACKETING_H_
38*c83a76b0SSuyog Pawar #define _IHEVCE_RECUR_BRACKETING_H_
39*c83a76b0SSuyog Pawar 
40*c83a76b0SSuyog Pawar //*****************************************************************************/
41*c83a76b0SSuyog Pawar /* Constant Macros                                                           */
42*c83a76b0SSuyog Pawar /*****************************************************************************/
43*c83a76b0SSuyog Pawar 
44*c83a76b0SSuyog Pawar /*****************************************************************************/
45*c83a76b0SSuyog Pawar /* Function Macros                                                           */
46*c83a76b0SSuyog Pawar /*****************************************************************************/
47*c83a76b0SSuyog Pawar 
48*c83a76b0SSuyog Pawar /*****************************************************************************/
49*c83a76b0SSuyog Pawar /* Typedefs                                                                  */
50*c83a76b0SSuyog Pawar /*****************************************************************************/
51*c83a76b0SSuyog Pawar 
52*c83a76b0SSuyog Pawar /*****************************************************************************/
53*c83a76b0SSuyog Pawar /* Enums                                                                     */
54*c83a76b0SSuyog Pawar /*****************************************************************************/
55*c83a76b0SSuyog Pawar 
56*c83a76b0SSuyog Pawar /*****************************************************************************/
57*c83a76b0SSuyog Pawar /* Structure                                                                 */
58*c83a76b0SSuyog Pawar /*****************************************************************************/
59*c83a76b0SSuyog Pawar 
60*c83a76b0SSuyog Pawar /*****************************************************************************/
61*c83a76b0SSuyog Pawar /* Extern Variable Declarations                                              */
62*c83a76b0SSuyog Pawar /*****************************************************************************/
63*c83a76b0SSuyog Pawar 
64*c83a76b0SSuyog Pawar /*****************************************************************************/
65*c83a76b0SSuyog Pawar /* Function Declarations                                                     */
66*c83a76b0SSuyog Pawar /*****************************************************************************/
67*c83a76b0SSuyog Pawar void ihevce_recur_bracketing(
68*c83a76b0SSuyog Pawar     ihevce_ipe_ctxt_t *ps_ctxt,
69*c83a76b0SSuyog Pawar     ihevce_ipe_cu_tree_t *ps_cu_node,
70*c83a76b0SSuyog Pawar     iv_enc_yuv_buf_t *ps_curr_src,
71*c83a76b0SSuyog Pawar     ctb_analyse_t *ps_ctb_out,
72*c83a76b0SSuyog Pawar     cu_analyse_t *ps_row_cu);
73*c83a76b0SSuyog Pawar 
74*c83a76b0SSuyog Pawar void ihevce_bracketing_analysis(
75*c83a76b0SSuyog Pawar     ihevce_ipe_ctxt_t *ps_ctxt,
76*c83a76b0SSuyog Pawar     ihevce_ipe_cu_tree_t *ps_cu_node,
77*c83a76b0SSuyog Pawar     iv_enc_yuv_buf_t *ps_curr_src,
78*c83a76b0SSuyog Pawar     ctb_analyse_t *ps_ctb_out,
79*c83a76b0SSuyog Pawar     //cu_analyse_t         *ps_row_cu,
80*c83a76b0SSuyog Pawar     ihevce_ed_blk_t *ps_ed_l1_ctb,
81*c83a76b0SSuyog Pawar     ihevce_ed_blk_t *ps_ed_l2_ctb,
82*c83a76b0SSuyog Pawar     ihevce_ed_ctb_l1_t *ps_ed_ctb_l1,
83*c83a76b0SSuyog Pawar     ipe_l0_ctb_analyse_for_me_t *ps_l0_ipe_out_ctb);
84*c83a76b0SSuyog Pawar 
85*c83a76b0SSuyog Pawar void ihevce_mode_eval_filtering(
86*c83a76b0SSuyog Pawar     ihevce_ipe_cu_tree_t *ps_cu_node,
87*c83a76b0SSuyog Pawar     ihevce_ipe_cu_tree_t *ps_child_cu_node,
88*c83a76b0SSuyog Pawar     ihevce_ipe_ctxt_t *ps_ctxt,
89*c83a76b0SSuyog Pawar     iv_enc_yuv_buf_t *ps_curr_src,
90*c83a76b0SSuyog Pawar     WORD32 best_amode,
91*c83a76b0SSuyog Pawar     WORD32 *best_costs_4x4,
92*c83a76b0SSuyog Pawar     UWORD8 *best_modes_4x4,
93*c83a76b0SSuyog Pawar     WORD32 step2_bypass,
94*c83a76b0SSuyog Pawar     WORD32 tu_eq_cu);
95*c83a76b0SSuyog Pawar 
96*c83a76b0SSuyog Pawar void ihevce_update_cand_list(
97*c83a76b0SSuyog Pawar     ihevce_ipe_cu_tree_t *ps_cu_node, ihevce_ed_blk_t *ps_ed_blk_l1, ihevce_ipe_ctxt_t *ps_ctxt);
98*c83a76b0SSuyog Pawar 
99*c83a76b0SSuyog Pawar WORD32 sad_nxn_blk(
100*c83a76b0SSuyog Pawar     UWORD8 *pu1_inp, WORD32 i4_inp_stride, UWORD8 *pu1_ref, WORD32 i4_ref_stride, WORD32 trans_size);
101*c83a76b0SSuyog Pawar 
102*c83a76b0SSuyog Pawar #endif /* _IHEVCE_RECUR_BRACKETING_H_ */
103