Inter and intra LGTs
Here we have an LGT to replace ADST for intra residual blocks, and
another LGT to replace ADST for inter residual blocks. The changes
are only applied to transform length 4 and 8, and only for the
lowbitdepth path.
lowres: -0.18%
Change-Id: Iadc1e02b53e3756b44f74ca648cfa8b0e8ca7af4
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 1d9acf1..1c2371f 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -1077,6 +1077,18 @@
return (tx_size == TX_4X4) ? raster_order : (raster_order > 0) ? 2 : 0;
}
+#if CONFIG_DPCM_INTRA || CONFIG_LGT
+static INLINE PREDICTION_MODE get_prediction_mode(const MODE_INFO *mi,
+ int plane, TX_SIZE tx_size,
+ int block_idx) {
+ const MB_MODE_INFO *const mbmi = &mi->mbmi;
+ if (is_inter_block(mbmi)) return mbmi->mode;
+
+ int block_raster_idx = av1_block_index_to_raster_order(tx_size, block_idx);
+ return (plane == 0) ? get_y_mode(mi, block_raster_idx) : mbmi->uv_mode;
+}
+#endif
+
static INLINE TX_TYPE get_default_tx_type(PLANE_TYPE plane_type,
const MACROBLOCKD *xd, int block_idx,
TX_SIZE tx_size) {