Browse Source

lavc, lavu: use avutil/thread.h instead of redundant conditional includes

tags/n3.0
Clément Bœsch 9 years ago
parent
commit
a8bb81a05c
6 changed files with 6 additions and 52 deletions
  1. +1
    -8
      libavcodec/frame_thread_encoder.c
  2. +1
    -8
      libavcodec/pthread_frame.c
  3. +1
    -8
      libavcodec/utils.c
  4. +1
    -8
      libavcodec/vp8.h
  5. +1
    -9
      libavutil/opencl.c
  6. +1
    -11
      libavutil/threadmessage.c

+ 1
- 8
libavcodec/frame_thread_encoder.c View File

@@ -23,18 +23,11 @@
#include "libavutil/fifo.h" #include "libavutil/fifo.h"
#include "libavutil/avassert.h" #include "libavutil/avassert.h"
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "libavutil/thread.h"
#include "avcodec.h" #include "avcodec.h"
#include "internal.h" #include "internal.h"
#include "thread.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 MAX_THREADS 64
#define BUFFER_SIZE (2*MAX_THREADS) #define BUFFER_SIZE (2*MAX_THREADS)




+ 1
- 8
libavcodec/pthread_frame.c View File

@@ -26,14 +26,6 @@


#include <stdint.h> #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 "avcodec.h"
#include "internal.h" #include "internal.h"
#include "pthread_internal.h" #include "pthread_internal.h"
@@ -49,6 +41,7 @@
#include "libavutil/log.h" #include "libavutil/log.h"
#include "libavutil/mem.h" #include "libavutil/mem.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/thread.h"


/** /**
* Context used by codec threads and stored in their AVCodecInternal thread_ctx. * Context used by codec threads and stored in their AVCodecInternal thread_ctx.


+ 1
- 8
libavcodec/utils.c View File

@@ -41,6 +41,7 @@
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#include "libavutil/dict.h" #include "libavutil/dict.h"
#include "libavutil/thread.h"
#include "avcodec.h" #include "avcodec.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "me_cmp.h" #include "me_cmp.h"
@@ -59,14 +60,6 @@
# include <iconv.h> # include <iconv.h>
#endif #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" #include "libavutil/ffversion.h"
const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;




+ 1
- 8
libavcodec/vp8.h View File

@@ -27,20 +27,13 @@
#define AVCODEC_VP8_H #define AVCODEC_VP8_H


#include "libavutil/buffer.h" #include "libavutil/buffer.h"
#include "libavutil/thread.h"


#include "h264pred.h" #include "h264pred.h"
#include "thread.h" #include "thread.h"
#include "vp56.h" #include "vp56.h"
#include "vp8dsp.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 #define VP8_MAX_QUANT 127


enum dct_token { enum dct_token {


+ 1
- 9
libavutil/opencl.c View File

@@ -26,15 +26,7 @@
#include "log.h" #include "log.h"
#include "avassert.h" #include "avassert.h"
#include "opt.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" #include "atomic.h"


static pthread_mutex_t * volatile atomic_opencl_lock = NULL; static pthread_mutex_t * volatile atomic_opencl_lock = NULL;


+ 1
- 11
libavutil/threadmessage.c View File

@@ -20,17 +20,7 @@


#include "fifo.h" #include "fifo.h"
#include "threadmessage.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 { struct AVThreadMessageQueue {
#if HAVE_THREADS #if HAVE_THREADS


Loading…
Cancel
Save