Remove global motion from realtime only build.
Binary size reduced from 7,038,128 to 6,997,168 (0.6%)
real time encoder is bitexact on all speeds.
Bug: aomedia:2865
Change-Id: I373bdd0830b58dbbe77a47cd4b8b6bee61faf966
diff --git a/av1/av1.cmake b/av1/av1.cmake
index 7c0b696..e028afd 100644
--- a/av1/av1.cmake
+++ b/av1/av1.cmake
@@ -456,6 +456,10 @@
"${AOM_ROOT}/av1/encoder/cnn.h"
"${AOM_ROOT}/av1/encoder/firstpass.c"
"${AOM_ROOT}/av1/encoder/firstpass.h"
+ "${AOM_ROOT}/av1/encoder/global_motion.c"
+ "${AOM_ROOT}/av1/encoder/global_motion.h"
+ "${AOM_ROOT}/av1/encoder/global_motion_facade.c"
+ "${AOM_ROOT}/av1/encoder/global_motion_facade.h"
"${AOM_ROOT}/av1/encoder/gop_structure.c"
"${AOM_ROOT}/av1/encoder/gop_structure.h"
"${AOM_ROOT}/av1/encoder/misc_model_weights.h"
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 4aeca5d..916b1b8 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -1392,6 +1392,7 @@
x->txfm_search_info.tx_search_count = 0;
#endif // CONFIG_SPEED_STATS
+#if !CONFIG_REALTIME_ONLY
#if CONFIG_COLLECT_COMPONENT_TIMING
start_timing(cpi, av1_compute_global_motion_time);
#endif
@@ -1399,6 +1400,7 @@
#if CONFIG_COLLECT_COMPONENT_TIMING
end_timing(cpi, av1_compute_global_motion_time);
#endif
+#endif // !CONFIG_REALTIME_ONLY
#if CONFIG_COLLECT_COMPONENT_TIMING
start_timing(cpi, av1_setup_motion_field_time);
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 997e286..88fa208 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -1534,7 +1534,9 @@
if (mt_info->num_workers > 1) {
av1_loop_filter_dealloc(&mt_info->lf_row_sync);
av1_loop_restoration_dealloc(&mt_info->lr_row_sync, mt_info->num_workers);
+#if !CONFIG_REALTIME_ONLY
av1_gm_dealloc(&mt_info->gm_sync);
+#endif
}
dealloc_compressor_data(cpi);
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 802ef53..bd7943d 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -1304,7 +1304,6 @@
launch_enc_workers(&cpi->mt_info, num_workers);
sync_enc_workers(&cpi->mt_info, cm, num_workers);
}
-#endif // !CONFIG_REALTIME_ONLY
// Checks if a job is available in the current direction. If a job is available,
// frame_idx will be populated and returns 1, else returns 0.
@@ -1525,3 +1524,4 @@
launch_enc_workers(&cpi->mt_info, num_workers);
sync_enc_workers(&cpi->mt_info, &cpi->common, num_workers);
}
+#endif // !CONFIG_REALTIME_ONLY