summaryrefslogtreecommitdiff
path: root/media/libaom/src/av1/encoder/hash_motion.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/libaom/src/av1/encoder/hash_motion.h')
-rw-r--r--media/libaom/src/av1/encoder/hash_motion.h43
1 files changed, 33 insertions, 10 deletions
diff --git a/media/libaom/src/av1/encoder/hash_motion.h b/media/libaom/src/av1/encoder/hash_motion.h
index df3ec3215..e4ea1f394 100644
--- a/media/libaom/src/av1/encoder/hash_motion.h
+++ b/media/libaom/src/av1/encoder/hash_motion.h
@@ -16,11 +16,15 @@
#include "aom/aom_integer.h"
#include "aom_scale/yv12config.h"
+#include "av1/encoder/hash.h"
#include "third_party/vector/vector.h"
#ifdef __cplusplus
extern "C" {
#endif
+// Block size used for force_integer_mv decisions
+#define FORCE_INT_MV_DECISION_BLOCK_SIZE 8
+
// store a block's hash info.
// x and y are the position from the top left of the picture
// hash_value2 is used to store the second hash value
@@ -34,25 +38,42 @@ typedef struct _hash_table {
Vector **p_lookup_table;
} hash_table;
-void av1_hash_table_init(hash_table *p_hash_table, struct macroblock *x);
+struct intrabc_hash_info;
+
+typedef struct intrabc_hash_info {
+ // buffer for hash value calculation of a block
+ // used only in av1_get_block_hash_value()
+ // [first hash/second hash]
+ // [two buffers used ping-pong]
+ uint32_t *hash_value_buffer[2][2];
+ hash_table intrabc_hash_table;
+
+ CRC_CALCULATOR crc_calculator1;
+ CRC_CALCULATOR crc_calculator2;
+ int g_crc_initialized;
+} 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);
void av1_hash_table_create(hash_table *p_hash_table);
-int32_t av1_hash_table_count(hash_table *p_hash_table, uint32_t hash_value);
+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(const YV12_BUFFER_CONFIG *picture,
+void av1_generate_block_2x2_hash_value(IntraBCHashInfo *intra_bc_hash_info,
+ const YV12_BUFFER_CONFIG *picture,
uint32_t *pic_block_hash[2],
- int8_t *pic_block_same_info[3],
- struct macroblock *x);
-void av1_generate_block_hash_value(const YV12_BUFFER_CONFIG *picture,
+ int8_t *pic_block_same_info[3]);
+void av1_generate_block_hash_value(IntraBCHashInfo *intra_bc_hash_info,
+ const YV12_BUFFER_CONFIG *picture,
int block_size,
uint32_t *src_pic_block_hash[2],
uint32_t *dst_pic_block_hash[2],
int8_t *src_pic_block_same_info[3],
- int8_t *dst_pic_block_same_info[3],
- struct macroblock *x);
+ int8_t *dst_pic_block_same_info[3]);
void av1_add_to_hash_map_by_row_with_precal_data(hash_table *p_hash_table,
uint32_t *pic_hash[2],
int8_t *pic_is_same,
@@ -67,9 +88,11 @@ int av1_hash_is_horizontal_perfect(const YV12_BUFFER_CONFIG *picture,
// block_size x block_size has the same color in all columns
int av1_hash_is_vertical_perfect(const YV12_BUFFER_CONFIG *picture,
int block_size, int x_start, int y_start);
-void av1_get_block_hash_value(uint8_t *y_src, int stride, int block_size,
+
+void av1_get_block_hash_value(IntraBCHashInfo *intrabc_hash_info,
+ const uint8_t *y_src, int stride, int block_size,
uint32_t *hash_value1, uint32_t *hash_value2,
- int use_highbitdepth, struct macroblock *x);
+ int use_highbitdepth);
#ifdef __cplusplus
} // extern "C"