Fix enum mixing in pass2_strategy.c
FRAME_UPDATE_TYPE does not have KEY_FRAME as a possible value.
It should be KF_UPDATE, which maps to the same value. The compiler
is not seeing this because the enums are wrapped in UENUM1BYTE which
maps them both to uint8_t.
Change-Id: I1762282e2cd15fd6347b59862898a1ad961c1083
diff --git a/av1/encoder/pass2_strategy.c b/av1/encoder/pass2_strategy.c
index 50984d4..bc7a4cb 100644
--- a/av1/encoder/pass2_strategy.c
+++ b/av1/encoder/pass2_strategy.c
@@ -1464,13 +1464,13 @@
for (int cur_index = 0; cur_index < gf_group->size; ++cur_index) {
const FRAME_UPDATE_TYPE cur_update_type = gf_group->update_type[cur_index];
if (oxcf->rc_cfg.mode == AOM_CBR) {
- if (cur_update_type == KEY_FRAME) {
+ if (cur_update_type == KF_UPDATE) {
target = av1_calc_iframe_target_size_one_pass_cbr(cpi);
} else {
target = av1_calc_pframe_target_size_one_pass_cbr(cpi, cur_update_type);
}
} else {
- if (cur_update_type == KEY_FRAME) {
+ if (cur_update_type == KF_UPDATE) {
target = av1_calc_iframe_target_size_one_pass_vbr(cpi);
} else {
target = av1_calc_pframe_target_size_one_pass_vbr(cpi, cur_update_type);