FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | ThreadFrame |
Functions | |
void | ff_thread_report_progress (ThreadFrame *f, int progress, int field) |
Notify later decoding threads when part of their reference picture is ready. More... | |
void | ff_thread_await_progress (const ThreadFrame *f, int progress, int field) |
Wait for earlier decoding threads to finish reference pictures. More... | |
int | ff_thread_get_ext_buffer (AVCodecContext *avctx, ThreadFrame *f, int flags) |
Wrapper around ff_get_buffer() for frame-multithreaded codecs. More... | |
void | ff_thread_release_ext_buffer (ThreadFrame *f) |
Unref a ThreadFrame. More... | |
int | ff_thread_ref_frame (ThreadFrame *dst, const ThreadFrame *src) |
int | ff_thread_replace_frame (ThreadFrame *dst, const ThreadFrame *src) |
void ff_thread_report_progress | ( | ThreadFrame * | f, |
int | progress, | ||
int | field | ||
) |
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.
f | The picture being decoded. |
progress | Value, in arbitrary units, of how much of the picture has decoded. |
field | The field being decoded, for field-picture codecs. 0 for top field or frame pictures, 1 for bottom field. |
Definition at line 573 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().
void ff_thread_await_progress | ( | const ThreadFrame * | f, |
int | progress, | ||
int | field | ||
) |
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.
f | The picture being referenced. |
progress | Value, in arbitrary units, to wait for. |
field | The field being referenced, for field-picture codecs. 0 for top field or frame pictures, 1 for bottom field. |
Definition at line 596 of file pthread_frame.c.
int ff_thread_get_ext_buffer | ( | AVCodecContext * | avctx, |
ThreadFrame * | f, | ||
int | flags | ||
) |
Wrapper around ff_get_buffer() for frame-multithreaded codecs.
Call this function instead of ff_get_buffer() if you might need to wait for progress on this frame. 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 968 of file pthread_frame.c.
Referenced by alloc_frame(), alloc_picture(), decode_frame(), decode_idat_chunk(), mimic_decode_frame(), vp8_alloc_frame(), vp9_frame_alloc(), and wavpack_decode_block().
void ff_thread_release_ext_buffer | ( | ThreadFrame * | f | ) |
Unref a ThreadFrame.
This is basically a wrapper around av_frame_unref() and should be called instead of it.
avctx | The current context. |
f | The picture being released. |
Definition at line 996 of file pthread_frame.c.
Referenced by decode_frame(), decode_idat_chunk(), ff_h264_unref_picture(), ff_hevc_unref_frame(), ff_mpeg_unref_picture(), ffv1_decode_close(), h264_field_start(), mimic_decode_end(), mimic_decode_frame(), png_dec_end(), update_frames(), 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().
int ff_thread_ref_frame | ( | ThreadFrame * | dst, |
const ThreadFrame * | src | ||
) |
Definition at line 853 of file utils.c.
Referenced by ff_h264_ref_picture(), ff_mpeg_ref_picture(), h264_field_start(), hevc_ref_frame(), update_frames(), vp9_decode_frame(), and vp9_frame_ref().
int ff_thread_replace_frame | ( | ThreadFrame * | dst, |
const ThreadFrame * | src | ||
) |
Definition at line 872 of file utils.c.
Referenced by ff_h264_replace_picture().