Fix CONFIG_PVQ support in the CMake build.
Wrap usages and declaration of av1_set_txb_context with
CONFIG_PVQ preproc checks.
BUG=aomedia:683
Change-Id: I2080d7437ebe1741232eb5e4e83a430279c913a0
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index c5f1c5c..506a4f0 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -459,7 +459,7 @@
};
#endif // !CONFIG_PVQ
-#if !CONFIG_TXMG
+#if !CONFIG_TXMG && !CONFIG_PVQ
typedef void (*fwdTxfmFunc)(const int16_t *diff, tran_low_t *coeff, int stride,
TxfmParam *txfm_param);
static const fwdTxfmFunc fwd_txfm_func[2] = { av1_fwd_txfm,
diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h
index 65476bc..179e805 100644
--- a/av1/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -63,8 +63,10 @@
void av1_subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
+#if !CONFIG_PVQ
void av1_set_txb_context(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size,
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l);
+#endif
void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index dedb096..4d3b111 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -4876,7 +4876,9 @@
if (rd_stats->rate == INT_MAX) return;
+#if !CONFIG_PVQ
av1_set_txb_context(x, plane, 0, quarter_txsize, pta, ptl);
+#endif // !CONFIG_PVQ
coeff_ctx = get_entropy_context(quarter_txsize, pta + blk_col_offset,
ptl + blk_row_offset);
zero_blk_rate =
@@ -5100,12 +5102,14 @@
}
#endif
+#if !CONFIG_PVQ
av1_set_txb_context(x, plane, block, tx_size_selected, pta, ptl);
#if CONFIG_RECT_TX_EXT
if (is_qttx_picked)
av1_set_txb_context(x, plane, block_offset_qttx, tx_size_selected,
pta + blk_col_offset, ptl + blk_row_offset);
-#endif
+#endif // CONFIG_RECT_TX_EXT
+#endif // !CONFIG_PVQ
txfm_partition_update(tx_above + blk_col, tx_left + blk_row, tx_size,
tx_size);
@@ -5397,7 +5401,9 @@
ENTROPY_CONTEXT *tl = left_ctx + blk_row;
av1_tx_block_rd_b(cpi, x, tx_size, blk_row, blk_col, plane, block,
plane_bsize, ta, tl, rd_stats);
+#if !CONFIG_PVQ
av1_set_txb_context(x, plane, block, tx_size, ta, tl);
+#endif // !CONFIG_PVQ
} else {
const TX_SIZE sub_txs = sub_tx_size_map[tx_size];
const int bsl = tx_size_wide_unit[sub_txs];