summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-24 23:46:21 +0200
committerMartin Storsjö <martin@martin.st>2015-07-26 10:36:22 +0300
commit4d0d55cd623bcd504867f948849380f6b4060b4d (patch)
treeebcd340204e661912660037d20601f7a33b40be8 /tests
parent41d47ea85fb4ad9cfb5c2dc808a46bc1d57f3986 (diff)
checkasm: Use LOCAL_ALIGNED
Fixes alignment issues and bus errors. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests')
-rw-r--r--tests/checkasm/bswapdsp.c9
-rw-r--r--tests/checkasm/h264pred.c5
-rw-r--r--tests/checkasm/h264qpel.c9
3 files changed, 13 insertions, 10 deletions
diff --git a/tests/checkasm/bswapdsp.c b/tests/checkasm/bswapdsp.c
index 387102931e..748a886ec9 100644
--- a/tests/checkasm/bswapdsp.c
+++ b/tests/checkasm/bswapdsp.c
@@ -22,6 +22,7 @@
#include "checkasm.h"
#include "libavcodec/bswapdsp.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#define BUF_SIZE 512
@@ -55,10 +56,10 @@
void checkasm_check_bswapdsp(void)
{
- DECLARE_ALIGNED(16, uint8_t, src0)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, src1)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, dst0)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, dst1)[BUF_SIZE];
+ LOCAL_ALIGNED_16(uint8_t, src0, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, src1, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, dst0, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, dst1, [BUF_SIZE]);
BswapDSPContext h;
ff_bswapdsp_init(&h);
diff --git a/tests/checkasm/h264pred.c b/tests/checkasm/h264pred.c
index 40e949ab1d..08f23e61b2 100644
--- a/tests/checkasm/h264pred.c
+++ b/tests/checkasm/h264pred.c
@@ -23,6 +23,7 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/h264pred.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
static const int codec_ids[4] = { AV_CODEC_ID_H264, AV_CODEC_ID_VP8, AV_CODEC_ID_RV40, AV_CODEC_ID_SVQ3 };
@@ -232,8 +233,8 @@ void checkasm_check_h264pred(void)
{ check_pred8x8l, "pred8x8l" },
};
- DECLARE_ALIGNED(16, uint8_t, buf0)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, buf1)[BUF_SIZE];
+ LOCAL_ALIGNED_16(uint8_t, buf0, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, buf1, [BUF_SIZE]);
H264PredContext h;
int test, codec, chroma_format, bit_depth;
diff --git a/tests/checkasm/h264qpel.c b/tests/checkasm/h264qpel.c
index 01b97ae005..a67bbb401b 100644
--- a/tests/checkasm/h264qpel.c
+++ b/tests/checkasm/h264qpel.c
@@ -22,6 +22,7 @@
#include "checkasm.h"
#include "libavcodec/h264qpel.h"
#include "libavutil/common.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
static const uint32_t pixel_mask[3] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff };
@@ -48,10 +49,10 @@ static const uint32_t pixel_mask[3] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff };
void checkasm_check_h264qpel(void)
{
- DECLARE_ALIGNED(16, uint8_t, buf0)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, buf1)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, dst0)[BUF_SIZE];
- DECLARE_ALIGNED(16, uint8_t, dst1)[BUF_SIZE];
+ LOCAL_ALIGNED_16(uint8_t, buf0, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, buf1, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, dst0, [BUF_SIZE]);
+ LOCAL_ALIGNED_16(uint8_t, dst1, [BUF_SIZE]);
H264QpelContext h;
int op, bit_depth, i, j;