aom: Simplify conditions in aom_img_plane_width/height

From 6b4246129daaec35a19a5854369403a49bfd7840 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Fri, 12 Apr 2024 15:06:40 -0700
Subject: [PATCH] Simplify conditions in aom_img_plane_width/height

Simplify the if conditions in aom_img_plane_width() and
aom_img_plane_height().

Change-Id: I81fa7484ca706be33142824365df4dcd65e3bc8b
---
 aom/src/aom_image.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/aom/src/aom_image.c b/aom/src/aom_image.c
index f8d4c7878..1d3b7df24 100644
--- a/aom/src/aom_image.c
+++ b/aom/src/aom_image.c
@@ -304,15 +304,15 @@ void aom_img_free(aom_image_t *img) {
 }
 
 int aom_img_plane_width(const aom_image_t *img, int plane) {
-  if (plane > 0 && img->x_chroma_shift > 0)
-    return (img->d_w + 1) >> img->x_chroma_shift;
+  if (plane > 0)
+    return (img->d_w + img->x_chroma_shift) >> img->x_chroma_shift;
   else
     return img->d_w;
 }
 
 int aom_img_plane_height(const aom_image_t *img, int plane) {
-  if (plane > 0 && img->y_chroma_shift > 0)
-    return (img->d_h + 1) >> img->y_chroma_shift;
+  if (plane > 0)
+    return (img->d_h + img->y_chroma_shift) >> img->y_chroma_shift;
   else
     return img->d_h;
 }