summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorangiebird <angiebird@google.com>2019-10-11 16:11:23 -0700
committerangiebird <angiebird@google.com>2019-10-11 16:11:23 -0700
commit4398e0151109c16b531ed49bcd2686860ab193b3 (patch)
tree00dbc493e1a7b0882b265721cdee69386a315689 /vp9/encoder
parent412547ad4b759e139b626f523b313c87debc6639 (diff)
downloadlibvpx-4398e0151109c16b531ed49bcd2686860ab193b3.tar
libvpx-4398e0151109c16b531ed49bcd2686860ab193b3.tar.gz
libvpx-4398e0151109c16b531ed49bcd2686860ab193b3.tar.bz2
libvpx-4398e0151109c16b531ed49bcd2686860ab193b3.zip
Simplify the if clause in define_gf_group
Change-Id: I70a06a4f48c5a215831d8b6e918eebc3041ef65a
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_firstpass.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 6f91836e7..d3600e582 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2643,17 +2643,19 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// such as a fade, the arf group spanning the transition may not be coded
// at a very high quality and hence this frame (with its overlay) is a
// poor golden frame to use for an extended group.
- if (((i >= active_max_gf_interval) &&
- ((zero_motion_accumulator < 0.995) || (rc->source_alt_ref_active))) ||
- (
- // Don't break out with a very short interval.
- (i >= active_min_gf_interval) &&
- // If possible dont break very close to a kf
- ((rc->frames_to_key - i) >= rc->min_gf_interval) && (i & 0x01) &&
- (!flash_detected) &&
- ((mv_ratio_accumulator > mv_ratio_accumulator_thresh) ||
- (abs_mv_in_out_accumulator > abs_mv_in_out_thresh) ||
- (sr_accumulator > gop_intra_factor * next_frame.intra_error)))) {
+ if ((i >= active_max_gf_interval) &&
+ ((zero_motion_accumulator < 0.995) || (rc->source_alt_ref_active))) {
+ break;
+ }
+ if (
+ // Don't break out with a very short interval.
+ (i >= active_min_gf_interval) &&
+ // If possible dont break very close to a kf
+ ((rc->frames_to_key - i) >= rc->min_gf_interval) && (i & 0x01) &&
+ (!flash_detected) &&
+ ((mv_ratio_accumulator > mv_ratio_accumulator_thresh) ||
+ (abs_mv_in_out_accumulator > abs_mv_in_out_thresh) ||
+ (sr_accumulator > gop_intra_factor * next_frame.intra_error))) {
break;
}