lavc, lavu: use avutil/thread.h instead of redundant conditional includes
authorClément Bœsch <clement@stupeflix.com>
Mon, 7 Dec 2015 14:08:51 +0000 (15:08 +0100)
committerClément Bœsch <clement@stupeflix.com>
Mon, 7 Dec 2015 16:25:51 +0000 (17:25 +0100)
libavcodec/frame_thread_encoder.c
libavcodec/pthread_frame.c
libavcodec/utils.c
libavcodec/vp8.h
libavutil/opencl.c
libavutil/threadmessage.c

index 14f2ea2..f4d35f9 100644 (file)
 #include "libavutil/fifo.h"
 #include "libavutil/avassert.h"
 #include "libavutil/imgutils.h"
+#include "libavutil/thread.h"
 #include "avcodec.h"
 #include "internal.h"
 #include "thread.h"
 
-#if HAVE_PTHREADS
-#include <pthread.h>
-#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)
 
index 7651211..b77dd1e 100644 (file)
 
 #include <stdint.h>
 
-#if HAVE_PTHREADS
-#include <pthread.h>
-#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"
@@ -49,6 +41,7 @@
 #include "libavutil/log.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
+#include "libavutil/thread.h"
 
 /**
  * Context used by codec threads and stored in their AVCodecInternal thread_ctx.
index d5074dd..9a7ffde 100644 (file)
@@ -41,6 +41,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/samplefmt.h"
 #include "libavutil/dict.h"
+#include "libavutil/thread.h"
 #include "avcodec.h"
 #include "libavutil/opt.h"
 #include "me_cmp.h"
 # include <iconv.h>
 #endif
 
-#if HAVE_PTHREADS
-#include <pthread.h>
-#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;
 
index 2135bd9..cfd82aa 100644 (file)
 #define AVCODEC_VP8_H
 
 #include "libavutil/buffer.h"
+#include "libavutil/thread.h"
 
 #include "h264pred.h"
 #include "thread.h"
 #include "vp56.h"
 #include "vp8dsp.h"
 
-#if HAVE_PTHREADS
-#   include <pthread.h>
-#elif HAVE_OS2THREADS
-#   include "compat/os2threads.h"
-#elif HAVE_W32THREADS
-#   include "compat/w32pthreads.h"
-#endif
-
 #define VP8_MAX_QUANT 127
 
 enum dct_token {
index 62706f3..160076c 100644 (file)
 #include "log.h"
 #include "avassert.h"
 #include "opt.h"
-
-#if HAVE_THREADS
-#if HAVE_PTHREADS
-#include <pthread.h>
-#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;
index 3281e26..7c5cd24 100644 (file)
 
 #include "fifo.h"
 #include "threadmessage.h"
-#if HAVE_THREADS
-#if HAVE_PTHREADS
-#include <pthread.h>
-#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