summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encoder.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 7fcd5dbe1..226856e8a 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2921,9 +2921,12 @@ static int big_rate_miss(VP9_COMP *cpi) {
static int two_pass_first_group_inter(VP9_COMP *cpi) {
TWO_PASS *const twopass = &cpi->twopass;
GF_GROUP *const gf_group = &twopass->gf_group;
- if ((cpi->oxcf.pass == 2) &&
- (gf_group->index == gf_group->first_inter_index)) {
- return 1;
+ const int gfg_index = gf_group->index;
+
+ if (cpi->oxcf.pass == 2) {
+ if (gfg_index == 0) return gf_group->update_type[gfg_index] == LF_UPDATE;
+ return gf_group->update_type[gfg_index - 1] != LF_UPDATE &&
+ gf_group->update_type[gfg_index] == LF_UPDATE;
} else {
return 0;
}