From 6b3edf76bac3ba8ec1ca355de337fdfec8ea8496 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Mon, 12 Aug 2024 16:47:49 -0700
Subject: [PATCH] Compare g_usage with AOM_USAGE_ALL_INTRA
Compare priv->cfg.g_usage with AOM_USAGE_ALL_INTRA, not ALLINTRA.
AOM_USAGE_ALL_INTRA is a public macro and should be used with the public
struct member g_usage. ALLINTRA is an internal enum constant.
Change-Id: I76424b2d4e5b593b08f573acd53cd2e0b1fa3459
---
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 9b3af757e..a13ba518a 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -2844,7 +2844,7 @@ static aom_codec_err_t encoder_init(aom_codec_ctx_t *ctx) {
// Here we set its default value to 0 when --allintra is turned on.
// However, if users set --enable-cdef = 1 from command line,
// The encoder still respects it.
- if (priv->cfg.g_usage == ALLINTRA) {
+ if (priv->cfg.g_usage == AOM_USAGE_ALL_INTRA) {
priv->extra_cfg.enable_cdef = 0;
}
av1_initialize_enc(priv->cfg.g_usage, priv->cfg.rc_end_usage);