[CFL] Move cfl_init out of plane loop
Change-Id: I3ce09c03d4306c1f2a9c70aa1e82126493bc9406
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 2db83fe..fb4b503 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -530,10 +530,6 @@
#if CONFIG_PVQ
xd->plane[i].pvq_ref_coeff = pvq_ref_coeff;
#endif
-#if CONFIG_CFL
- xd->cfl = cfl;
- cfl_init(cfl, cm);
-#endif
xd->above_context[i] = cm->above_context[i];
if (xd->plane[i].plane_type == PLANE_TYPE_Y) {
memcpy(xd->plane[i].seg_dequant, cm->y_dequant, sizeof(cm->y_dequant));
@@ -562,6 +558,10 @@
#if CONFIG_VAR_TX
xd->above_txfm_context = cm->above_txfm_context;
#endif
+#if CONFIG_CFL
+ cfl_init(cfl, cm);
+ xd->cfl = cfl;
+#endif
xd->mi_stride = cm->mi_stride;
xd->error_info = &cm->error;
}