Go to the source code of this file.
Multithreading support functions
Definition in file thread.h.
Wait for decoding threads to finish and reset internal state.
Called by avcodec_flush_buffers().
Definition at line 902 of file pthread_frame.c.
Referenced by avcodec_flush_buffers().
Submit a new frame to a decoding thread.
Returns the next available frame in picture. *got_picture_ptr will be 0 if none is available. The return value on success is the size of the consumed packet for compatibility with AVCodec.decode. This means the decoder has to consume the full packet.
Parameters are the same as AVCodec.decode.
Definition at line 503 of file pthread_frame.c.
Referenced by decode_simple_internal().
If the codec defines update_thread_context(), call this when they are ready for the next thread to start decoding the next frame.
After calling it, do not change any variables read by the update_thread_context() method, or call ff_thread_get_buffer().
Definition at line 632 of file pthread_frame.c.
Referenced by frame_worker_thread(), and thread_get_buffer_internal().
Notify later decoding threads when part of their reference picture is ready.
Call this when some part of the picture is finished decoding. Later calls with lower values of progress have no effect.
Definition at line 588 of file pthread_frame.c.
Referenced by decode(), decode_finish_row(), decode_frame(), decode_frame_common(), decode_nal_units(), decode_slice(), decode_tiles(), ff_h264_field_end(), ff_h264_queue_decode_slice(), ff_hevc_hls_filter(), ff_mpv_frame_end(), ff_mpv_frame_start(), ff_mpv_report_decode_progress(), ff_rv34_decode_frame(), finish_frame(), generate_missing_ref(), h264_field_start(), mimic_decode_frame(), rv34_decode_slice(), vp3_draw_horiz_band(), vp78_decode_frame(), vp78_decode_mb_row_sliced(), vp9_decode_frame(), and wavpack_decode_frame().
Wait for earlier decoding threads to finish reference pictures.
Call this before accessing some part of a picture, with a given value for progress, and it will return after the responsible decoding thread calls ff_thread_report_progress() with the same or higher value for progress.
Definition at line 611 of file pthread_frame.c.
Wrapper around get_format() for frame-multithreaded codecs.
Call this function instead of avctx->get_format(). Cannot be called after the codec has called ff_thread_finish_setup().
Definition at line 1020 of file pthread_frame.c.
Referenced by decode_frame_header(), get_format(), get_pixel_format(), mpeg_get_pixelformat(), and update_size().
Wrapper around get_buffer() for frame-multithreaded codecs.
Call this function instead of ff_get_buffer(f). Cannot be called after the codec has called ff_thread_finish_setup().
Definition at line 1048 of file pthread_frame.c.
Wrapper around release_buffer() frame-for multithreaded codecs.
Call this function instead of avctx->release_buffer(f). The AVFrame will be copied and the actual release_buffer() call will be performed later. The contents of data pointed to by the AVFrame should not be changed until ff_thread_get_buffer() is called on it.
Definition at line 1056 of file pthread_frame.c.
Referenced by av1_frame_unref(), decode_frame(), decode_idat_chunk(), ff_ffv1_close(), ff_h264_replace_picture(), ff_h264_unref_picture(), ff_hevc_unref_frame(), ff_mpeg_unref_picture(), ff_thread_ref_frame(), h264_field_start(), mimic_decode_end(), mimic_decode_frame(), png_dec_end(), update_frames(), vaapi_av1_decode_uninit(), vaapi_av1_end_frame(), vp3_decode_flush(), vp8_alloc_frame(), vp8_release_frame(), vp9_decode_flush(), vp9_decode_frame(), vp9_decode_free(), vp9_frame_unref(), wavpack_decode_block(), wavpack_decode_end(), and wavpack_decode_frame().
Definition at line 866 of file utils.c.
Referenced by av1_frame_ref(), ff_h264_ref_picture(), ff_h264_replace_picture(), ff_mpeg_ref_picture(), h264_field_start(), hevc_ref_frame(), update_frames(), vaapi_av1_end_frame(), vp9_decode_frame(), and vp9_frame_ref().
Definition at line 74 of file pthread.c.
Referenced by avcodec_open2().
Definition at line 86 of file pthread.c.
Referenced by avcodec_close().
Definition at line 201 of file pthread_slice.c.
Referenced by hls_slice_data_wpp().
Definition at line 238 of file pthread_slice.c.
Referenced by hls_slice_data_wpp().
Definition at line 174 of file pthread_slice.c.
Referenced by hls_decode_entry_wpp().
Definition at line 185 of file pthread_slice.c.
Referenced by hls_decode_entry_wpp().