Skip to content
GitLab
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
897dd193
Commit
897dd193
authored
Aug 02, 2017
by
Yaowu Xu
Browse files
Avoid the use of INT_MAX in rate computation
BUG=aomedia:676 Change-Id: I278e84de26d995419b85039f7b78b8324cadf3a3
parent
708e08b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
av1/encoder/encodeframe.c
View file @
897dd193
...
...
@@ -3558,10 +3558,13 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
bsize
,
ctx_none
,
best_rdc
.
rdcost
);
if
(
this_rdc
.
rate
!=
INT_MAX
)
{
if
(
bsize_at_least_8x8
)
{
this_rdc
.
rate
+=
partition_cost
[
PARTITION_NONE
];
const
int
pt_cost
=
partition_cost
[
PARTITION_NONE
]
<
INT_MAX
?
partition_cost
[
PARTITION_NONE
]
:
0
;
this_rdc
.
rate
+=
pt_cost
;
this_rdc
.
rdcost
=
RDCOST
(
x
->
rdmult
,
this_rdc
.
rate
,
this_rdc
.
dist
);
#if CONFIG_SUPERTX
this_rate_nocoef
+=
p
artition_cost
[
PARTITION_NONE
]
;
this_rate_nocoef
+=
p
t_cost
;
#endif
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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