Commit 0a981101 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Fix allocation for least squares

Change-Id: I663a63a1b97b529142ea92bcf7f9270a1df838f5
parent 0ba850ea
......@@ -294,7 +294,7 @@ static int find_translation(int np, double *pts1, double *pts2, double *mat) {
static int find_rotzoom(int np, double *pts1, double *pts2, double *mat) {
const int np2 = np * 2;
double *a = (double *)aom_malloc(sizeof(*a) * np2 * 10);
double *a = (double *)aom_malloc(sizeof(*a) * (np2 * 5 + 20));
double *b = a + np2 * 4;
double *temp = b + np2;
int i;
......@@ -333,7 +333,7 @@ static int find_rotzoom(int np, double *pts1, double *pts2, double *mat) {
static int find_affine(int np, double *pts1, double *pts2, double *mat) {
const int np2 = np * 2;
double *a = (double *)aom_malloc(sizeof(*a) * np2 * 14);
double *a = (double *)aom_malloc(sizeof(*a) * (np2 * 7 + 42));
double *b = a + np2 * 6;
double *temp = b + np2;
int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment