Unified · Split
| @@ -23,18 +23,11 @@ · 22 unmodified lines | ||
| 23 | 23 | #include "libavutil/fifo.h" |
| 24 | 24 | #include "libavutil/avassert.h" |
| 25 | 25 | #include "libavutil/imgutils.h" |
| 26 | +#include "libavutil/thread.h" | |
| 26 | 27 | #include "avcodec.h" |
| 27 | 28 | #include "internal.h" |
| 28 | 29 | #include "thread.h" |
| 29 | 30 | |
| 30 | −#if HAVE_PTHREADS | |
| 31 | −#include <pthread.h> | |
| 32 | −#elif HAVE_W32THREADS | |
| 33 | −#include "compat/w32pthreads.h" | |
| 34 | −#elif HAVE_OS2THREADS | |
| 35 | −#include "compat/os2threads.h" | |
| 36 | −#endif | |
| 37 | − | |
| 38 | 31 | #define MAX_THREADS 64 |
| 39 | 32 | #define BUFFER_SIZE (2*MAX_THREADS) |
| 40 | 33 | |
| @@ -26,14 +26,6 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | #include <stdint.h> |
| 28 | 28 | |
| 29 | −#if HAVE_PTHREADS | |
| 30 | −#include <pthread.h> | |
| 31 | −#elif HAVE_W32THREADS | |
| 32 | −#include "compat/w32pthreads.h" | |
| 33 | −#elif HAVE_OS2THREADS | |
| 34 | −#include "compat/os2threads.h" | |
| 35 | −#endif | |
| 36 | − | |
| 37 | 29 | #include "avcodec.h" |
| 38 | 30 | #include "internal.h" |
| 39 | 31 | #include "pthread_internal.h" |
| @@ -49,6 +41,7 @@ · 9 unmodified lines | ||
| 49 | 41 | #include "libavutil/log.h" |
| 50 | 42 | #include "libavutil/mem.h" |
| 51 | 43 | #include "libavutil/opt.h" |
| 44 | +#include "libavutil/thread.h" | |
| 52 | 45 | |
| 53 | 46 | /** |
| 54 | 47 | * Context used by codec threads and stored in their AVCodecInternal thread_ctx. |
| @@ -41,6 +41,7 @@ · 40 unmodified lines | ||
| 41 | 41 | #include "libavutil/imgutils.h" |
| 42 | 42 | #include "libavutil/samplefmt.h" |
| 43 | 43 | #include "libavutil/dict.h" |
| 44 | +#include "libavutil/thread.h" | |
| 44 | 45 | #include "avcodec.h" |
| 45 | 46 | #include "libavutil/opt.h" |
| 46 | 47 | #include "me_cmp.h" |
| @@ -59,14 +60,6 @@ · 12 unmodified lines | ||
| 59 | 60 | # include <iconv.h> |
| 60 | 61 | #endif |
| 61 | 62 | |
| 62 | −#if HAVE_PTHREADS | |
| 63 | −#include <pthread.h> | |
| 64 | −#elif HAVE_W32THREADS | |
| 65 | −#include "compat/w32pthreads.h" | |
| 66 | −#elif HAVE_OS2THREADS | |
| 67 | −#include "compat/os2threads.h" | |
| 68 | −#endif | |
| 69 | − | |
| 70 | 63 | #include "libavutil/ffversion.h" |
| 71 | 64 | const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; |
| 72 | 65 | |
| @@ -27,20 +27,13 @@ · 26 unmodified lines | ||
| 27 | 27 | #define AVCODEC_VP8_H |
| 28 | 28 | |
| 29 | 29 | #include "libavutil/buffer.h" |
| 30 | +#include "libavutil/thread.h" | |
| 30 | 31 | |
| 31 | 32 | #include "h264pred.h" |
| 32 | 33 | #include "thread.h" |
| 33 | 34 | #include "vp56.h" |
| 34 | 35 | #include "vp8dsp.h" |
| 35 | 36 | |
| 36 | −#if HAVE_PTHREADS | |
| 37 | −# include <pthread.h> | |
| 38 | −#elif HAVE_OS2THREADS | |
| 39 | −# include "compat/os2threads.h" | |
| 40 | −#elif HAVE_W32THREADS | |
| 41 | −# include "compat/w32pthreads.h" | |
| 42 | −#endif | |
| 43 | − | |
| 44 | 37 | #define VP8_MAX_QUANT 127 |
| 45 | 38 | |
| 46 | 39 | enum dct_token { |
| @@ -26,15 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | #include "log.h" |
| 27 | 27 | #include "avassert.h" |
| 28 | 28 | #include "opt.h" |
| 29 | − | |
| 30 | −#if HAVE_THREADS | |
| 31 | −#if HAVE_PTHREADS | |
| 32 | −#include <pthread.h> | |
| 33 | −#elif HAVE_W32THREADS | |
| 34 | −#include "compat/w32pthreads.h" | |
| 35 | −#elif HAVE_OS2THREADS | |
| 36 | −#include "compat/os2threads.h" | |
| 37 | −#endif | |
| 29 | +#include "thread.h" | |
| 38 | 30 | #include "atomic.h" |
| 39 | 31 | |
| 40 | 32 | static pthread_mutex_t * volatile atomic_opencl_lock = NULL; |
| @@ -20,17 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | |
| 21 | 21 | #include "fifo.h" |
| 22 | 22 | #include "threadmessage.h" |
| 23 | −#if HAVE_THREADS | |
| 24 | −#if HAVE_PTHREADS | |
| 25 | −#include <pthread.h> | |
| 26 | −#elif HAVE_W32THREADS | |
| 27 | −#include "compat/w32pthreads.h" | |
| 28 | −#elif HAVE_OS2THREADS | |
| 29 | −#include "compat/os2threads.h" | |
| 30 | −#else | |
| 31 | −#error "Unknown threads implementation" | |
| 32 | −#endif | |
| 33 | −#endif | |
| 23 | +#include "thread.h" | |
| 34 | 24 | |
| 35 | 25 | struct AVThreadMessageQueue { |
| 36 | 26 | #if HAVE_THREADS |