Go to the documentation of this file.
45 static void worker_func(
void *priv,
int jobnr,
int threadnr,
int nb_jobs,
int nb_threads)
48 int ret =
c->func(
c->ctx,
c->arg, jobnr, nb_jobs);
59 void *
arg,
int *
ret,
int nb_jobs)
79 return FFMAX(nb_threads, 1);
101 return (
ret < 0) ?
ret : 0;
int(* func)(AVBPrint *dst, const char *in, const char *arg)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int nb_threads
Maximum number of threads used by filters in this graph.
int() avfilter_action_func(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
A function pointer passed to the AVFilterGraph::execute callback to be executed multiple times,...
void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_main)
Execute slice threading.
static void worker_func(void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads)
struct AVSliceThread AVSliceThread
void ff_graph_thread_free(FFFilterGraph *graph)
static int thread_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
int avpriv_slicethread_create(AVSliceThread **pctx, void *priv, void(*worker_func)(void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads), void(*main_func)(void *priv), int nb_threads)
Create slice threading context.
avfilter_action_func * func
avfilter_execute_func * thread_execute
static FFFilterGraph * fffiltergraph(AVFilterGraph *graph)
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
static int thread_init_internal(ThreadContext *c, int nb_threads)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int thread_type
Type of multithreading allowed for filters in this graph.
static void slice_thread_uninit(ThreadContext *c)
AVFilterGraph p
The public AVFilterGraph.
void avpriv_slicethread_free(AVSliceThread **pctx)
Destroy slice threading context.
int ff_graph_thread_init(FFFilterGraph *graphi)