aom: Add assert to set_active_map

From efb0d985ad2edcfa04e6c92b2a1e2f45952cf6f3 Mon Sep 17 00:00:00 2001
From: Marco Paniconi <[EMAIL REDACTED]>
Date: Tue, 19 Mar 2024 10:11:17 -0700
Subject: [PATCH] Add assert to set_active_map

Add assert that mi_row and mi_col should
both be above 0.

Bug: aomedia:3549
Change-Id: I80fa4115a786cbf35f7d6af0f92d3839c94767c7
---
 av1/encoder/encoder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 88862de69..411eb7000 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -155,8 +155,8 @@ int av1_set_active_map(AV1_COMP *cpi, unsigned char *new_map_16x16, int rows,
     const int mi_cols = mi_params->mi_cols;
     cpi->active_map.update = 0;
     cpi->rc.percent_blocks_inactive = 0;
-    assert(mi_rows % 2 == 0);
-    assert(mi_cols % 2 == 0);
+    assert(mi_rows % 2 == 0 && mi_rows > 0);
+    assert(mi_cols % 2 == 0 && mi_cols > 0);
     if (new_map_16x16) {
       int num_samples = 0;
       int num_blocks_inactive = 0;