Add flag inter_stats_only
This flag will allow us to skip key frame's stats
Therefore, we can test inter frame performance when frame number
is small. The inter frame's stats won't get underwhelmed because
of key frame's stats
Change-Id: I9eaa8e5775fb2e740406cfa4b4f64f96f180d9db
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 1406d17..6003b58 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -5296,12 +5296,17 @@
s->worst = AOMMIN(s->worst, all);
}
-static void compute_internal_stats(AV1_COMP *cpi) {
+static void compute_internal_stats(AV1_COMP *cpi, int frame_bytes) {
AV1_COMMON *const cm = &cpi->common;
double samples = 0.0;
uint32_t in_bit_depth = 8;
uint32_t bit_depth = 8;
+#if CONFIG_INTER_STATS_ONLY
+ if (cm->current_video_frame <= 1) return; // skip key frame
+#endif
+ cpi->bytes += frame_bytes;
+
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
in_bit_depth = cpi->oxcf.input_bit_depth;
@@ -5489,8 +5494,7 @@
if (cpi->b_calculate_psnr) generate_psnr_packet(cpi);
#if CONFIG_INTERNAL_STATS
- compute_internal_stats(cpi);
- cpi->bytes += (int)(*size);
+ compute_internal_stats(cpi, (int)(*size));
#endif // CONFIG_INTERNAL_STATS
// Clear down mmx registers
@@ -5723,8 +5727,7 @@
#if CONFIG_INTERNAL_STATS
if (oxcf->pass != 1) {
- compute_internal_stats(cpi);
- cpi->bytes += (int)(*size);
+ compute_internal_stats(cpi, (int)(*size));
}
#endif // CONFIG_INTERNAL_STATS
diff --git a/configure b/configure
index ad7011c..73628a0 100755
--- a/configure
+++ b/configure
@@ -282,6 +282,7 @@
warped_motion
q_adapt_probs
bitstream_debug
+ inter_stats_only
alt_intra
palette
palette_delta_encoding