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:
Arttu Ylä-Outinen 2017-07-06 13:20:31 +03:00
parent 563bc26e71
commit 67a60a35e3

View file

@ -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);
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);