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
39b97318
Commit
39b97318
authored
May 28, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
May 28, 2014
Browse files
Merge "Using 2 instead of 3 elements for last_q array."
parents
377950f1
edccfceb
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_ratectrl.c
View file @
39b97318
...
...
@@ -200,9 +200,8 @@ void vp9_rc_init(const VP9EncoderConfig *oxcf, int pass, RATE_CONTROL *rc) {
oxcf
->
best_allowed_q
)
/
2
;
}
rc
->
last_q
[
0
]
=
oxcf
->
best_allowed_q
;
rc
->
last_q
[
1
]
=
oxcf
->
best_allowed_q
;
rc
->
last_q
[
2
]
=
oxcf
->
best_allowed_q
;
rc
->
last_q
[
KEY_FRAME
]
=
oxcf
->
best_allowed_q
;
rc
->
last_q
[
INTER_FRAME
]
=
oxcf
->
best_allowed_q
;
rc
->
buffer_level
=
oxcf
->
starting_buffer_level
;
rc
->
bits_off_target
=
oxcf
->
starting_buffer_level
;
...
...
@@ -1090,7 +1089,6 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
}
else
if
(
!
rc
->
is_src_frame_alt_ref
&&
(
cpi
->
refresh_golden_frame
||
cpi
->
refresh_alt_ref_frame
)
&&
!
(
cpi
->
use_svc
&&
oxcf
->
rc_mode
==
RC_MODE_CBR
))
{
rc
->
last_q
[
2
]
=
qindex
;
rc
->
avg_frame_qindex
[
2
]
=
ROUND_POWER_OF_TWO
(
3
*
rc
->
avg_frame_qindex
[
2
]
+
qindex
,
2
);
}
else
{
...
...
vp9/encoder/vp9_ratectrl.h
View file @
39b97318
...
...
@@ -30,7 +30,7 @@ typedef struct {
int
this_frame_target
;
// Actual frame target after rc adjustment.
int
projected_frame_size
;
int
sb64_target_rate
;
int
last_q
[
3
];
// Separate values for Intra/Inter
/ARF-GF
int
last_q
[
FRAME_TYPES
];
// Separate values for Intra/Inter
int
last_boosted_qindex
;
// Last boosted GF/KF/ARF q
int
gfu_boost
;
...
...
vp9/encoder/vp9_svc_layercontext.c
View file @
39b97318
...
...
@@ -50,9 +50,8 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
lrc
->
last_q
[
INTER_FRAME
]
=
oxcf
->
worst_allowed_q
;
}
else
{
lc
->
target_bandwidth
=
oxcf
->
ss_target_bitrate
[
layer
];
lrc
->
last_q
[
0
]
=
oxcf
->
best_allowed_q
;
lrc
->
last_q
[
1
]
=
oxcf
->
best_allowed_q
;
lrc
->
last_q
[
2
]
=
oxcf
->
best_allowed_q
;
lrc
->
last_q
[
KEY_FRAME
]
=
oxcf
->
best_allowed_q
;
lrc
->
last_q
[
INTER_FRAME
]
=
oxcf
->
best_allowed_q
;
}
lrc
->
buffer_level
=
vp9_rescale
((
int
)(
oxcf
->
starting_buffer_level
),
...
...
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