1 /* 2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved 3 * 4 * This source code is subject to the terms of the BSD 2 Clause License and 5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License 6 * was not distributed with this source code in the LICENSE file, you can 7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open 8 * Media Patent License 1.0 was not distributed with this source code in the 9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 10 */ 11 12 #ifndef AOM_AOM_DSP_FLOW_ESTIMATION_CORNER_MATCH_H_ 13 #define AOM_AOM_DSP_FLOW_ESTIMATION_CORNER_MATCH_H_ 14 15 #include <stdio.h> 16 #include <stdlib.h> 17 #include <memory.h> 18 19 #include "aom_dsp/flow_estimation/flow_estimation.h" 20 #include "aom_scale/yv12config.h" 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 #define MATCH_SZ 13 27 #define MATCH_SZ_BY2 ((MATCH_SZ - 1) / 2) 28 #define MATCH_SZ_SQ (MATCH_SZ * MATCH_SZ) 29 30 typedef struct { 31 int x, y; 32 int rx, ry; 33 } Correspondence; 34 35 int aom_determine_correspondence(unsigned char *src, int *src_corners, 36 int num_src_corners, unsigned char *ref, 37 int *ref_corners, int num_ref_corners, 38 int width, int height, int src_stride, 39 int ref_stride, int *correspondence_pts); 40 41 int av1_compute_global_motion_feature_based( 42 TransformationType type, unsigned char *src_buffer, int src_width, 43 int src_height, int src_stride, int *src_corners, int num_src_corners, 44 YV12_BUFFER_CONFIG *ref, int bit_depth, int *num_inliers_by_motion, 45 MotionModel *params_by_motion, int num_motions); 46 47 #ifdef __cplusplus 48 } 49 #endif 50 51 #endif // AOM_AOM_DSP_FLOW_ESTIMATION_CORNER_MATCH_H_ 52