Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
cda23457
Commit
cda23457
authored
Sep 07, 2016
by
Sarah Parker
Committed by
Gerrit Code Review
Sep 07, 2016
Browse files
Merge "Adjust types in hbd error computation to avoid overflow" into nextgenv2
parents
1d22837f
ca92da75
Changes
1
Hide whitespace changes
Inline
Side-by-side
av1/common/warped_motion.c
View file @
cda23457
...
...
@@ -477,7 +477,7 @@ static double highbd_warp_erroradv(WarpedMotionParams *wm, uint8_t *ref8,
uint16_t
*
dst
=
CONVERT_TO_SHORTPTR
(
dst8
);
uint16_t
*
ref
=
CONVERT_TO_SHORTPTR
(
ref8
);
int
gm_err
=
0
,
no_gm_err
=
0
;
int
gm_sumerr
=
0
,
no_gm_sumerr
=
0
;
int
64_t
gm_sumerr
=
0
,
no_gm_sumerr
=
0
;
for
(
i
=
p_row
;
i
<
p_row
+
p_height
;
++
i
)
{
for
(
j
=
p_col
;
j
<
p_col
+
p_width
;
++
j
)
{
int
in
[
2
],
out
[
2
];
...
...
@@ -492,8 +492,8 @@ static double highbd_warp_erroradv(WarpedMotionParams *wm, uint8_t *ref8,
stride
,
bd
);
no_gm_err
=
dst
[(
j
-
p_col
)
+
(
i
-
p_row
)
*
p_stride
]
-
ref
[(
j
-
p_col
)
+
(
i
-
p_row
)
*
stride
];
gm_sumerr
+=
gm_err
*
gm_err
;
no_gm_sumerr
+=
no_gm_err
*
no_gm_err
;
gm_sumerr
+=
(
int64_t
)
gm_err
*
gm_err
;
no_gm_sumerr
+=
(
int64_t
)
no_gm_err
*
no_gm_err
;
}
}
return
(
double
)
gm_sumerr
/
no_gm_sumerr
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment