Commit cc5bdf49 authored by Jingning Han's avatar Jingning Han

Add 2x2 block level variance functions for high bd

Change-Id: I38259c4074f77a8941baefbe7585fff2eded6b12
parent b1ed8d72
......@@ -1697,6 +1697,12 @@ specialize qw/aom_sub_pixel_avg_variance4x8 msa sse2 ssse3/;
specialize qw/aom_sub_pixel_avg_variance4x4 msa sse2 ssse3/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
foreach $bd (8, 10, 12) {
add_proto qw/unsigned int/, "aom_highbd_${bd}_variance2x2", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
add_proto qw/unsigned int/, "aom_highbd_${bd}_variance2x4", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
add_proto qw/unsigned int/, "aom_highbd_${bd}_variance4x2", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
foreach (@block_sizes) {
($w, $h) = @$_;
add_proto qw/unsigned int/, "aom_highbd_${bd}_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse";
......
......@@ -590,6 +590,9 @@ HIGHBD_VARIANCES(8, 8)
HIGHBD_VARIANCES(8, 4)
HIGHBD_VARIANCES(4, 8)
HIGHBD_VARIANCES(4, 4)
HIGHBD_VARIANCES(4, 2)
HIGHBD_VARIANCES(2, 4)
HIGHBD_VARIANCES(2, 2)
HIGHBD_GET_VAR(8)
HIGHBD_GET_VAR(16)
......
......@@ -1291,6 +1291,15 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
aom_highbd_8_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits8,
aom_highbd_sad4x4x8_bits8, aom_highbd_sad4x4x4d_bits8)
#if CONFIG_CB4X4
HIGHBD_BFP(BLOCK_2X2, NULL, NULL, aom_highbd_8_variance2x2, NULL, NULL,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_4X2, NULL, NULL, aom_highbd_8_variance4x2, NULL, NULL,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_2X4, NULL, NULL, aom_highbd_8_variance2x4, NULL, NULL,
NULL, NULL, NULL)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_BFP(BLOCK_128X128, aom_highbd_sad128x128_bits8,
aom_highbd_sad128x128_avg_bits8,
......@@ -1503,6 +1512,15 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
aom_highbd_10_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits10,
aom_highbd_sad4x4x8_bits10, aom_highbd_sad4x4x4d_bits10)
#if CONFIG_CB4X4
HIGHBD_BFP(BLOCK_2X2, NULL, NULL, aom_highbd_10_variance2x2, NULL, NULL,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_4X2, NULL, NULL, aom_highbd_10_variance4x2, NULL, NULL,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_2X4, NULL, NULL, aom_highbd_10_variance2x4, NULL, NULL,
NULL, NULL, NULL)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_BFP(
BLOCK_128X128, aom_highbd_sad128x128_bits10,
......@@ -1717,6 +1735,15 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
aom_highbd_12_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits12,
aom_highbd_sad4x4x8_bits12, aom_highbd_sad4x4x4d_bits12)
#if CONFIG_CB4X4
HIGHBD_BFP(BLOCK_2X2, NULL, NULL, aom_highbd_12_variance2x2, NULL, NULL,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_4X2, NULL, NULL, aom_highbd_12_variance4x2, NULL, NULL,
NULL, NULL, NULL)
HIGHBD_BFP(BLOCK_2X4, NULL, NULL, aom_highbd_12_variance2x4, NULL, NULL,
NULL, NULL, NULL)
#endif
#if CONFIG_EXT_PARTITION
HIGHBD_BFP(
BLOCK_128X128, aom_highbd_sad128x128_bits12,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment