FFmpeg
|
Go to the source code of this file.
Enumerations | |
enum | ThreadingStatus { FF_THREAD_IS_COPY, FF_THREAD_IS_FIRST_THREAD, FF_THREAD_NO_FRAME_THREADING } |
Functions | |
int | ff_thread_can_start_frame (AVCodecContext *avctx) |
void | ff_thread_finish_setup (AVCodecContext *avctx) |
If the codec defines update_thread_context(), call this when they are ready for the next thread to start decoding the next frame. More... | |
int | ff_thread_get_buffer (AVCodecContext *avctx, AVFrame *f, int flags) |
Wrapper around get_buffer() for frame-multithreaded codecs. More... | |
int | ff_slice_thread_execute_with_mainfunc (AVCodecContext *avctx, int(*action_func2)(AVCodecContext *c, void *arg, int jobnr, int threadnr), int(*main_func)(AVCodecContext *c), void *arg, int *ret, int job_count) |
int | ff_slice_thread_allocz_entries (AVCodecContext *avctx, int count) |
int | ff_slice_thread_init_progress (AVCodecContext *avctx) |
void | ff_thread_report_progress2 (AVCodecContext *avctx, int field, int thread, int n) |
void | ff_thread_await_progress2 (AVCodecContext *avctx, int field, int thread, int shift) |
enum ThreadingStatus | ff_thread_sync_ref (AVCodecContext *avctx, size_t offset) |
Allows to synchronize objects whose lifetime is the whole decoding process among all frame threads. More... | |
Multithreading API for decoders
Definition in file thread.h.
enum ThreadingStatus |
int ff_thread_can_start_frame | ( | AVCodecContext * | avctx | ) |
Definition at line 1010 of file pthread_frame.c.
Referenced by ff_mpv_frame_start(), and h264_frame_start().
void ff_thread_finish_setup | ( | AVCodecContext * | avctx | ) |
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().
avctx | The context. |
Definition at line 670 of file pthread_frame.c.
Referenced by frame_worker_thread().
int ff_thread_get_buffer | ( | AVCodecContext * | avctx, |
AVFrame * | f, | ||
int | flags | ||
) |
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().
avctx | The current context. |
f | The frame to write into. |
Definition at line 1046 of file pthread_frame.c.
Referenced by aic_decode_frame(), alloc_frame(), alloc_picture(), bitpacked_decode_yuv422p10(), cfhd_decode(), cllc_decode_frame(), cri_decode_frame(), decode_blocks(), decode_element(), decode_entropy_coded_image(), decode_frame(), decode_idat_chunk(), dnxhd_decode_frame(), dvvideo_decode_frame(), dxtory_decode_v1_410(), dxtory_decode_v1_420(), dxtory_decode_v1_444(), dxtory_decode_v1_rgb(), dxtory_decode_v2(), dxv_decode(), ff_progress_frame_get_buffer(), ff_thread_get_ext_buffer(), flac_decode_frame(), hap_decode(), hdr_decode_frame(), hevc_frame_start(), hqx_decode_frame(), init_image(), jpeg2000_decode_frame(), lag_decode_frame(), magy_decode_frame(), photocd_decode_frame(), pixlet_decode_frame(), qoi_decode_frame(), speedhq_decode_frame(), tak_decode_frame(), tta_decode_frame(), v410_decode_frame(), vble_decode_frame(), wavpack_decode_block(), and wbmp_decode_frame().
int ff_slice_thread_execute_with_mainfunc | ( | AVCodecContext * | avctx, |
int(*)(AVCodecContext *c, void *arg, int jobnr, int threadnr) | action_func2, | ||
int(*)(AVCodecContext *c) | main_func, | ||
void * | arg, | ||
int * | ret, | ||
int | job_count | ||
) |
int ff_slice_thread_allocz_entries | ( | AVCodecContext * | avctx, |
int | count | ||
) |
Definition at line 240 of file pthread_slice.c.
Referenced by hls_slice_data_wpp().
int ff_slice_thread_init_progress | ( | AVCodecContext * | avctx | ) |
Definition at line 179 of file pthread_slice.c.
Referenced by hevc_decode_init().
void ff_thread_report_progress2 | ( | AVCodecContext * | avctx, |
int | field, | ||
int | thread, | ||
int | n | ||
) |
Definition at line 210 of file pthread_slice.c.
Referenced by hls_decode_entry_wpp().
void ff_thread_await_progress2 | ( | AVCodecContext * | avctx, |
int | field, | ||
int | thread, | ||
int | shift | ||
) |
Definition at line 222 of file pthread_slice.c.
Referenced by hls_decode_entry_wpp().
enum ThreadingStatus ff_thread_sync_ref | ( | AVCodecContext * | avctx, |
size_t | offset | ||
) |
Allows to synchronize objects whose lifetime is the whole decoding process among all frame threads.
When called from a non-copy thread, do nothing. When called from another thread, place a new RefStruct reference at the given offset in the calling thread's private data from the RefStruct reference in the private data of the first decoding thread. The first thread must have a valid RefStruct reference at the given offset in its private data; the calling thread must not have a reference at this offset in its private data (must be NULL).
avctx | an AVCodecContext |
offset | offset of the RefStruct reference in avctx's private data |
FF_THREAD_IS_COPY | if frame-threading is in use and the calling thread is a copy; in this case, the RefStruct reference will be set. |
FF_THREAD_IS_MAIN_THREAD | if frame-threading is in use and the calling thread is the main thread. |
FF_THREAD_NO_FRAME_THREADING | if frame-threading is not in use. |
Definition at line 1794 of file decode.c.
Referenced by ff_mpv_decode_init(), and wavpack_decode_init().