ref: 796478a8c9ef4004d919bb695934fb352793a2ad
parent: a1e87a57466fc3c76ef072328a8b68b0152c7f0a
parent: 4770f851a893123b76b204dad85a7a09dfb1b6ed
author: Jingning Han <jingning@google.com>
date: Thu Sep 20 23:32:01 EDT 2018
Merge "Update the comp_refs counts"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2027,8 +2027,10 @@
[has_second_ref(mi)]++;
if (has_second_ref(mi)) {
- counts->comp_ref[vp9_get_pred_context_comp_ref_p(cm, xd)]
- [ref0 == GOLDEN_FRAME]++;
+ const int idx = cm->ref_frame_sign_bias[cm->comp_fixed_ref];
+ const int ctx = vp9_get_pred_context_comp_ref_p(cm, xd);
+ const int bit = mi->ref_frame[!idx] == cm->comp_var_ref[1];
+ counts->comp_ref[ctx][bit]++;
} else {
counts->single_ref[vp9_get_pred_context_single_ref_p1(xd)][0]
[ref0 != LAST_FRAME]++;