AV1 RT: Fix 10 bit enc/dec mismatch
Reusing luma inter prediction only works for 8-bit content. Fixing the
condition when it is used
BUG=aomedia:2941
Change-Id: Id0cd5a5929f5bdd983240ba9b6d1133d325f3399
(cherry picked from commit fb9f22ce8c54e277e5162d8643a1a254dcc5173a)
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index 5831881..702987c 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -2097,8 +2097,8 @@
PRED_BUFFER tmp[4];
DECLARE_ALIGNED(16, uint8_t, pred_buf[3 * 128 * 128]);
PRED_BUFFER *this_mode_pred = NULL;
- const int reuse_inter_pred =
- cpi->sf.rt_sf.reuse_inter_pred_nonrd && cm->seq_params.bit_depth == 8;
+ const int reuse_inter_pred = cpi->sf.rt_sf.reuse_inter_pred_nonrd &&
+ cm->seq_params.bit_depth == AOM_BITS_8;
const int bh = block_size_high[bsize];
const int bw = block_size_wide[bsize];
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index 5d2c503..b50bbd5 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -278,7 +278,10 @@
av1_setup_pre_planes(xd, ref, cfg, mi_row, mi_col,
xd->block_ref_scale_factors[ref], num_planes);
}
- int start_plane = (cpi->sf.rt_sf.reuse_inter_pred_nonrd) ? 1 : 0;
+ const int start_plane = (cpi->sf.rt_sf.reuse_inter_pred_nonrd &&
+ cm->seq_params.bit_depth == AOM_BITS_8)
+ ? 1
+ : 0;
av1_enc_build_inter_predictor(cm, xd, mi_row, mi_col, NULL, bsize,
start_plane, av1_num_planes(cm) - 1);
if (mbmi->motion_mode == OBMC_CAUSAL) {