From fbfeb2679c64e35c19d5d8db15b72c30e1e39011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Mon, 7 Dec 2015 14:56:11 +0100 Subject: [PATCH] avcodec: avutil: remove pointless manual thread include logic This is handled by avutil/thread.h --- libavcodec/frame_thread_encoder.c | 8 -------- libavcodec/pthread_frame.c | 8 -------- libavcodec/utils.c | 8 -------- libavcodec/vp8.h | 8 -------- libavutil/opencl.c | 10 +--------- libavutil/threadmessage.c | 12 +----------- 6 files changed, 2 insertions(+), 52 deletions(-) diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 14f2ea2..5a3a0e2 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -27,14 +27,6 @@ #include "internal.h" #include "thread.h" -#if HAVE_PTHREADS -#include -#elif HAVE_W32THREADS -#include "compat/w32pthreads.h" -#elif HAVE_OS2THREADS -#include "compat/os2threads.h" -#endif - #define MAX_THREADS 64 #define BUFFER_SIZE (2*MAX_THREADS) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 7651211..eea0d72 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -26,14 +26,6 @@ #include -#if HAVE_PTHREADS -#include -#elif HAVE_W32THREADS -#include "compat/w32pthreads.h" -#elif HAVE_OS2THREADS -#include "compat/os2threads.h" -#endif - #include "avcodec.h" #include "internal.h" #include "pthread_internal.h" diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d5074dd..3c3b76c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -59,14 +59,6 @@ # include #endif -#if HAVE_PTHREADS -#include -#elif HAVE_W32THREADS -#include "compat/w32pthreads.h" -#elif HAVE_OS2THREADS -#include "compat/os2threads.h" -#endif - #include "libavutil/ffversion.h" const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h index 2135bd9..ffe558b 100644 --- a/libavcodec/vp8.h +++ b/libavcodec/vp8.h @@ -33,14 +33,6 @@ #include "vp56.h" #include "vp8dsp.h" -#if HAVE_PTHREADS -# include -#elif HAVE_OS2THREADS -# include "compat/os2threads.h" -#elif HAVE_W32THREADS -# include "compat/w32pthreads.h" -#endif - #define VP8_MAX_QUANT 127 enum dct_token { diff --git a/libavutil/opencl.c b/libavutil/opencl.c index 62706f3..160076c 100644 --- a/libavutil/opencl.c +++ b/libavutil/opencl.c @@ -26,15 +26,7 @@ #include "log.h" #include "avassert.h" #include "opt.h" - -#if HAVE_THREADS -#if HAVE_PTHREADS -#include -#elif HAVE_W32THREADS -#include "compat/w32pthreads.h" -#elif HAVE_OS2THREADS -#include "compat/os2threads.h" -#endif +#include "thread.h" #include "atomic.h" static pthread_mutex_t * volatile atomic_opencl_lock = NULL; diff --git a/libavutil/threadmessage.c b/libavutil/threadmessage.c index 921d831..0130dad 100644 --- a/libavutil/threadmessage.c +++ b/libavutil/threadmessage.c @@ -20,17 +20,7 @@ #include "fifo.h" #include "threadmessage.h" -#if HAVE_THREADS -#if HAVE_PTHREADS -#include -#elif HAVE_W32THREADS -#include "compat/w32pthreads.h" -#elif HAVE_OS2THREADS -#include "compat/os2threads.h" -#else -#error "Unknown threads implementation" -#endif -#endif +#include "thread.h" struct AVThreadMessageQueue { #if HAVE_THREADS -- 2.6.3