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 frame_info_collector.c 23 * 24 * \brief 25 * This file contain frame info initialize function 26 * 27 * \date 28 * 29 * \author 30 * ittiam 31 * 32 ****************************************************************************** 33 */ 34 /*****************************************************************************/ 35 /* File Includes */ 36 /*****************************************************************************/ 37 /* System include files */ 38 #include <stdio.h> 39 #include <string.h> 40 #include <stdlib.h> 41 42 /* User include files */ 43 #include "ittiam_datatypes.h" 44 #include "rc_cntrl_param.h" 45 #include "rc_frame_info_collector.h" 46 #include "trace_support.h" 47 #include "assert.h" 48 49 /* 50 ****************************************************************************** 51 * \if Function name : init_frame_info 52 * 53 * \brief 54 * this function initializes the frame info structs 55 * 56 * \param[in] 57 * *ps_finfo -> frame level info 58 * 59 * \return 60 * status 61 * 62 * \author 63 * Ittiam 64 * 65 ***************************************************************************** 66 */ init_frame_info(frame_info_t * ps_frame_info)67void init_frame_info(frame_info_t *ps_frame_info) 68 { 69 ps_frame_info->i8_frame_num = -1; 70 ps_frame_info->e_pic_type = BUF_PIC; 71 ps_frame_info->f_8bit_q_scale = -1; 72 ps_frame_info->f_8bit_q_scale_without_offset = -1; 73 ps_frame_info->f_hbd_q_scale = -1; 74 ps_frame_info->f_hbd_q_scale_without_offset = -1; 75 ps_frame_info->i4_scene_type = -1; 76 ps_frame_info->i4_rc_hevc_qp = -1; 77 ps_frame_info->i8_cl_sad = -1; 78 ps_frame_info->i8_header_bits = -1; 79 ps_frame_info->i8_tex_bits = -1; 80 ps_frame_info->i4_poc = -1; 81 ps_frame_info->i8_L1_ipe_raw_sad = -1; 82 ps_frame_info->i8_L1_me_sad = -1; 83 ps_frame_info->i4_num_entries = 0; 84 ps_frame_info->i8_est_texture_bits = -1; 85 ps_frame_info->i4_lap_complexity_q7 = -1; 86 ps_frame_info->i4_lap_f_sim = -1; 87 ps_frame_info->i4_lap_var = -1; 88 ps_frame_info->i8_frame_acc_coarse_me_cost = -1; 89 ps_frame_info->i_to_avg_bit_ratio = -1; 90 ps_frame_info->i4_num_scd_in_lap_window = -1; 91 ps_frame_info->i4_num_frames_b4_scd = -1; 92 ps_frame_info->i1_is_complexity_based_bits_reset = -1; 93 } 94