[CFL] Alpha choice by rate-distortion cost
Measure SSE for all possible alphas.
Estimate rates for alpha signalling.
Change-Id: Idf1e3c632925cd306090fc38cf5b95eff7ee5c1c
Signed-off-by: David Michael Barr <b@rr-dav.id.au>
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 3e0b11a..254d8f9 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1534,8 +1534,8 @@
if (!is_inter_block(mbmi)) {
#if CONFIG_CFL
- av1_predict_intra_block_encoder_facade(xd, plane, block, blk_col, blk_row,
- tx_size);
+ av1_predict_intra_block_encoder_facade(x, plane, block, blk_col, blk_row,
+ tx_size, plane_bsize);
#else
av1_predict_intra_block_facade(xd, plane, block, blk_col, blk_row, tx_size);
#endif
@@ -2349,7 +2349,10 @@
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);
+ const struct macroblockd_plane *const pd = &xd->plane[0];
+ const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
+ av1_predict_intra_block_encoder_facade(x, 0, block, col, row, tx_size,
+ plane_bsize);
#else
av1_predict_intra_block_facade(xd, 0, block, col, row, tx_size);
#endif