summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure24
-rw-r--r--libavcodec/dsputil.h10
-rw-r--r--libavcodec/h264.c1
3 files changed, 28 insertions, 7 deletions
diff --git a/configure b/configure
index c74e40fc3b..0c16c67215 100755
--- a/configure
+++ b/configure
@@ -3022,11 +3022,9 @@ case $target_os in
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
objformat="win32"
+ ranlib=:
enable dos_paths
check_cflags -fno-common
- check_cpp_condition _mingw.h "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) \
- || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
- die "ERROR: MinGW runtime version must be >= 3.15."
add_cppflags -U__STRICT_ANSI__
;;
cygwin*)
@@ -3113,6 +3111,26 @@ case $target_os in
;;
esac
+# determine libc flavour
+
+if check_cpp_condition features.h "defined __UCLIBC__"; then
+ libc_type=uclibc
+elif check_cpp_condition features.h "defined __GLIBC__"; then
+ libc_type=glibc
+elif check_header _mingw.h; then
+ libc_type=mingw
+ check_cpp_condition _mingw.h \
+ "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \
+ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
+ die "ERROR: MinGW runtime version must be >= 3.15."
+elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
+ libc_type=newlib
+elif check_cpp_condition stddef.h "defined __KLIBC__"; then
+ libc_type=klibc
+fi
+
+test -n "$libc_type" && enable $libc_type
+
esc(){
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
}
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 85ac20a6ff..640ca769bc 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -634,22 +634,26 @@ void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx);
# define STRIDE_ALIGN 8
#endif
+// Some broken preprocessors need a second expansion
+// to be forced to tokenize __VA_ARGS__
+#define E(x) x
+
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...) \
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) DECLARE_ALIGNED(a, t, v) s o
-#define LOCAL_ALIGNED(a, t, v, ...) LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)
+#define LOCAL_ALIGNED(a, t, v, ...) E(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
#if HAVE_LOCAL_ALIGNED_8
-# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,)
+# define LOCAL_ALIGNED_8(t, v, ...) E(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,))
#else
# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
#endif
#if HAVE_LOCAL_ALIGNED_16
-# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,)
+# define LOCAL_ALIGNED_16(t, v, ...) E(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,))
#else
# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
#endif
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 24bf90a467..713fda7421 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2845,7 +2845,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
}
} else {
/* Frame or first field in a potentially complementary pair */
-// assert(!s0->current_picture_ptr);
s0->first_field = FIELD_PICTURE;
}