summaryrefslogtreecommitdiff
path: root/tests/checkasm
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2017-10-01 21:37:15 +0200
committerJames Almer <jamrial@gmail.com>2017-10-01 17:35:30 -0300
commitac5908b13f16cbda396730c35f5f3125ca24577a (patch)
tree01f49a554ed8199b7aaa5d095c859796c6c10c18 /tests/checkasm
parent59924d5eb11646f82f70c206be8a867468f102b9 (diff)
libavcodec/exr : add x86 SIMD for predictor
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'tests/checkasm')
-rw-r--r--tests/checkasm/exrdsp.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/checkasm/exrdsp.c b/tests/checkasm/exrdsp.c
index 6637f6fdd2..754a079f83 100644
--- a/tests/checkasm/exrdsp.c
+++ b/tests/checkasm/exrdsp.c
@@ -55,6 +55,24 @@ static void check_reorder_pixels(void) {
bench_new(dst_new, src, BUF_SIZE);
}
+static void check_predictor(void) {
+ LOCAL_ALIGNED_32(uint8_t, src, [PADDED_BUF_SIZE]);
+ LOCAL_ALIGNED_32(uint8_t, dst_ref, [PADDED_BUF_SIZE]);
+ LOCAL_ALIGNED_32(uint8_t, dst_new, [PADDED_BUF_SIZE]);
+
+ declare_func(void, uint8_t *src, ptrdiff_t size);
+
+ memset(src, 0, PADDED_BUF_SIZE);
+ randomize_buffers();
+ memcpy(dst_ref, src, PADDED_BUF_SIZE);
+ memcpy(dst_new, src, PADDED_BUF_SIZE);
+ call_ref(dst_ref, BUF_SIZE);
+ call_new(dst_new, BUF_SIZE);
+ if (memcmp(dst_ref, dst_new, BUF_SIZE))
+ fail();
+ bench_new(dst_new, BUF_SIZE);
+}
+
void checkasm_check_exrdsp(void)
{
ExrDSPContext h;
@@ -65,4 +83,9 @@ void checkasm_check_exrdsp(void)
check_reorder_pixels();
report("reorder_pixels");
+
+ if (check_func(h.predictor, "predictor"))
+ check_predictor();
+
+ report("predictor");
}