[CFL] Alpha signaling
Writes and reads alpha to and from the bitstream.
A special case is needed on the encoder side to handle prediction block
skips. Since whether or not a prediction block is skipped during CfL, a
rollback is required if the block was skipped and the alpha index was
not zero. The advantage of this is that no signaling is required when
the prediction block is skipped as it is assumed tha the alpha index is
zero.
A encode facade is added to the intra prediction facade as CfL requires
special encoder side operations.
Change-Id: Ic3b11d0fdbd51389d862112eb09d8785127a6b06
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 737d9cd..bce9bc2 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1533,7 +1533,12 @@
if (args->exit_early) return;
if (!is_inter_block(mbmi)) {
+#if CONFIG_CFL
+ av1_predict_intra_block_encoder_facade(xd, plane, block, blk_col, blk_row,
+ tx_size);
+#else
av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size);
+#endif
av1_subtract_txb(x, plane, plane_bsize, blk_col, blk_row, tx_size);
}
@@ -2343,7 +2348,11 @@
int block = 0;
for (row = 0; row < max_blocks_high; row += stepr) {
for (col = 0; col < max_blocks_wide; col += stepc) {
+#if CONFIG_CFL
+ av1_predict_intra_block_encoder_facade(xd, 0, block, col, row, tx_size);
+#else
av1_predict_intra_block_facade(xd, 0, block, col, row, tx_size);
+#endif
block += step;
}
}