Mercurial > libavcodec.hg
diff h264.h @ 5642:d2598034f2a9 libavcodec
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
author | gpoirier |
---|---|
date | Wed, 05 Sep 2007 16:18:15 +0000 |
parents | 4a26dc4ca11d |
children | b45894d869da |
line wrap: on
line diff
--- a/h264.h Wed Sep 05 11:05:33 2007 +0000 +++ b/h264.h Wed Sep 05 16:18:15 2007 +0000 @@ -380,6 +380,35 @@ 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 */