Fix pvq for ext-tile

Change-Id: I2011f113cf6a66a766c1c754b4d47e913ba54689
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 2a6a25b..382d5cc 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3971,6 +3971,10 @@
       this_tile->tctx = *cm->fc;
       cpi->td.mb.e_mbd.tile_ctx = &this_tile->tctx;
 #endif
+#if CONFIG_PVQ
+      cpi->td.mb.pvq_q = &this_tile->pvq_q;
+      cpi->td.mb.daala_enc.state.adapt = &this_tile->tctx.pvq_context;
+#endif  // CONFIG_PVQ
 #if !CONFIG_ANS
       aom_start_encode(&mode_bc, buf->data + data_offset);
       write_modes(cpi, &tile_info, &mode_bc, &tok, tok_end);
@@ -3984,7 +3988,9 @@
       aom_buf_ans_flush(buf_ans);
       tile_size = buf_ans_write_end(buf_ans);
 #endif  // !CONFIG_ANS
-
+#if CONFIG_PVQ
+      cpi->td.mb.pvq_q = NULL;
+#endif
       buf->size = tile_size;
 
       // Record the maximum tile size we see, so we can compact headers later.