mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Fix invalid calls to normalize_lcu_weights
Changes encoder_state_init_new_frame to only call normalize_lcu_weights when the weights have been written to the array and rate control is enabled. When rate control is disabled, the weights are not used.
This commit is contained in:
parent
563bc26e71
commit
67a60a35e3
|
@ -1228,7 +1228,9 @@ static void encoder_state_init_new_frame(encoder_state_t * const state, kvz_pict
|
|||
encoder_state_remove_refs(state);
|
||||
encoder_state_ref_sort(state);
|
||||
|
||||
normalize_lcu_weights(state);
|
||||
if (cfg->target_bitrate > 0 && state->frame->num > cfg->owf) {
|
||||
normalize_lcu_weights(state);
|
||||
}
|
||||
kvz_set_picture_lambda_and_qp(state);
|
||||
|
||||
encoder_state_init_children(state);
|
||||
|
|
Loading…
Reference in a new issue