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
5db51540
Commit
5db51540
authored
Apr 08, 2014
by
Dmitry Kovalev
Browse files
Applying q_trans[] inside set_encoder_config().
Change-Id: Ib64edeb58b3e25488fb85bbe85c9decb15b4d0a1
parent
c27bdb9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
5db51540
...
...
@@ -821,10 +821,6 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
break
;
}
cpi
->
oxcf
.
worst_allowed_q
=
q_trans
[
oxcf
->
worst_allowed_q
];
cpi
->
oxcf
.
best_allowed_q
=
q_trans
[
oxcf
->
best_allowed_q
];
cpi
->
oxcf
.
cq_level
=
q_trans
[
cpi
->
oxcf
.
cq_level
];
cpi
->
oxcf
.
lossless
=
oxcf
->
lossless
;
if
(
cpi
->
oxcf
.
lossless
)
{
// In lossless mode, make sure right quantizer range and correct transform
...
...
vp9/encoder/vp9_svc_layercontext.c
View file @
5db51540
...
...
@@ -32,8 +32,8 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
LAYER_CONTEXT
*
const
lc
=
&
svc
->
layer_context
[
layer
];
RATE_CONTROL
*
const
lrc
=
&
lc
->
rc
;
lc
->
current_video_frame_in_layer
=
0
;
lrc
->
avg_frame_qindex
[
INTER_FRAME
]
=
q_trans
[
oxcf
->
worst_allowed_q
]
;
lrc
->
ni_av_qi
=
q_trans
[
oxcf
->
worst_allowed_q
]
;
lrc
->
avg_frame_qindex
[
INTER_FRAME
]
=
oxcf
->
worst_allowed_q
;
lrc
->
ni_av_qi
=
oxcf
->
worst_allowed_q
;
lrc
->
total_actual_bits
=
0
;
lrc
->
total_target_vs_actual
=
0
;
lrc
->
ni_tot_qi
=
0
;
...
...
@@ -47,12 +47,12 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
if
(
svc
->
number_temporal_layers
>
1
)
{
lc
->
target_bandwidth
=
oxcf
->
ts_target_bitrate
[
layer
]
*
1000
;
lrc
->
last_q
[
INTER_FRAME
]
=
q_trans
[
oxcf
->
worst_allowed_q
]
;
lrc
->
last_q
[
INTER_FRAME
]
=
oxcf
->
worst_allowed_q
;
}
else
{
lc
->
target_bandwidth
=
oxcf
->
ss_target_bitrate
[
layer
]
*
1000
;
lrc
->
last_q
[
0
]
=
q_trans
[
oxcf
->
best_allowed_q
]
;
lrc
->
last_q
[
1
]
=
q_trans
[
oxcf
->
best_allowed_q
]
;
lrc
->
last_q
[
2
]
=
q_trans
[
oxcf
->
best_allowed_q
]
;
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
->
buffer_level
=
vp9_rescale
((
int
)(
oxcf
->
starting_buffer_level
),
...
...
vp9/vp9_cx_iface.c
View file @
5db51540
...
...
@@ -313,9 +313,9 @@ static vpx_codec_err_t set_encoder_config(VP9_CONFIG *oxcf,
oxcf
->
target_bandwidth
=
cfg
->
rc_target_bitrate
;
oxcf
->
rc_max_intra_bitrate_pct
=
extra_cfg
->
rc_max_intra_bitrate_pct
;
oxcf
->
best_allowed_q
=
cfg
->
rc_min_quantizer
;
oxcf
->
worst_allowed_q
=
cfg
->
rc_max_quantizer
;
oxcf
->
cq_level
=
extra_cfg
->
cq_level
;
oxcf
->
best_allowed_q
=
q_trans
[
cfg
->
rc_min_quantizer
]
;
oxcf
->
worst_allowed_q
=
q_trans
[
cfg
->
rc_max_quantizer
]
;
oxcf
->
cq_level
=
q_trans
[
extra_cfg
->
cq_level
]
;
oxcf
->
fixed_q
=
-
1
;
oxcf
->
under_shoot_pct
=
cfg
->
rc_undershoot_pct
;
...
...
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