This adds a preliminary version of vp9_apply_temporal_filter in SSE4.1. This patch merely adds the function and does not enable it yet. Speed Up: | ss_x=1 | ss_x=0 | ss_y=1 | 19.80X | 19.04X | ss_y=0 | 21.09X | 20.21X | BUG=webm:1591
Showing the changes to test (1 of 7 files). Show all
Unified · Split
| @@ -42,7 +42,14 @@ int GetFilterWeight(unsigned int row, unsigned int col, · 41 unmodified lines | |||
| 42 | 42 | ||
| 43 | int GetModIndex(int sum_dist, int index, int rounding, int strength, | 43 | int GetModIndex(int sum_dist, int index, int rounding, int strength, |
| 44 | int filter_weight) { | 44 | int filter_weight) { |
| 45 | int mod = (sum_dist * 3) / index; | 45 | unsigned int index_mult[14] = { |
| 46 | 0, 0, 0, 0, 49152, 39322, 32768, 28087, 24576, 21846, 19661, 17874, 0, 15124 | ||
| 47 | }; | ||
| 48 | |||
| 49 | assert(index >= 0 && index <= 13); | ||
| 50 | assert(index_mult[index] != 0); | ||
| 51 | |||
| 52 | int mod = (clamp(sum_dist, 0, UINT16_MAX) * index_mult[index]) >> 16; | ||
| 46 | mod += rounding; | 53 | mod += rounding; |
| 47 | mod >>= strength; | 54 | mod >>= strength; |
| 48 | 55 | ||
| @@ -564,5 +571,10 @@ TEST_P(YUVTemporalFilterTest, DISABLED_Speed) { · 515 unmodified lines | |||
| 564 | } | 571 | } |
| 565 | 572 | ||
| 566 | INSTANTIATE_TEST_CASE_P(C, YUVTemporalFilterTest, | 573 | INSTANTIATE_TEST_CASE_P(C, YUVTemporalFilterTest, |
| 567 | ::testing::Values(&vp9_apply_temporal_filter)); | 574 | ::testing::Values(&vp9_apply_temporal_filter_c)); |
| 575 | |||
| 576 | #if HAVE_SSE4_1 | ||
| 577 | INSTANTIATE_TEST_CASE_P(SSE4, YUVTemporalFilterTest, | ||
| 578 | ::testing::Values(&vp9_apply_temporal_filter_sse4_1)); | ||
| 579 | #endif // HAVE_SSE4_1 | ||
| 568 | } // namespace | 580 | } // namespace |