Go to the documentation of this file.
27 #ifndef AVCODEC_THREAD_H
28 #define AVCODEC_THREAD_H
@ FF_THREAD_IS_FIRST_THREAD
This structure describes decoded (raw) audio or video data.
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.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
@ FF_THREAD_NO_FRAME_THREADING
int() main_func(AVCodecContext *c)
int() action_func2(AVCodecContext *c, void *arg, int jobnr, int threadnr)
main external API structure.
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 st...
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)
#define flags(name, subs,...)
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags)
Wrapper around get_buffer() for frame-multithreaded codecs.
int ff_thread_can_start_frame(AVCodecContext *avctx)