Remove some unneeded type conversions.
This commit is contained in:
@@ -212,7 +212,7 @@ void BKE_tracking_settings_init(MovieTracking *tracking)
|
||||
tracking->settings.default_algorithm_flag |= TRACK_ALGORITHM_FLAG_USE_BRUTE;
|
||||
tracking->settings.dist = 1;
|
||||
tracking->settings.object_distance = 1;
|
||||
tracking->settings.reconstruction_success_threshold = 1e-3;
|
||||
tracking->settings.reconstruction_success_threshold = 1e-3f;
|
||||
|
||||
tracking->stabilization.scaleinf = 1.0f;
|
||||
tracking->stabilization.locinf = 1.0f;
|
||||
@@ -2053,8 +2053,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
|
||||
|
||||
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
|
||||
|
||||
delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
|
||||
delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
|
||||
|
||||
/* top edge */
|
||||
pos[0] = a;
|
||||
@@ -2062,8 +2062,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
|
||||
|
||||
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
|
||||
|
||||
delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
|
||||
delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
|
||||
|
||||
if (a >= rect->xmax)
|
||||
break;
|
||||
@@ -2079,8 +2079,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
|
||||
|
||||
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
|
||||
|
||||
delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
|
||||
delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
|
||||
|
||||
/* right edge */
|
||||
pos[0] = rect->xmax;
|
||||
@@ -2088,8 +2088,8 @@ void BKE_tracking_max_undistortion_delta_across_bound(MovieTracking *tracking, r
|
||||
|
||||
BKE_tracking_undistort_v2(tracking, pos, warped_pos);
|
||||
|
||||
delta[0] = max_ff(delta[0], fabs(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabs(pos[1] - warped_pos[1]));
|
||||
delta[0] = max_ff(delta[0], fabsf(pos[0] - warped_pos[0]));
|
||||
delta[1] = max_ff(delta[1], fabsf(pos[1] - warped_pos[1]));
|
||||
|
||||
if (a >= rect->ymax)
|
||||
break;
|
||||
@@ -3346,7 +3346,7 @@ typedef struct MovieReconstructContext {
|
||||
struct libmv_Tracks *tracks;
|
||||
bool select_keyframes;
|
||||
int keyframe1, keyframe2;
|
||||
short refine_flags;
|
||||
int refine_flags;
|
||||
|
||||
struct libmv_Reconstruction *reconstruction;
|
||||
|
||||
@@ -4077,7 +4077,7 @@ static bool stabilization_median_point_get(MovieTracking *tracking, int framenr,
|
||||
*
|
||||
* NOTE: frame number should be in clip space, not scene space
|
||||
*/
|
||||
static void stabilization_calculate_data(MovieTracking *tracking, int framenr, float width, float height,
|
||||
static void stabilization_calculate_data(MovieTracking *tracking, int framenr, int width, int height,
|
||||
float firstmedian[2], float median[2],
|
||||
float translation[2], float *scale, float *angle)
|
||||
{
|
||||
@@ -4107,7 +4107,7 @@ static void stabilization_calculate_data(MovieTracking *tracking, int framenr, f
|
||||
b[0] *= width;
|
||||
b[1] *= height;
|
||||
|
||||
*angle = -atan2(a[0] * b[1] - a[1] * b[0], a[0] * b[0] + a[1] * b[1]);
|
||||
*angle = -atan2f(a[0] * b[1] - a[1] * b[0], a[0] * b[0] + a[1] * b[1]);
|
||||
*angle *= stab->rotinf;
|
||||
|
||||
/* convert to rotation around image center */
|
||||
@@ -4167,8 +4167,8 @@ static float stabilization_calculate_autoscale_factor(MovieTracking *tracking, i
|
||||
|
||||
BKE_tracking_stabilization_data_to_mat4(width, height, aspect, translation, 1.0f, angle, mat);
|
||||
|
||||
si = sin(angle);
|
||||
co = cos(angle);
|
||||
si = sinf(angle);
|
||||
co = cosf(angle);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
int j;
|
||||
@@ -4307,7 +4307,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieTracking *tracking, int framenr, ImBuf
|
||||
float tloc[2], tscale, tangle;
|
||||
MovieTrackingStabilization *stab = &tracking->stabilization;
|
||||
ImBuf *tmpibuf;
|
||||
float width = ibuf->x, height = ibuf->y;
|
||||
int width = ibuf->x, height = ibuf->y;
|
||||
float aspect = tracking->camera.pixel_aspect;
|
||||
float mat[4][4];
|
||||
int j, filter = tracking->stabilization.filter;
|
||||
@@ -4369,7 +4369,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieTracking *tracking, int framenr, ImBuf
|
||||
for (j = 0; j < tmpibuf->y; j++) {
|
||||
int i;
|
||||
for (i = 0; i < tmpibuf->x; i++) {
|
||||
float vec[3] = {i, j, 0};
|
||||
float vec[3] = {i, j, 0.0f};
|
||||
|
||||
mul_v3_m4v3(vec, mat, vec);
|
||||
|
||||
|
Reference in New Issue
Block a user