[CFL] Don't Store Luma Pixels When CfL is not Allowed
Change-Id: I09cf970a9be3a7dfe7e134bec5d778cda77f2682
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 8b14613..fcba03c 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2142,7 +2142,7 @@
return;
}
#if CONFIG_CFL
- if (plane == AOM_PLANE_Y && xd->cfl.store_y) {
+ if (plane == AOM_PLANE_Y && xd->cfl.store_y && is_cfl_allowed(mbmi)) {
assert(!is_inter_block(mbmi) || plane_bsize < BLOCK_8X8);
cfl_store_tx(xd, blk_row, blk_col, tx_size, plane_bsize);
}