[CFL] Store luma as prediction for chroma
Stores the reconstructed luma pixels for each transform block inside a
prediction block. Rectangular transform blocks are supported.
As for RDO, after all the modes have been tested for luma, an extra
encoding is perform in order to store the reconstructed pixel values of
the best mode. These values are then used for RDO on the chromatic
planes.
Change-Id: I354d9827e32fd41065f1b2ce02832d943a6fa156
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index f9208f5..dbb7525 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -38,6 +38,10 @@
#include "av1/encoder/pvq_encoder.h"
#endif
+#if CONFIG_CFL
+#include "av1/common/cfl.h"
+#endif
+
// Check if one needs to use c version subtraction.
static int check_subtract_block_size(int w, int h) { return w < 4 || h < 4; }
@@ -1475,6 +1479,11 @@
#else
// Note : *(args->skip) == mbmi->skip
#endif
+#if CONFIG_CFL
+ if (plane == AOM_PLANE_Y && x->cfl_store_y) {
+ cfl_store(xd->cfl, dst, dst_stride, blk_row, blk_col, tx_size);
+ }
+#endif
}
void av1_encode_intra_block_plane(AV1_COMMON *cm, MACROBLOCK *x,