[FFmpeg-cvslog] tests/checkasm/pixblockdsp: Test 8 byte aligned positions

Michael Niedermayer git at videolan.org
Sat Jul 2 22:35:19 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Jun 27 22:03:14 2016 +0200| [fb6b6b5166cb8345caa4e7423dd7d9b97b430501] | committer: Michael Niedermayer

tests/checkasm/pixblockdsp: Test 8 byte aligned positions

The code is documented as to require 8byte alignment

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb6b6b5166cb8345caa4e7423dd7d9b97b430501
---

 tests/checkasm/pixblockdsp.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/checkasm/pixblockdsp.c b/tests/checkasm/pixblockdsp.c
index 66bfdb7..2b88e7d 100644
--- a/tests/checkasm/pixblockdsp.c
+++ b/tests/checkasm/pixblockdsp.c
@@ -26,7 +26,7 @@
 #include "libavutil/intreadwrite.h"
 
 #define BUF_UNITS 8
-#define BUF_SIZE (BUF_UNITS * 128 + BUF_UNITS)
+#define BUF_SIZE (BUF_UNITS * 128 + 8 * BUF_UNITS)
 
 #define randomize_buffers()                 \
     do {                                    \
@@ -50,7 +50,7 @@
         declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);    \
                                                                                            \
         for (i = 0; i < BUF_UNITS; i++) {                                              \
-            int src_offset = i * 64 * sizeof(type) + i; /* Test various alignments */      \
+            int src_offset = i * 64 * sizeof(type) + 8 * i; /* Test various alignments */      \
             int dst_offset = i * 64; /* dst must be aligned */                             \
             randomize_buffers();                                                           \
             call_ref(dst0 + dst_offset, src10 + src_offset, 8);                            \
@@ -67,7 +67,7 @@
         declare_func_emms(AV_CPU_FLAG_MMX, void, int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, int stride); \
                                                                                            \
         for (i = 0; i < BUF_UNITS; i++) {                                              \
-            int src_offset = i * 64 * sizeof(type) + i; /* Test various alignments */      \
+            int src_offset = i * 64 * sizeof(type) + 8 * i; /* Test various alignments */      \
             int dst_offset = i * 64; /* dst must be aligned */                             \
             randomize_buffers();                                                           \
             call_ref(dst0 + dst_offset, src10 + src_offset, src20 + src_offset, 8);        \



More information about the ffmpeg-cvslog mailing list