Home | History | Annotate | Download | only in libqdutils

Lines Matching refs:debug_fps_metadata

75     debug_fps_metadata.type = (debug_fps_metadata_t::DfmType) atoi(prop);
79 debug_fps_metadata.time_period = atoi(prop);
82 debug_fps_metadata.period = atoi(prop);
84 if (debug_fps_metadata.period > MAX_FPS_CALC_PERIOD_IN_FRAMES) {
85 debug_fps_metadata.period = MAX_FPS_CALC_PERIOD_IN_FRAMES;
90 debug_fps_metadata.ignorethresh_us = atoi(prop);
92 debug_fps_metadata.framearrival_steps =
93 (unsigned int)(debug_fps_metadata.ignorethresh_us / 16666);
95 if (debug_fps_metadata.framearrival_steps > MAX_FRAMEARRIVAL_STEPS) {
96 debug_fps_metadata.framearrival_steps = MAX_FRAMEARRIVAL_STEPS;
97 debug_fps_metadata.ignorethresh_us =
98 debug_fps_metadata.framearrival_steps * 16666;
102 debug_fps_metadata.margin_us = 2000;
105 debug_fps_metadata.accum_framearrivals[i] = 0;
107 debug_fps_metadata.curr_frame = 0;
109 ALOGD("period: %u", debug_fps_metadata.period);
110 ALOGD("ignorethresh_us: %"PRId64, debug_fps_metadata.ignorethresh_us);
115 if (debug_fps_metadata_t::DFM_FRAMES == debug_fps_metadata.type)
116 ALOGD("FPS for last %d frames: %3.2f", debug_fps_metadata.period, fps);
119 debug_fps_metadata.time_elapsed,
120 debug_fps_metadata.curr_frame, fps);
122 debug_fps_metadata.curr_frame = 0;
123 debug_fps_metadata.time_elapsed = 0.0;
128 i < ((debug_fps_metadata.framearrival_steps / 6) + 1);
131 debug_fps_metadata.accum_framearrivals[i*6],
132 debug_fps_metadata.accum_framearrivals[i*6+1],
133 debug_fps_metadata.accum_framearrivals[i*6+2],
134 debug_fps_metadata.accum_framearrivals[i*6+3],
135 debug_fps_metadata.accum_framearrivals[i*6+4],
136 debug_fps_metadata.accum_framearrivals[i*6+5]);
141 i < debug_fps_metadata.framearrival_steps;
143 debug_fps_metadata.accum_framearrivals[i] = 0;
156 if (debug_fps_metadata_t::DFM_FRAMES == debug_fps_metadata.type &&
157 diff > debug_fps_metadata.ignorethresh_us) {
161 if (debug_fps_metadata.curr_frame < MAX_FPS_CALC_PERIOD_IN_FRAMES) {
162 debug_fps_metadata.framearrivals[debug_fps_metadata.curr_frame] = diff;
165 debug_fps_metadata.curr_frame++;
169 (unsigned int)(diff + debug_fps_metadata.margin_us) / 16666;
171 if (currstep < debug_fps_metadata.framearrival_steps) {
172 debug_fps_metadata.accum_framearrivals[currstep-1]++;
176 if (debug_fps_metadata_t::DFM_FRAMES == debug_fps_metadata.type) {
177 if (debug_fps_metadata.curr_frame == debug_fps_metadata.period) {
180 for (unsigned int i = 0; i < debug_fps_metadata.period; i++)
181 sum += debug_fps_metadata.framearrivals[i];
182 print_fps(float(float(debug_fps_metadata.period * 1000000) /
186 else if (debug_fps_metadata_t::DFM_TIME == debug_fps_metadata.type) {
187 debug_fps_metadata.time_elapsed += (float)((float)diff/1000.0);
188 if (debug_fps_metadata.time_elapsed >= debug_fps_metadata.time_period) {
189 float fps = float(1000.0 * debug_fps_metadata.curr_frame/
190 debug_fps_metadata.time_elapsed);