H264SliceContext *slice_ctx;
int nb_slice_ctx;
+ int nb_slice_ctx_queued;
H2645Packet pkt;
int nal_ref_idc;
int nal_unit_type;
+ int has_slice; ///< slice NAL is found in the packet, set by decode_nal_units, its state does not need to be preserved outside h264_decode_frame()
+
/**
* Used to parse AVC variant of H.264
*/
*/
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 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);