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 ihevce_frame_process.h 23 * 24 * \brief 25 * This file contains interface defination of frame proceswsing pass 26 * 27 * \date 28 * 18/09/2012 29 * 30 * \author 31 * Ittiam 32 * 33 ****************************************************************************** 34 */ 35 36 #ifndef _IHEVCE_FRAME_PROCESS_H_ 37 #define _IHEVCE_FRAME_PROCESS_H_ 38 39 /*****************************************************************************/ 40 /* Constant Macros */ 41 /*****************************************************************************/ 42 43 /*****************************************************************************/ 44 /* Function Macros */ 45 /*****************************************************************************/ 46 47 /*****************************************************************************/ 48 /* Typedefs */ 49 /*****************************************************************************/ 50 51 /*****************************************************************************/ 52 /* Enums */ 53 /*****************************************************************************/ 54 55 /*****************************************************************************/ 56 /* Structure */ 57 /*****************************************************************************/ 58 59 /*****************************************************************************/ 60 /* Extern Variable Declarations */ 61 /*****************************************************************************/ 62 63 /*****************************************************************************/ 64 /* Extern Function Declarations */ 65 /*****************************************************************************/ 66 DOUBLE ihevce_compute_psnr( 67 UWORD8 *pu1_ip_buf, 68 UWORD8 *pu1_ref_buf, 69 WORD32 width, 70 WORD32 height, 71 WORD32 horz_jmp, 72 WORD32 ip_stride, 73 WORD32 ref_stride, 74 double *acc_mse, 75 ihevce_logo_attrs_t *ps_logo_ctxt, 76 WORD32 i4_is_chroma); 77 78 void ihevce_pre_enc_manage_ref_pics( 79 enc_ctxt_t *ps_enc_ctxt, 80 ihevce_lap_enc_buf_t *ps_curr_inp, 81 pre_enc_me_ctxt_t *ps_curr_out, 82 WORD32 i4_ping_pong); 83 84 void ihevce_manage_ref_pics( 85 enc_ctxt_t *ps_enc_ctxt, 86 ihevce_lap_enc_buf_t *ps_curr_inp, 87 slice_header_t *ps_slice_header, 88 WORD32 i4_me_frm_id, 89 WORD32 i4_thrd_id, 90 WORD32 i4_bitrate_instance_id); 91 92 void ihevce_get_frame_lambda_prms( 93 enc_ctxt_t *ps_enc_ctxt, 94 pre_enc_me_ctxt_t *ps_cur_pic_ctxt, 95 WORD32 i4_cur_frame_qp, 96 WORD32 first_field, 97 WORD32 i4_is_ref_pic, 98 WORD32 i4_temporal_lyr_id, 99 double f_i_pic_lamda_modifier, 100 WORD32 i4_inst_id, 101 WORD32 i4_lambda_type); 102 103 void calc_l1_level_hme_intra_sad_different_qp( 104 enc_ctxt_t *ps_enc_ctxt, 105 pre_enc_me_ctxt_t *ps_curr_out, 106 ihevce_lap_enc_buf_t *ps_curr_inp, 107 WORD32 i4_tot_ctb_l1_x, 108 WORD32 i4_tot_ctb_l1_y); 109 110 WORD32 ihevce_pre_enc_process_frame_thrd(void *pv_hle_ctxt); 111 112 WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt); 113 114 void ihevce_set_pre_enc_prms(enc_ctxt_t *ps_enc_ctxt); 115 116 #endif /* _IHEVCE_FRAME_PROCESS_H_ */ 117