ref: e543475d593ebc2f27c05ff8ff467e19b66c11ae
parent: 16778617b8af13ed9b54bcbeeb311ec94552ad02
author: lieff <[email protected]>
date: Sat Jan 27 11:40:25 EST 2018
use 32bit for coverage (no generic code stripped) and 64bit for PSNR test
--- a/README.md
+++ b/README.md
@@ -68,6 +68,7 @@
```
//#define MINIMP3_ONLY_MP3
+//#define MINIMP3_ONLY_SIMD
#define MINIMP3_IMPLEMENTATION
#include "minimp3.h"
...
--- a/minimp3.h
+++ b/minimp3.h
@@ -80,7 +80,7 @@
#define MINIMP3_MIN(a, b) ((a) > (b) ? (b) : (a))
#define MINIMP3_MAX(a, b) ((a) < (b) ? (b) : (a))
-#if defined(_M_X64) || defined(_M_ARM64) || (defined(__x86_64__) && defined(__SSE2__)) || defined(__aarch64__)
+#if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(_M_ARM64) || (defined(__x86_64__) && defined(__SSE2__)) || defined(__aarch64__))
// x64 always have SSE2, arm64 always have neon, no need for generic code
#define MINIMP3_ONLY_SIMD
#endif
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -6,7 +6,7 @@
set -e
-gcc -coverage -O0 -DMINIMP3_TEST -DMINIMP3_NO_WAV -o minimp3 minimp3_test.c -lm
+gcc -coverage -O0 -m32 -msse2 -DMINIMP3_TEST -DMINIMP3_NO_WAV -o minimp3 minimp3_test.c -lm
scripts/test.sh
gcov minimp3_test.c