[mono-video, bugfix] Don't signal uv_mode in monochrome mode
BUG=aomedia:1337
Change-Id: I8ee53feb83cee8f722d76fd050a477ffe230a433
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 289bb28..e7c6200 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1330,8 +1330,15 @@
if (!is_inter) {
write_intra_mode(ec_ctx, bsize, mode, w);
+#if CONFIG_MONO_VIDEO
+ if (!cm->seq_params.monochrome &&
+ is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
+ xd->plane[1].subsampling_y))
+#else
if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
- xd->plane[1].subsampling_y)) {
+ xd->plane[1].subsampling_y))
+#endif // CONFIG_MONO_VIDEO
+ {
#if !CONFIG_CFL
write_intra_uv_mode(ec_ctx, mbmi->uv_mode, mode, w);
#else
@@ -1643,8 +1650,15 @@
write_intra_mode_kf(ec_ctx, mi, above_mi, left_mi, mbmi->mode, w);
+#if CONFIG_MONO_VIDEO
+ if (!cm->seq_params.monochrome &&
+ is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
+ xd->plane[1].subsampling_y))
+#else
if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
- xd->plane[1].subsampling_y)) {
+ xd->plane[1].subsampling_y))
+#endif // CONFIG_MONO_VIDEO
+ {
#if !CONFIG_CFL
write_intra_uv_mode(ec_ctx, mbmi->uv_mode, mbmi->mode, w);
#else