Properly update eob state in first pass coeff decode

Update the last coefficient position whose level is above
NUM_BASE_LEVELS in the first pass decoding. This increases the
lv-map txb decode speed by 10%.

Change-Id: Ib35409a1d374c1e171ee45ac805a3a318793935e
diff --git a/av1/decoder/decodetxb.c b/av1/decoder/decodetxb.c
index de157ad..9d400b7 100644
--- a/av1/decoder/decodetxb.c
+++ b/av1/decoder/decodetxb.c
@@ -180,7 +180,11 @@
     //            ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][0]>>7,
     //            ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][1]>>7,
     //            ec_ctx->coeff_base_cdf[txs_ctx][plane_type][coeff_ctx][2]>>7);
-    if (level < 3) cul_level += level;
+    if (level < 3) {
+      cul_level += level;
+    } else if (update_eob < 0) {
+      update_eob = c;
+    }
 #else
     int is_nz;
     int coeff_ctx = get_nz_map_ctx(levels, c, scan, bwl, height, tx_type);
@@ -216,14 +220,13 @@
       }
       levels[get_paded_idx(scan[c], bwl)] = k + 1;
       *max_scan_line = AOMMAX(*max_scan_line, scan[c]);
+      if (update_eob < 0 && k == NUM_BASE_LEVELS) update_eob = c;
     }
 #endif
 #endif
   }
 
-#if USE_CAUSAL_BASE_CTX
-  update_eob = *eob - 1;
-#else
+#if !USE_CAUSAL_BASE_CTX
   int i;
   for (i = 0; i < NUM_BASE_LEVELS; ++i) {
     av1_get_base_level_counts(levels, i, width, height, level_counts);