aom: av1_set_active_map: assert num_samples != 0

From a7479a950e02083acf20037b44ed2bb4b052cb34 Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Wed, 8 May 2024 11:02:00 -0700
Subject: [PATCH] av1_set_active_map: assert num_samples != 0

This quiets a static analysis warning. mi_rows and mi_cols are always
non-zero, so num_samples will be at least 1.

Change-Id: I1f77a84e4789d4bc4c1a2feb264b1d1b494a1ca8
---
 av1/encoder/encoder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 85d980bae..093eabc07 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -179,6 +179,7 @@ int av1_set_active_map(AV1_COMP *cpi, unsigned char *new_map_16x16, int rows,
       }
       cpi->active_map.enabled = 1;
       cpi->active_map.update = 1;
+      assert(num_samples);
       cpi->rc.percent_blocks_inactive =
           (num_blocks_inactive * 100) / num_samples;
     }