Support affine/homography models for global motion With this patch affine or homography models can be enabled by simply changing the value of the GLOBAL_TRANS_TYPES macro in common/mv.h to 4 and 5 respectively. Currently it is left at supporting only rotzoom. There is a small gain with enabling affine. Also refactors costing to change based on the model type. Change-Id: I46c1759de06c42c176c64ec21307ff347ddcc259
diff --git a/av1/common/mv.h b/av1/common/mv.h index a591329..cd4b4e6 100644 --- a/av1/common/mv.h +++ b/av1/common/mv.h
@@ -55,14 +55,14 @@ typedef enum { IDENTITY = 0, // identity transformation, 0-parameter TRANSLATION = 1, // translational motion 2-parameter - ROTZOOM = 2, // simplified affine with rotation and zoom only, 4-parameter + ROTZOOM = 2, // simplified affine with rotation + zoom only, 4-parameter AFFINE = 3, // affine, 6-parameter HOMOGRAPHY = 4, // homography, 8-parameter TRANS_TYPES = 5, } TransformationType; /* clang-format on */ -// Number of types used for global motion (must be <= TRANS_TYPES) +// Number of types used for global motion (must be >= 3 and <= TRANS_TYPES) #define GLOBAL_TRANS_TYPES 3 // number of parameters used by each transformation in TransformationTypes