[tests] Fix final issue with avx2 satd and update test results

This commit is contained in:
Joose Sainio 2022-07-05 10:28:59 +03:00
parent 42adfb52a7
commit 02aa36f1a2
2 changed files with 7 additions and 5 deletions

View file

@ -233,7 +233,8 @@ static unsigned satd_4x4_8bit_avx2(const uint8_t *org, const uint8_t *cur)
row3 = _mm_add_epi16(row3, _mm_shuffle_epi32(row3, _MM_SHUFFLE(0, 1, 0, 1) )); row3 = _mm_add_epi16(row3, _mm_shuffle_epi32(row3, _MM_SHUFFLE(0, 1, 0, 1) ));
row3 = _mm_add_epi16(row3, _mm_shufflelo_epi16(row3, _MM_SHUFFLE(0, 1, 0, 1) )); row3 = _mm_add_epi16(row3, _mm_shufflelo_epi16(row3, _MM_SHUFFLE(0, 1, 0, 1) ));
const int dc1 = abs(_mm_extract_epi16(row2, 0)); const int16_t temp1 = _mm_extract_epi16(row2, 0);
const int dc1 = abs(temp1);
unsigned sum = _mm_extract_epi16(row3, 0); unsigned sum = _mm_extract_epi16(row3, 0);
sum -= dc1 - (dc1 >> 2); sum -= dc1 - (dc1 >> 2);
unsigned satd = (sum + 1) >> 1; unsigned satd = (sum + 1) >> 1;
@ -573,7 +574,8 @@ static unsigned satd_8x8_subblock_8bit_avx2(const uint8_t * buf1, unsigned strid
unsigned sad = sum_block_avx2(temp); unsigned sad = sum_block_avx2(temp);
const int dc1 = abs(_mm_extract_epi16(temp[0], 0)); const int16_t temp1 = _mm_extract_epi16(temp[0], 0);
const int dc1 = abs(temp1);
sad -= dc1 - (dc1 >> 2); sad -= dc1 - (dc1 >> 2);
unsigned result = (sad + 2) >> 2; unsigned result = (sad + 2) >> 2;

View file

@ -119,7 +119,7 @@ static void satd_tear_down_tests()
TEST satd_test_black_and_white(void) TEST satd_test_black_and_white(void)
{ {
const int satd_results[5] = {2040, 4080, 16320, 65280, 261120}; const int satd_results[5] = {510, 1020, 4080, 16320, 65280};
const int test = 0; const int test = 0;
@ -137,7 +137,7 @@ TEST satd_test_black_and_white(void)
TEST satd_test_checkers(void) TEST satd_test_checkers(void)
{ {
const int satd_checkers_results[5] = { 2040, 4080, 16320, 65280, 261120 }; const int satd_checkers_results[5] = { 1278, 2556, 10224, 40896, 163584 };
const int test = 1; const int test = 1;
@ -156,7 +156,7 @@ TEST satd_test_checkers(void)
TEST satd_test_gradient(void) TEST satd_test_gradient(void)
{ {
const int satd_gradient_results[5] = {3140,9004,20481,67262,258672}; const int satd_gradient_results[5] = {2728,7158,10775,23399,72780};
const int test = 2; const int test = 2;