Speed up global motion determination
When global-motion is enabled, a considerable amount
of encoder time is spent in the functions in corner_match.c.
This patch optimizes those functions to be 3.5-4x as fast,
leading to an end-to-end encoder speed improvement
(on 20 frames of tempete_cif.y4m) of:
200kbps: ~26% faster
800kbps: ~19% faster
2800kbps: ~12% faster
Change-Id: I04d3f87484c36c41eb5a1e86e814f2accbe86297
diff --git a/av1/encoder/corner_match.h b/av1/encoder/corner_match.h
index 3618aa0..c045864 100644
--- a/av1/encoder/corner_match.h
+++ b/av1/encoder/corner_match.h
@@ -16,14 +16,14 @@
#include <memory.h>
typedef struct {
- double x, y;
- double rx, ry;
+ int x, y;
+ int rx, ry;
} Correspondence;
int determine_correspondence(unsigned char *frm, int *frm_corners,
int num_frm_corners, unsigned char *ref,
int *ref_corners, int num_ref_corners, int width,
int height, int frm_stride, int ref_stride,
- double *correspondence_pts);
+ int *correspondence_pts);
#endif // AV1_ENCODER_CORNER_MATCH_H_