From d231558551408db2b172cd60a19a7c274aa15112 Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Tue, 20 Aug 2024 18:05:48 -0700
Subject: [PATCH] rd.c: don't define av1_fill_lr_rates()
w/CONFIG_REALTIME_ONLY=1
This function is used by pickrst.c which isn't included with this
configuration.
Bug: aomedia:3416
Change-Id: Id95608d7ba047ffc879a248d9f9501b0ce45ad25
---
av1/encoder/rd.c | 3 +++
av1/encoder/rd.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 490d6ba0d..5ce0d68ac 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -35,6 +35,7 @@
#include "av1/encoder/nonrd_opt.h"
#include "av1/encoder/ratectrl.h"
#include "av1/encoder/rd.h"
+#include "config/aom_config.h"
#define RD_THRESH_POW 1.25
@@ -319,6 +320,7 @@ void av1_fill_mode_rates(AV1_COMMON *const cm, ModeCosts *mode_costs,
}
}
+#if !CONFIG_REALTIME_ONLY
void av1_fill_lr_rates(ModeCosts *mode_costs, FRAME_CONTEXT *fc) {
av1_cost_tokens_from_cdf(mode_costs->switchable_restore_cost,
fc->switchable_restore_cdf, NULL);
@@ -327,6 +329,7 @@ void av1_fill_lr_rates(ModeCosts *mode_costs, FRAME_CONTEXT *fc) {
av1_cost_tokens_from_cdf(mode_costs->sgrproj_restore_cost,
fc->sgrproj_restore_cdf, NULL);
}
+#endif // !CONFIG_REALTIME_ONLY
// Values are now correlated to quantizer.
static int sad_per_bit_lut_8[QINDEX_RANGE];
diff --git a/av1/encoder/rd.h b/av1/encoder/rd.h
index 1d407ca78..b6b2f76ad 100644
--- a/av1/encoder/rd.h
+++ b/av1/encoder/rd.h
@@ -20,6 +20,7 @@
#include "av1/encoder/context_tree.h"
#include "av1/encoder/cost.h"
#include "av1/encoder/ratectrl.h"
+#include "config/aom_config.h"
#ifdef __cplusplus
extern "C" {
@@ -356,7 +357,9 @@ int av1_get_intra_cost_penalty(int qindex, int qdelta,
void av1_fill_mode_rates(AV1_COMMON *const cm, ModeCosts *mode_costs,
FRAME_CONTEXT *fc);
+#if !CONFIG_REALTIME_ONLY
void av1_fill_lr_rates(ModeCosts *mode_costs, FRAME_CONTEXT *fc);
+#endif
void av1_fill_coeff_costs(CoeffCosts *coeff_costs, FRAME_CONTEXT *fc,
const int num_planes);