chroma_check: don't access UV planes if monochrome In chroma_check(), return immediately if we are generating a monochrome encoded stream. This avoids accessing the U, V planes when they are NULL. BUG=aomedia:2723 Change-Id: I26a39791f820b4d4e1d63ff7141f594c3c7181f5 (cherry picked from commit 098327e0a20fbbcf8e942261f43b30be8475f903)
diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c index 504833e..e3cb1fa 100644 --- a/av1/encoder/var_based_part.c +++ b/av1/encoder/var_based_part.c
@@ -581,7 +581,7 @@ int i; MACROBLOCKD *xd = &x->e_mbd; - if (is_key_frame) return; + if (is_key_frame || cpi->oxcf.monochrome) return; for (i = 1; i <= 2; ++i) { unsigned int uv_sad = UINT_MAX;