History

[UT] Allow for different output depending on downsample average order

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.

Sindre Aamås committed 10 years ago

Commit f14fb2c1 parent 2e6c9f73 files · +49 −48Browse files

Showing the changes to test/api/decode_api_test.cpp (1 of 3 files). Show all

Unified · Split

test/api/decode_api_test.cpp+7−13
@@ -758,18 +758,12 @@ const uint32_t kiWidth = 160; //DO NOT CHANGE! · 757 unmodified lines
758758 const uint32_t kiHeight = 96; //DO NOT CHANGE!
759759 const uint32_t kiFrameRate = 12; //DO NOT CHANGE!
760760 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" }
773767 };
774768
775769 class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase>, public EncodeDecodeTestBase {
@@ -905,7 +899,7 @@ TEST_F (DecodeParseAPI, ParseOnly_General) { · 129 unmodified lines
905899 unsigned char digest[SHA_DIGEST_LENGTH];
906900 SHA1Result (&ctx_, digest);
907901 if (!HasFatalFailure()) {
908− CompareHash (digest, pHashStr[uiTargetLayerId]);
902+ CompareHashAnyOf (digest, pHashStr[uiTargetLayerId], sizeof *pHashStr / sizeof **pHashStr);
909903 }
910904 } //while
911905 #ifdef DEBUG_FILE_SAVE

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t