aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorAndreas Öman <andreas@olebyn.nu>2007-09-05 16:18:15 +0000
committerGuillaume Poirier <gpoirier@mplayerhq.hu>2007-09-05 16:18:15 +0000
commitafebe2f7cac1e23ea5b198cfe5bfabf5e7f1105f (patch)
treef60825730d3f0d4a625928812b5ef9651d3e302d /libavcodec/h264.h
parente146ce521f03b1cd472a61880a9438f55369d9d4 (diff)
downloadffmpeg-afebe2f7cac1e23ea5b198cfe5bfabf5e7f1105f.tar.gz
Add slice-based parallel H.264 decoding
Patch by Andreas Öman % andreas A olebyn P nu % NB: depends on having a thread library activated at config time, and on having a source encoded with multiple slices Original threads: date: May 18, 2007 11:00 PM subject: [FFmpeg-devel] Parallelized h264 proof-of-concept date: Jun 15, 2007 10:10 PM subject: [FFmpeg-devel] [PATCH] h264 parallelized, (was: Parallelized h264 proof-of-concept) date: Jun 25, 2007 7:02 PM subject: Re: [FFmpeg-devel] [PATCH] h264 parallelized Originally committed as revision 10407 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index d06bb33a42..8dd6cdd1af 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -380,6 +380,35 @@ typedef struct H264Context{
const uint8_t *field_scan8x8_cavlc_q0;
int x264_build;
+
+ /**
+ * @defgroup multithreading Members for slice based multithreading
+ * @{
+ */
+ struct H264Context *thread_context[MAX_THREADS];
+
+ /**
+ * current slice number, used to initalize slice_num of each thread/context
+ */
+ int current_slice;
+
+ /**
+ * Max number of threads / contexts.
+ * This is equal to AVCodecContext.thread_count unless
+ * multithreaded decoding is impossible, in which case it is
+ * reduced to 1.
+ */
+ int max_contexts;
+
+ /**
+ * 1 if the single thread fallback warning has already been
+ * displayed, 0 otherwise.
+ */
+ int single_decode_warning;
+
+ int last_slice_type;
+ /** @} */
+
}H264Context;
#endif /* H264_H */