Avoid X86_ASM ifdef. Ideally, we may want to update all routines to average vertically first, which would make this unnecessary. In the interim, this enables the tests to run successfully on x86 without SSSE3 support again.
Showing the changes to test/api/decode_api_test.cpp (1 of 3 files). Show all
Unified · Split
| @@ -758,18 +758,12 @@ const uint32_t kiWidth = 160; //DO NOT CHANGE! · 757 unmodified lines | ||
| 758 | 758 | const uint32_t kiHeight = 96; //DO NOT CHANGE! |
| 759 | 759 | const uint32_t kiFrameRate = 12; //DO NOT CHANGE! |
| 760 | 760 | const uint32_t kiFrameNum = 100; //DO NOT CHANGE! |
| 761 | −const char* pHashStr[] = { //DO NOT CHANGE! | |
| 762 | −// X86_ASM downsampling routines average vertically first, as opposed to | |
| 763 | −// horizontally first, which results in different output. | |
| 764 | −#ifdef X86_ASM | |
| 765 | − "244eebcb51f4c2a56e83fc5da3373cad9ec0e1e5", | |
| 766 | − "bbad99ef99e37b34bcb4f09a7ec4d144375f6be7", | |
| 767 | − "809f97e836650624d92f0b8e200a6ab25f810d6f" | |
| 768 | −#else | |
| 769 | − "9c4e6146b29bac5d5d4be3c5bbab9c072dcb3f3f", | |
| 770 | − "f350001c333902029800bd291fbed915a4bdf19a", | |
| 771 | − "eb9d853b7daec03052c4850027ac94adc84c3a7e" | |
| 772 | −#endif | |
| 761 | +const char* const pHashStr[][2] = { //DO NOT CHANGE! | |
| 762 | + // Allow for different output depending on whether averaging is done | |
| 763 | + // vertically or horizontally first when downsampling. | |
| 764 | + { "244eebcb51f4c2a56e83fc5da3373cad9ec0e1e5", "9c4e6146b29bac5d5d4be3c5bbab9c072dcb3f3f" }, | |
| 765 | + { "bbad99ef99e37b34bcb4f09a7ec4d144375f6be7", "f350001c333902029800bd291fbed915a4bdf19a" }, | |
| 766 | + { "809f97e836650624d92f0b8e200a6ab25f810d6f", "eb9d853b7daec03052c4850027ac94adc84c3a7e" } | |
| 773 | 767 | }; |
| 774 | 768 | |
| 775 | 769 | class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase>, public EncodeDecodeTestBase { |
| @@ -905,7 +899,7 @@ TEST_F (DecodeParseAPI, ParseOnly_General) { · 129 unmodified lines | ||
| 905 | 899 | unsigned char digest[SHA_DIGEST_LENGTH]; |
| 906 | 900 | SHA1Result (&ctx_, digest); |
| 907 | 901 | if (!HasFatalFailure()) { |
| 908 | − CompareHash (digest, pHashStr[uiTargetLayerId]); | |
| 902 | + CompareHashAnyOf (digest, pHashStr[uiTargetLayerId], sizeof *pHashStr / sizeof **pHashStr); | |
| 909 | 903 | } |
| 910 | 904 | } //while |
| 911 | 905 | #ifdef DEBUG_FILE_SAVE |