summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-09-11 04:04:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-09-11 04:04:31 +0000
commita2192701b1ff5f79bc53f75199f2d9e3bc42df12 (patch)
treea469016cb6aa74b3c446a438a0522b16098447e8 /vp9/encoder
parente407b1a616aaec55f0dd2957e23026b0375b5d64 (diff)
parent9868499e4b6a2f986017c62a5adc6f1933fe992f (diff)
downloadlibvpx-a2192701b1ff5f79bc53f75199f2d9e3bc42df12.tar
libvpx-a2192701b1ff5f79bc53f75199f2d9e3bc42df12.tar.gz
libvpx-a2192701b1ff5f79bc53f75199f2d9e3bc42df12.tar.bz2
libvpx-a2192701b1ff5f79bc53f75199f2d9e3bc42df12.zip
Merge "Rework two_pass_first_group_inter()"
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;
}