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 627 of file pthread_frame.c.
Referenced by decode_finish_row(), decode_nal_units(), ff_h264_field_end(), ff_h264_queue_decode_slice(), and h264_field_start().
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 650 of file pthread_frame.c.
Referenced by await_reference_mb_row(), await_references(), guess_mv(), and h264_field_start().
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 1057 of file pthread_frame.c.
Referenced by alloc_picture().
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 1078 of file pthread_frame.c.
Referenced by ff_h264_unref_picture(), and h264_field_start().
int ff_thread_ref_frame | ( | ThreadFrame * | dst, |
const ThreadFrame * | src | ||
) |
Definition at line 851 of file utils.c.
Referenced by ff_h264_ref_picture(), and h264_field_start().
int ff_thread_replace_frame | ( | ThreadFrame * | dst, |
const ThreadFrame * | src | ||
) |
Definition at line 870 of file utils.c.
Referenced by ff_h264_replace_picture().