Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
9395b34e
Commit
9395b34e
authored
May 06, 2017
by
Yaowu Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to int64_t to avoid out-of-range
Change-Id: I64c523a34b4d69450759433e125a79e63d928037
parent
b5da9ee8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
av1/encoder/mcomp.c
av1/encoder/mcomp.c
+4
-3
No files found.
av1/encoder/mcomp.c
View file @
9395b34e
...
...
@@ -90,7 +90,8 @@ static INLINE int mv_cost(const MV *mv, const int *joint_cost,
int
av1_mv_bit_cost
(
const
MV
*
mv
,
const
MV
*
ref
,
const
int
*
mvjcost
,
int
*
mvcost
[
2
],
int
weight
)
{
const
MV
diff
=
{
mv
->
row
-
ref
->
row
,
mv
->
col
-
ref
->
col
};
return
ROUND_POWER_OF_TWO
(
mv_cost
(
&
diff
,
mvjcost
,
mvcost
)
*
weight
,
7
);
return
(
int
)
ROUND_POWER_OF_TWO
(
(
int64_t
)
mv_cost
(
&
diff
,
mvjcost
,
mvcost
)
*
weight
,
7
);
}
#define PIXEL_TRANSFORM_ERROR_SCALE 4
...
...
@@ -109,8 +110,8 @@ static int mv_err_cost(const MV *mv, const MV *ref, const int *mvjcost,
static
int
mvsad_err_cost
(
const
MACROBLOCK
*
x
,
const
MV
*
mv
,
const
MV
*
ref
,
int
sad_per_bit
)
{
const
MV
diff
=
{
(
mv
->
row
-
ref
->
row
)
*
8
,
(
mv
->
col
-
ref
->
col
)
*
8
};
return
ROUND_POWER_OF_TWO
(
(
unsigned
)
mv_cost
(
&
diff
,
x
->
nmvjointsadcost
,
x
->
mvsadcost
)
*
sad_per_bit
,
return
(
int
)
ROUND_POWER_OF_TWO
(
(
int64_t
)
mv_cost
(
&
diff
,
x
->
nmvjointsadcost
,
x
->
mvsadcost
)
*
sad_per_bit
,
AV1_PROB_COST_SHIFT
);
}
...
...
Write
Preview
Markdown
is supported
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