diff options
author | trav90 <travawine@palemoon.org> | 2018-10-18 21:53:44 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-18 21:53:44 -0500 |
commit | ec910d81405c736a4490383a250299a7837c2e64 (patch) | |
tree | 4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/test/scan_test.cc | |
parent | 01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff) | |
download | UXP-ec910d81405c736a4490383a250299a7837c2e64.tar UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz UXP-ec910d81405c736a4490383a250299a7837c2e64.zip |
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/test/scan_test.cc')
-rw-r--r-- | third_party/aom/test/scan_test.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/third_party/aom/test/scan_test.cc b/third_party/aom/test/scan_test.cc index 16c831c8e..2b11bd1fb 100644 --- a/third_party/aom/test/scan_test.cc +++ b/third_party/aom/test/scan_test.cc @@ -43,6 +43,7 @@ TEST(ScanTest, av1_augment_prob) { } } +#if USE_TOPOLOGICAL_SORT TEST(ScanTest, av1_update_sort_order) { const TX_SIZE tx_size = TX_4X4; const TX_TYPE tx_type = DCT_DCT; @@ -54,7 +55,9 @@ TEST(ScanTest, av1_update_sort_order) { av1_update_sort_order(tx_size, tx_type, prob, sort_order); for (int i = 0; i < 16; ++i) EXPECT_EQ(ref_sort_order[i], sort_order[i]); } +#endif +#if USE_TOPOLOGICAL_SORT TEST(ScanTest, av1_update_scan_order) { TX_SIZE tx_size = TX_4X4; const TX_TYPE tx_type = DCT_DCT; @@ -74,6 +77,7 @@ TEST(ScanTest, av1_update_scan_order) { EXPECT_EQ(i, scan[ref_iscan[i]]); } } +#endif TEST(ScanTest, av1_update_neighbors) { TX_SIZE tx_size = TX_4X4; @@ -94,4 +98,33 @@ TEST(ScanTest, av1_update_neighbors) { } } +#if USE_2X2_PROB +TEST(ScanTest, av1_down_sample_scan_count) { + const uint32_t non_zero_count[256] = { + 13, 12, 11, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 9, 10, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 9, 8, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 9, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + const uint32_t ref_non_zero_count_ds[64] = { + 13, 11, 0, 0, 0, 0, 0, 0, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + uint32_t non_zero_count_ds[64]; + av1_down_sample_scan_count(non_zero_count_ds, non_zero_count, TX_16X16); + for (int i = 0; i < 64; ++i) { + EXPECT_EQ(ref_non_zero_count_ds[i], non_zero_count_ds[i]); + } +} +#endif + } // namespace |