History

checkasm/sw_range_convert: test negative input values

Ramiro Polla committed 1 year ago

Commit 536a44e1 parent 6a108d41 file · +14 −0Browse files

Unified · Split

tests/checkasm/sw_range_convert.c+14−0
@@ -65,6 +65,8 @@ static void check_lumConvertRange(int from) · 64 unmodified lines
65 65
66 LOCAL_ALIGNED_32(int16_t, dst0, [LARGEST_INPUT_SIZE * 2]);66 LOCAL_ALIGNED_32(int16_t, dst0, [LARGEST_INPUT_SIZE * 2]);
67 LOCAL_ALIGNED_32(int16_t, dst1, [LARGEST_INPUT_SIZE * 2]);67 LOCAL_ALIGNED_32(int16_t, dst1, [LARGEST_INPUT_SIZE * 2]);
68 int32_t *dst0_32 = (int32_t *) dst0;
69 int32_t *dst1_32 = (int32_t *) dst1;
68 70
69 declare_func(void, int16_t *dst, int width);71 declare_func(void, int16_t *dst, int width);
70 72
@@ -89,6 +91,11 @@ static void check_lumConvertRange(int from) · 18 unmodified lines
89 int width = input_sizes[dstWi];91 int width = input_sizes[dstWi];
90 if (check_func(c->lumConvertRange, "%s%d_%d", func_str, bit_depth, width)) {92 if (check_func(c->lumConvertRange, "%s%d_%d", func_str, bit_depth, width)) {
91 randomize_buffers(dst0, dst1, bit_depth, width);93 randomize_buffers(dst0, dst1, bit_depth, width);
94 if (bit_depth == 16) {
95 dst1_32[2] = dst0_32[2] = -1;
96 } else {
97 dst1[2] = dst0[2] = -1;
98 }
92 call_ref(dst0, width);99 call_ref(dst0, width);
93 call_new(dst1, width);100 call_new(dst1, width);
94 if (memcmp(dst0, dst1, width * sample_size))101 if (memcmp(dst0, dst1, width * sample_size))
@@ -115,6 +122,8 @@ static void check_chrConvertRange(int from) · 20 unmodified lines
115 LOCAL_ALIGNED_32(int16_t, dstV0, [LARGEST_INPUT_SIZE * 2]);122 LOCAL_ALIGNED_32(int16_t, dstV0, [LARGEST_INPUT_SIZE * 2]);
116 LOCAL_ALIGNED_32(int16_t, dstU1, [LARGEST_INPUT_SIZE * 2]);123 LOCAL_ALIGNED_32(int16_t, dstU1, [LARGEST_INPUT_SIZE * 2]);
117 LOCAL_ALIGNED_32(int16_t, dstV1, [LARGEST_INPUT_SIZE * 2]);124 LOCAL_ALIGNED_32(int16_t, dstV1, [LARGEST_INPUT_SIZE * 2]);
125 int32_t *dstU0_32 = (int32_t *) dstU0;
126 int32_t *dstU1_32 = (int32_t *) dstU1;
118 127
119 declare_func(void, int16_t *dstU, int16_t *dstV, int width);128 declare_func(void, int16_t *dstU, int16_t *dstV, int width);
120 129
@@ -140,6 +149,11 @@ static void check_chrConvertRange(int from) · 19 unmodified lines
140 if (check_func(c->chrConvertRange, "%s%d_%d", func_str, bit_depth, width)) {149 if (check_func(c->chrConvertRange, "%s%d_%d", func_str, bit_depth, width)) {
141 randomize_buffers(dstU0, dstU1, bit_depth, width);150 randomize_buffers(dstU0, dstU1, bit_depth, width);
142 randomize_buffers(dstV0, dstV1, bit_depth, width);151 randomize_buffers(dstV0, dstV1, bit_depth, width);
152 if (bit_depth == 16) {
153 dstU1_32[2] = dstU0_32[2] = -1;
154 } else {
155 dstU1[2] = dstU0[2] = -1;
156 }
143 call_ref(dstU0, dstV0, width);157 call_ref(dstU0, dstV0, width);
144 call_new(dstU1, dstV1, width);158 call_new(dstU1, dstV1, width);
145 if (memcmp(dstU0, dstU1, width * sample_size) ||159 if (memcmp(dstU0, dstU1, width * sample_size) ||

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