[NORMATIVE] Film grain bug fixes

BUG=aomedia:1348
BUG=aomedia:1347
BUG=aomedia:1345

Change-Id: Ibe94d826b06e44e4ffad5a6ddc24f962b889ae17
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index cef70e2..dff1983 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3361,7 +3361,10 @@
 
   aom_wb_write_bit(wb, pars->chroma_scaling_from_luma);
 
-  if (!pars->chroma_scaling_from_luma) {
+  if (pars->chroma_scaling_from_luma) {
+    assert(pars->num_cb_points == 0);
+    assert(pars->num_cr_points == 0);
+  } else {
     aom_wb_write_literal(wb, pars->num_cb_points, 4);  // max 10
     for (int i = 0; i < pars->num_cb_points; i++) {
       aom_wb_write_literal(wb, pars->scaling_points_cb[i][0], 8);