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
b858f5cc
Commit
b858f5cc
authored
May 21, 2010
by
Paul Wilkins
Committed by
Code Review
May 21, 2010
Browse files
Merge "Fixed incorrect casts that broke rate control in some situations."
parents
f767a5a2
c012d63e
Changes
2
Show whitespace changes
Inline
Side-by-side
vp8/encoder/ratectrl.c
View file @
b858f5cc
...
...
@@ -1170,7 +1170,8 @@ void vp8_update_rate_correction_factors(VP8_COMP *cpi, int damp_var)
while
(
Z
>
0
)
{
Z
--
;
projected_size_based_on_q
*=
(
int
)
Factor
;
projected_size_based_on_q
=
(
int
)(
Factor
*
projected_size_based_on_q
);
Factor
+=
factor_adjustment
;
if
(
Factor
>=
0
.
999
)
...
...
@@ -1361,7 +1362,9 @@ int vp8_regulate_q(VP8_COMP *cpi, int target_bits_per_frame)
if
(
cpi
->
zbin_over_quant
>
zbin_oqmax
)
cpi
->
zbin_over_quant
=
zbin_oqmax
;
bits_per_mb_at_this_q
*=
(
int
)
Factor
;
// Each over-ruin step is assumed to equate to approximately 3% reduction in bitrate
// Each over-run step is assumed to equate to approximately
// 3% reduction in bitrate
bits_per_mb_at_this_q
=
(
int
)(
Factor
*
bits_per_mb_at_this_q
);
Factor
+=
factor_adjustment
;
if
(
Factor
>=
0
.
999
)
...
...
vp8/encoder/rdopt.c
View file @
b858f5cc
...
...
@@ -265,7 +265,7 @@ void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue)
if
(
oq_factor
>
(
1
.
0
+
((
double
)
cpi
->
zbin_over_quant
/
64
.
0
)))
oq_factor
=
(
1
.
0
+
(
double
)
cpi
->
zbin_over_quant
/
64
.
0
);
cpi
->
RDMULT
*
=
(
int
)
oq_factor
;
cpi
->
RDMULT
=
(
int
)
(
oq_factor
*
cpi
->
RDMULT
)
;
}
}
...
...
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