Showing the changes to test/decoder/DecUT_IdctResAddPred.cpp (1 of 12 files). Show all
Unified · Split
| @@ -1,7 +1,7 @@ | |||
| 1 | #include <gtest/gtest.h> | 1 | #include <gtest/gtest.h> |
| 2 | #include "macros.h" | 2 | #include "macros.h" |
| 3 | #include "decode_mb_aux.h" | 3 | #include "decode_mb_aux.h" |
| 4 | #include "../../codec/decoder/core/src/decode_slice.cpp" | 4 | #include "deblocking.h" |
| 5 | using namespace WelsDec; | 5 | using namespace WelsDec; |
| 6 | void IdctResAddPred_ref (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) { | 6 | void IdctResAddPred_ref (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) { |
| 7 | int16_t iSrc[16]; | 7 | int16_t iSrc[16]; |
| @@ -98,7 +98,7 @@ TEST(DecoderDecodeMbAux, method) \ · 90 unmodified lines | |||
| 98 | {\ | 98 | {\ |
| 99 | int8_t iNonZeroCount[2][24];\ | 99 | int8_t iNonZeroCount[2][24];\ |
| 100 | for(int32_t i = 0; i < 24; i++) {\ | 100 | for(int32_t i = 0; i < 24; i++) {\ |
| 101 | iNonZeroCount[0][i] = iNonZeroCount[1][i] = (rand() % 256)-128;\ | 101 | iNonZeroCount[0][i] = iNonZeroCount[1][i] = (rand() % 25);\ |
| 102 | }\ | 102 | }\ |
| 103 | method(iNonZeroCount[0]);\ | 103 | method(iNonZeroCount[0]);\ |
| 104 | SetNonZeroCount_ref(iNonZeroCount[1]);\ | 104 | SetNonZeroCount_ref(iNonZeroCount[1]);\ |
| @@ -106,7 +106,7 @@ TEST(DecoderDecodeMbAux, method) \ · 1 unmodified line | |||
| 106 | ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\ | 106 | ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\ |
| 107 | }\ | 107 | }\ |
| 108 | for(int32_t i =0; i<24; i++) {\ | 108 | for(int32_t i =0; i<24; i++) {\ |
| 109 | iNonZeroCount[0][i] = iNonZeroCount[1][i] = -128;\ | 109 | iNonZeroCount[0][i] = iNonZeroCount[1][i] = 0;\ |
| 110 | }\ | 110 | }\ |
| 111 | method(iNonZeroCount[0]);\ | 111 | method(iNonZeroCount[0]);\ |
| 112 | SetNonZeroCount_ref(iNonZeroCount[1]);\ | 112 | SetNonZeroCount_ref(iNonZeroCount[1]);\ |
| @@ -114,7 +114,7 @@ TEST(DecoderDecodeMbAux, method) \ · 1 unmodified line | |||
| 114 | ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\ | 114 | ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\ |
| 115 | }\ | 115 | }\ |
| 116 | for(int32_t i =0; i<24; i++) {\ | 116 | for(int32_t i =0; i<24; i++) {\ |
| 117 | iNonZeroCount[0][i] = iNonZeroCount[1][i] = 127;\ | 117 | iNonZeroCount[0][i] = iNonZeroCount[1][i] = 16;\ |
| 118 | }\ | 118 | }\ |
| 119 | method(iNonZeroCount[0]);\ | 119 | method(iNonZeroCount[0]);\ |
| 120 | SetNonZeroCount_ref(iNonZeroCount[1]);\ | 120 | SetNonZeroCount_ref(iNonZeroCount[1]);\ |
| @@ -123,12 +123,16 @@ TEST(DecoderDecodeMbAux, method) \ · 2 unmodified lines | |||
| 123 | }\ | 123 | }\ |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | GENERATE_SETNONZEROCOUNT (SetNonZeroCount_c) | 126 | GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_c) |
| 127 | |||
| 128 | #if defined(X86_ASM) | ||
| 129 | GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_sse2) | ||
| 130 | #endif | ||
| 127 | 131 | ||
| 128 | #if defined(HAVE_NEON) | 132 | #if defined(HAVE_NEON) |
| 129 | GENERATE_SETNONZEROCOUNT (SetNonZeroCount_neon) | 133 | GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_neon) |
| 130 | #endif | 134 | #endif |
| 131 | 135 | ||
| 132 | #if defined(HAVE_NEON_AARCH64) | 136 | #if defined(HAVE_NEON_AARCH64) |
| 133 | GENERATE_SETNONZEROCOUNT (SetNonZeroCount_AArch64_neon) | 137 | GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_AArch64_neon) |
| 134 | #endif | 138 | #endif |