summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264dec.h
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-01-17 15:26:38 +0100
committerClément Bœsch <u@pkh.me>2017-01-24 16:13:03 +0100
commit744801989099df26e90b00062c645969c5347533 (patch)
tree776f86b3709a4355e967712065866fb89297be19 /libavcodec/h264dec.h
parent1033f56b074d0aaf95fe2a0c356cd63cbb7f31aa (diff)
parent38efff92f1ef81f3de20ff0460ec7b70c253d714 (diff)
downloadffmpeg-streaming-744801989099df26e90b00062c645969c5347533.zip
ffmpeg-streaming-744801989099df26e90b00062c645969c5347533.tar.gz
Merge commit '38efff92f1ef81f3de20ff0460ec7b70c253d714'
* commit '38efff92f1ef81f3de20ff0460ec7b70c253d714': FATE: add a test for H.264 with two fields per packet h264: fix decoding multiple fields per packet with slice threads This merge includes two commits because the FATE test was useful in order to make proper testing. The merge gets rid of the now unused: - SLICE_SINGLETHREAD and SLICE_SKIPED macros - max_contexts - "again" label in decode_nal_units() This commit also includes the fix from d3e4d406b. Thanks to wm4 and Michael Niedermayer for their testing. Merged-by: Clément Bœsch <u@pkh.me> Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Diffstat (limited to 'libavcodec/h264dec.h')
-rw-r--r--libavcodec/h264dec.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index fa5c98e..5f868b7 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -353,6 +353,7 @@ typedef struct H264Context {
H264SliceContext *slice_ctx;
int nb_slice_ctx;
+ int nb_slice_ctx_queued;
H2645Packet pkt;
@@ -491,20 +492,6 @@ typedef struct H264Context {
*/
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;
-
/** @} */
/**
@@ -848,10 +835,14 @@ void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl, int y,
int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
const H2645NAL *nal);
-#define SLICE_SINGLETHREAD 1
-#define SLICE_SKIPED 2
-
-int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count);
+/**
+ * Submit a slice for decoding.
+ *
+ * Parse the slice header, starting a new field/frame if necessary. If any
+ * slices are queued for the previous field, they are decoded.
+ */
+int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal);
+int ff_h264_execute_decode_slices(H264Context *h);
int ff_h264_update_thread_context(AVCodecContext *dst,
const AVCodecContext *src);
OpenPOWER on IntegriCloud