From 8e728c01b72dd4cc30768db851d5d426245c255e Mon Sep 17 00:00:00 2001
From: James Zern <[EMAIL REDACTED]>
Date: Wed, 21 Aug 2024 13:16:34 -0700
Subject: [PATCH] hash_motion.c: make av1_hash_table_clear_all() static
This function is unused outside of this file.
+ remove unused av1_has_exact_match(); the last reference was removed
in: 163db3c7b9 Clean up hash me code
Bug: aomedia:3416
Change-Id: I196bd98366e522427d254eeb2141e88ea992ac46
---
av1/encoder/hash_motion.c | 24 +++---------------------
av1/encoder/hash_motion.h | 3 ---
2 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/av1/encoder/hash_motion.c b/av1/encoder/hash_motion.c
index 78403a6e96..1f4131e830 100644
--- a/av1/encoder/hash_motion.c
+++ b/av1/encoder/hash_motion.c
@@ -102,7 +102,7 @@ void av1_hash_table_init(IntraBCHashInfo *intrabc_hash_info) {
intrabc_hash_info->intrabc_hash_table.p_lookup_table = NULL;
}
-void av1_hash_table_clear_all(hash_table *p_hash_table) {
+static void clear_all(hash_table *p_hash_table) {
if (p_hash_table->p_lookup_table == NULL) {
return;
}
@@ -116,14 +116,14 @@ void av1_hash_table_clear_all(hash_table *p_hash_table) {
}
void av1_hash_table_destroy(hash_table *p_hash_table) {
- av1_hash_table_clear_all(p_hash_table);
+ clear_all(p_hash_table);
aom_free(p_hash_table->p_lookup_table);
p_hash_table->p_lookup_table = NULL;
}
bool av1_hash_table_create(hash_table *p_hash_table) {
if (p_hash_table->p_lookup_table != NULL) {
- av1_hash_table_clear_all(p_hash_table);
+ clear_all(p_hash_table);
return true;
}
p_hash_table->p_lookup_table =
@@ -170,24 +170,6 @@ Iterator av1_hash_get_first_iterator(hash_table *p_hash_table,
return aom_vector_begin(p_hash_table->p_lookup_table[hash_value]);
}
-int32_t av1_has_exact_match(hash_table *p_hash_table, uint32_t hash_value1,
- uint32_t hash_value2) {
- if (p_hash_table->p_lookup_table[hash_value1] == NULL) {
- return 0;
- }
- Iterator iterator =
- aom_vector_begin(p_hash_table->p_lookup_table[hash_value1]);
- Iterator last = aom_vector_end(p_hash_table->p_lookup_table[hash_value1]);
- for (; !aom_iterator_equals(&iterator, &last);
- aom_iterator_increment(&iterator)) {
- if ((*(block_hash *)aom_iterator_get(&iterator)).hash_value2 ==
- hash_value2) {
- return 1;
- }
- }
- return 0;
-}
-
void av1_generate_block_2x2_hash_value(IntraBCHashInfo *intrabc_hash_info,
const YV12_BUFFER_CONFIG *picture,
uint32_t *pic_block_hash[2],
diff --git a/av1/encoder/hash_motion.h b/av1/encoder/hash_motion.h
index f78b0f679a..f9686dc280 100644
--- a/av1/encoder/hash_motion.h
+++ b/av1/encoder/hash_motion.h
@@ -56,15 +56,12 @@ typedef struct intrabc_hash_info {
} IntraBCHashInfo;
void av1_hash_table_init(IntraBCHashInfo *intra_bc_hash_info);
-void av1_hash_table_clear_all(hash_table *p_hash_table);
void av1_hash_table_destroy(hash_table *p_hash_table);
bool av1_hash_table_create(hash_table *p_hash_table);
int32_t av1_hash_table_count(const hash_table *p_hash_table,
uint32_t hash_value);
Iterator av1_hash_get_first_iterator(hash_table *p_hash_table,
uint32_t hash_value);
-int32_t av1_has_exact_match(hash_table *p_hash_table, uint32_t hash_value1,
- uint32_t hash_value2);
void av1_generate_block_2x2_hash_value(IntraBCHashInfo *intra_bc_hash_info,
const YV12_BUFFER_CONFIG *picture,
uint32_t *pic_block_hash[2],