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