aom: av1_set_active_map: assert num_samples != 0 (b3844)

From b3844a567443882880d127af30cb7eb27ae2e686 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
(cherry picked from commit a7479a950e02083acf20037b44ed2bb4b052cb34)
---
 av1/encoder/encoder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 1ddbfda08..8017a8a09 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -178,6 +178,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;
     }