History

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

Clément Bœsch committed 10 years ago

Commit a8bb81a1 parent a0050d96 files · +6 −52Browse files

Unified · Split

6 files
  1. libavcodec/frame_thread_encoder.c +1 −8
  2. libavcodec/pthread_frame.c +1 −8
  3. libavcodec/utils.c +1 −8
  4. libavcodec/vp8.h +1 −8
  5. libavutil/opencl.c +1 −9
  6. libavutil/threadmessage.c +1 −11
libavcodec/frame_thread_encoder.c+1−8
@@ -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 6431#define MAX_THREADS 64
39#define BUFFER_SIZE (2*MAX_THREADS)32#define BUFFER_SIZE (2*MAX_THREADS)
40 33
libavcodec/pthread_frame.c+1−8
@@ -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.
libavcodec/utils.c+1−8
@@ -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#endif61#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"
71const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;64const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
72 65
libavcodec/vp8.h+1−8
@@ -27,20 +27,13 @@ · 26 unmodified lines
27#define AVCODEC_VP8_H27#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 12737#define VP8_MAX_QUANT 127
45 38
46enum dct_token {39enum dct_token {
libavutil/opencl.c+1−9
@@ -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
40static pthread_mutex_t * volatile atomic_opencl_lock = NULL;32static pthread_mutex_t * volatile atomic_opencl_lock = NULL;
libavutil/threadmessage.c+1−11
@@ -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_THREADS23#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
35struct AVThreadMessageQueue {25struct AVThreadMessageQueue {
36#if HAVE_THREADS26#if HAVE_THREADS

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t