aom: av1_cx_iface: Do no require timebase.num < timebase.den

From 8e58f5b7f421961b83dceb07c4051c6d6dd424c1 Mon Sep 17 00:00:00 2001
From: Vignesh Venkat <[EMAIL REDACTED]>
Date: Tue, 4 Jun 2024 14:20:00 -0700
Subject: [PATCH] av1_cx_iface: Do no require timebase.num < timebase.den

This has been in libvpx for a while now.
VP9: https://chromium-review.googlesource.com/c/webm/libvpx/+/332449
VP8: https://chromium-review.googlesource.com/c/webm/libvpx/+/274107

Generally, we set the timebase to be the inverse of the desired frame
rate. So this change allows us to express that using timebase (for
e.g. a frame rate of 0.5 fps will be 2/1).

Tested with an input video of 0.5 fps and the output is as intended
with this change (it fails before this change).

Bug: aomedia:3580
Change-Id: I296620f7625824ff460aa503388ed821c7e6ddd0
(cherry picked from commit 2badbae61d6ee0996152d640f1e1896c0a0548ab)
---
 av1/av1_cx_iface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 4d5992460..95f0ce827 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -659,7 +659,7 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
     ERROR("max_frame_area out of range [..2^30]");
   }
   RANGE_CHECK(cfg, g_timebase.den, 1, 1000000000);
-  RANGE_CHECK(cfg, g_timebase.num, 1, cfg->g_timebase.den);
+  RANGE_CHECK(cfg, g_timebase.num, 1, 1000000000);
   RANGE_CHECK_HI(cfg, g_profile, MAX_PROFILES - 1);
 
   RANGE_CHECK_HI(cfg, rc_max_quantizer, 63);