Rename time stamp struct members
Renamed time stamp struct members to use consistent names for easy
understanding.
Change-Id: I568685cf43291e2bf5b74404cd6fabd2aeeb4192
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index 78c4f33..975f3bd 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -309,14 +309,14 @@
return;
}
- if (ts_start == time_stamps->first_ever) {
+ if (ts_start == time_stamps->first_ts_start) {
this_duration = ts_end - ts_start;
step = 1;
} else {
int64_t last_duration =
- time_stamps->prev_end_seen - time_stamps->prev_start_seen;
+ time_stamps->prev_ts_end - time_stamps->prev_ts_start;
- this_duration = ts_end - time_stamps->prev_end_seen;
+ this_duration = ts_end - time_stamps->prev_ts_end;
// do a step update if the duration changes by 10%
if (last_duration)
@@ -331,7 +331,7 @@
// frame rate. If we haven't seen 1 second yet, then average
// over the whole interval seen.
const double interval =
- AOMMIN((double)(ts_end - time_stamps->first_ever), 10000000.0);
+ AOMMIN((double)(ts_end - time_stamps->first_ts_start), 10000000.0);
double avg_duration = 10000000.0 / cpi->framerate;
avg_duration *= (interval - avg_duration + this_duration);
avg_duration /= interval;
@@ -339,8 +339,8 @@
av1_new_framerate(cpi, 10000000.0 / avg_duration);
}
}
- time_stamps->prev_start_seen = ts_start;
- time_stamps->prev_end_seen = ts_end;
+ time_stamps->prev_ts_start = ts_start;
+ time_stamps->prev_ts_end = ts_end;
}
// Determine whether there is a forced keyframe pending in the lookahead buffer
@@ -1196,9 +1196,9 @@
*time_stamp = source->ts_start;
*time_end = source->ts_end;
- if (source->ts_start < cpi->time_stamps.first_ever) {
- cpi->time_stamps.first_ever = source->ts_start;
- cpi->time_stamps.prev_end_seen = source->ts_start;
+ if (source->ts_start < cpi->time_stamps.first_ts_start) {
+ cpi->time_stamps.first_ts_start = source->ts_start;
+ cpi->time_stamps.prev_ts_end = source->ts_start;
}
av1_apply_encoding_flags(cpi, source->flags);
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 41507e7..8ed9952 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -945,7 +945,7 @@
av1_zero(aggregate_fc);
#endif // CONFIG_ENTROPY_STATS
- cpi->time_stamps.first_ever = INT64_MAX;
+ cpi->time_stamps.first_ts_start = INT64_MAX;
#ifdef OUTPUT_YUV_REC
yuv_rec_file = fopen("rec.yuv", "wb");
@@ -1388,7 +1388,7 @@
char results[512] = { 0 };
FILE *f = fopen("opsnr.stt", "a");
double time_encoded =
- (cpi->time_stamps.prev_end_seen - cpi->time_stamps.first_ever) /
+ (cpi->time_stamps.prev_ts_end - cpi->time_stamps.first_ts_start) /
10000000.000;
double total_encode_time =
(cpi->time_receive_data + cpi->time_compress_data) / 1000.000;
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 8cfee7c..ed79ba0 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -1985,15 +1985,15 @@
/*!
* Start time stamp of the previous frame
*/
- int64_t prev_start_seen;
+ int64_t prev_ts_start;
/*!
* End time stamp of the previous frame
*/
- int64_t prev_end_seen;
+ int64_t prev_ts_end;
/*!
* Start time stamp of the first frame
*/
- int64_t first_ever;
+ int64_t first_ts_start;
} TimeStamps;
/*!
diff --git a/av1/encoder/level.c b/av1/encoder/level.c
index a7005a3..7a74c46 100644
--- a/av1/encoder/level.c
+++ b/av1/encoder/level.c
@@ -1129,7 +1129,7 @@
scan_past_frames(buffer, encoded_frames_in_last_second, level_spec,
level_stats);
level_stats->total_time_encoded +=
- (cpi->time_stamps.prev_end_seen - cpi->time_stamps.prev_start_seen) /
+ (cpi->time_stamps.prev_ts_end - cpi->time_stamps.prev_ts_start) /
(double)TICKS_PER_SEC;
}