Resolve compiler errors in lv-map and var-tx

Change-Id: I1939cfe48570d9c797fd29d12ebcc9213388951a
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 4619922..7d482f0 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -590,10 +590,9 @@
     PLANE_TYPE plane_type = get_plane_type(plane);
     int block_idx = get_block_idx(xd, plane, blk_row, blk_col);
 #if CONFIG_LV_MAP
-    (void)segment_id;
     int16_t max_scan_line = 0;
     int eob;
-    av1_read_coeffs_txb_facade(cm, xd, r, row, col, block_idx, plane,
+    av1_read_coeffs_txb_facade(cm, xd, r, blk_row, blk_col, block_idx, plane,
                                pd->dqcoeff, &max_scan_line, &eob);
     // tx_type will be read out in av1_read_coeffs_txb_facade
     TX_TYPE tx_type = get_tx_type(plane_type, xd, block_idx, plane_tx_size);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4da7ba4..8b5aeeb 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1132,7 +1132,7 @@
 }
 #endif  // !CONFIG_PVG
 
-#if CONFIG_VAR_TX && !CONFIG_COEF_INTERLEAVE
+#if CONFIG_VAR_TX && !CONFIG_COEF_INTERLEAVE && !CONFIG_LV_MAP
 static void pack_txb_tokens(aom_writer *w, const TOKENEXTRA **tp,
                             const TOKENEXTRA *const tok_end,
 #if CONFIG_PVQ
@@ -2607,12 +2607,22 @@
         const int bkh = tx_size_high_unit[max_tx_size];
         for (row = 0; row < num_4x4_h; row += bkh) {
           for (col = 0; col < num_4x4_w; col += bkw) {
+#if CONFIG_LV_MAP
+            tran_low_t *tcoeff =
+                BLOCK_OFFSET(x->mbmi_ext->tcoeff[plane], block);
+            uint16_t eob = x->mbmi_ext->eobs[plane][block];
+            TXB_CTX txb_ctx = { x->mbmi_ext->txb_skip_ctx[plane][block],
+                                x->mbmi_ext->dc_sign_ctx[plane][block] };
+            av1_write_coeffs_txb(cm, xd, w, block, plane, tcoeff, eob,
+                                 &txb_ctx);
+#else
             pack_txb_tokens(w, tok, tok_end,
 #if CONFIG_PVQ
                             x,
 #endif
                             xd, mbmi, plane, plane_bsize, cm->bit_depth, block,
                             row, col, max_tx_size, &token_stats);
+#endif  // CONFIG_LV_MAP
             block += step;
           }
         }
@@ -2624,6 +2634,9 @@
         }
 #endif  // CONFIG_RD_DEBUG
       } else {
+#if CONFIG_LV_MAP
+        av1_write_coeffs_mb(cm, x, w, plane);
+#else
         TX_SIZE tx = get_tx_size(plane, xd);
 #if CONFIG_CB4X4 && !CONFIG_CHROMA_2X2
         tx = AOMMAX(TX_4X4, tx);
@@ -2639,6 +2652,7 @@
 #endif
           }
         }
+#endif  // CONFIG_LV_MAP
       }
 #else
       TX_SIZE tx = get_tx_size(plane, xd);