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
758const uint32_t kiHeight = 96; //DO NOT CHANGE!758const uint32_t kiHeight = 96; //DO NOT CHANGE!
759const uint32_t kiFrameRate = 12; //DO NOT CHANGE!759const uint32_t kiFrameRate = 12; //DO NOT CHANGE!
760const uint32_t kiFrameNum = 100; //DO NOT CHANGE!760const uint32_t kiFrameNum = 100; //DO NOT CHANGE!
761const char* pHashStr[] = { //DO NOT CHANGE!761const char* const pHashStr[][2] = { //DO NOT CHANGE!
762// X86_ASM downsampling routines average vertically first, as opposed to762 // Allow for different output depending on whether averaging is done
763// horizontally first, which results in different output.763 // vertically or horizontally first when downsampling.
764#ifdef X86_ASM764 { "244eebcb51f4c2a56e83fc5da3373cad9ec0e1e5", "9c4e6146b29bac5d5d4be3c5bbab9c072dcb3f3f" },
765 "244eebcb51f4c2a56e83fc5da3373cad9ec0e1e5",765 { "bbad99ef99e37b34bcb4f09a7ec4d144375f6be7", "f350001c333902029800bd291fbed915a4bdf19a" },
766 "bbad99ef99e37b34bcb4f09a7ec4d144375f6be7",766 { "809f97e836650624d92f0b8e200a6ab25f810d6f", "eb9d853b7daec03052c4850027ac94adc84c3a7e" }
767 "809f97e836650624d92f0b8e200a6ab25f810d6f"
768#else
769 "9c4e6146b29bac5d5d4be3c5bbab9c072dcb3f3f",
770 "f350001c333902029800bd291fbed915a4bdf19a",
771 "eb9d853b7daec03052c4850027ac94adc84c3a7e"
772#endif
773};767};
774 768
775class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase>, public EncodeDecodeTestBase {769class DecodeParseAPI : public ::testing::TestWithParam<EncodeDecodeFileParamBase>, public EncodeDecodeTestBase {
@@ -905,7 +899,7 @@ TEST_F (DecodeParseAPI, ParseOnly_General) { · 129 unmodified lines
905 unsigned char digest[SHA_DIGEST_LENGTH];899 unsigned char digest[SHA_DIGEST_LENGTH];
906 SHA1Result (&ctx_, digest);900 SHA1Result (&ctx_, digest);
907 if (!HasFatalFailure()) {901 if (!HasFatalFailure()) {
908 CompareHash (digest, pHashStr[uiTargetLayerId]);902 CompareHashAnyOf (digest, pHashStr[uiTargetLayerId], sizeof *pHashStr / sizeof **pHashStr);
909 }903 }
910 } //while904 } //while
911#ifdef DEBUG_FILE_SAVE905#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