diff --git a/Makefile.vc b/Makefile.vc index 261673f1..45da2fd1 100644 --- a/Makefile.vc +++ b/Makefile.vc @@ -11,6 +11,8 @@ LIBWEBPDEMUX_BASENAME = libwebpdemux ARCH = x86 !ELSE IF ! [ cl 2>&1 | find "x64" > NUL ] ARCH = x64 +!ELSE IF ! [ cl 2>&1 | find "ARM" > NUL ] +ARCH = ARM !ELSE !ERROR Unable to auto-detect toolchain architecture! \ If cl.exe is in your PATH rerun nmake with ARCH=. @@ -29,7 +31,6 @@ CCNODBG = cl.exe $(NOLOGO) /O2 /DNDEBUG CCDEBUG = cl.exe $(NOLOGO) /Od /Gm /Zi /D_DEBUG /RTC1 CFLAGS = /Isrc $(NOLOGO) /W3 /EHsc /c CFLAGS = $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN -CFLAGS = $(CFLAGS) /DHAVE_WINCODEC_H /DWEBP_USE_THREAD LDFLAGS = /LARGEADDRESSAWARE /MANIFEST /NXCOMPAT /DYNAMICBASE LDFLAGS = $(LDFLAGS) $(PLATFORM_LDFLAGS) LNKDLL = link.exe /DLL $(NOLOGO) @@ -37,6 +38,12 @@ LNKEXE = link.exe $(NOLOGO) LNKLIB = lib.exe $(NOLOGO) MT = mt.exe $(NOLOGO) +!IF "$(ARCH)" == "ARM" +CFLAGS = $(CFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP +!ELSE +CFLAGS = $(CFLAGS) /DHAVE_WINCODEC_H /DWEBP_USE_THREAD +!ENDIF + CFGSET = FALSE !IF "$(OBJDIR)" == "" OUTDIR = ..\obj\ @@ -277,6 +284,10 @@ LIBWEBPMUX_OBJS = $(MUX_OBJS) $(LIBWEBPMUX_OBJS) LIBWEBPDEMUX_OBJS = $(DEMUX_OBJS) $(LIBWEBPDEMUX_OBJS) OUT_LIBS = $(LIBWEBPDECODER) $(LIBWEBP) +!IF "$(ARCH)" == "ARM" +ex: $(OUT_LIBS) +all: ex +!ELSE OUT_EXAMPLES = $(DIRBIN)\cwebp.exe $(DIRBIN)\dwebp.exe EXTRA_EXAMPLES = $(DIRBIN)\vwebp.exe $(DIRBIN)\webpmux.exe @@ -296,6 +307,7 @@ $(DIRBIN)\webpmux.exe: $(DIROBJ)\examples\webpmux.obj $(LIBWEBPMUX) $(DIRBIN)\webpmux.exe: $(EX_UTIL_OBJS) $(LIBWEBP) $(OUT_EXAMPLES): $(EX_UTIL_OBJS) $(LIBWEBP) $(EX_UTIL_OBJS) $(EX_FORMAT_DEC_OBJS): $(OUTPUT_DIRS) +!ENDIF # ARCH == ARM experimental: $(MAKE) /f Makefile.vc \ diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index 651f6a3c..411c52ec 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -72,6 +72,11 @@ extern "C" { #define WEBP_USE_NEON #endif +#if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_M_ARM) +#define WEBP_USE_NEON +#define USE_INTRINSICS +#endif + #if defined(__mips__) && !defined(__mips64) && (__mips_isa_rev < 6) #define WEBP_USE_MIPS32 #if (__mips_isa_rev >= 2)