ref: 801f136be2c605a867f41f10267fef057348f65b
parent: 28cd97281051229a14d3795cbc6cead91de475cf
author: Alex Converse <[email protected]>
date: Wed Feb 26 11:46:21 EST 2014
Don't let GOLDEN_FRAME turn off LAST_FRAME as a reference when GOLDEN_FRAME is disabled. There was a bug in the previous code that if GOLDEN was better than LAST neither would be used. LAST would get turned off due to superior GOLDEN quality then all GOLDEN modes would get skipped. Change-Id: I173f3720451707dab7b2cbbe8b8e6a047089bde7
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -491,18 +491,6 @@
sf->thresh_mult[THR_D207_PRED] += 2500;
sf->thresh_mult[THR_D63_PRED] += 2500;
- // disable using golden frame modes if golden frames are not being used
- if (cpi->rc.frames_till_gf_update_due == INT_MAX) {
- sf->thresh_mult[THR_NEARESTG ] = INT_MAX;
- sf->thresh_mult[THR_ZEROG ] = INT_MAX;
- sf->thresh_mult[THR_NEARG ] = INT_MAX;
- sf->thresh_mult[THR_NEWG ] = INT_MAX;
- sf->thresh_mult[THR_COMP_ZEROGA ] = INT_MAX;
- sf->thresh_mult[THR_COMP_NEARESTGA] = INT_MAX;
- sf->thresh_mult[THR_COMP_NEARGA ] = INT_MAX;
- sf->thresh_mult[THR_COMP_NEWGA ] = INT_MAX;
- }
-
/* disable frame modes if flags not set */
if (!(cpi->ref_frame_flags & VP9_LAST_FLAG)) {
sf->thresh_mult[THR_NEWMV ] = INT_MAX;
@@ -3070,6 +3058,9 @@
cpi->ref_frame_flags = VP9_ALT_FLAG | VP9_GOLD_FLAG | VP9_LAST_FLAG;
if (cpi->gold_is_last)
+ cpi->ref_frame_flags &= ~VP9_GOLD_FLAG;
+
+ if (cpi->rc.frames_till_gf_update_due == INT_MAX)
cpi->ref_frame_flags &= ~VP9_GOLD_FLAG;
if (cpi->alt_is_last)