FFmpeg
Loading...
Searching...
No Matches
pthread_slice.c File Reference

Slice multithreading support functions. More...

#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "pthread_internal.h"
#include "thread.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/macros.h"
#include "libavutil/mem.h"
#include "libavutil/slicethread.h"

Go to the source code of this file.

Data Structures

struct  SliceThreadContext
 

Typedefs

typedef int action_func(AVCodecContext *c, void *arg)
 
typedef int action_func2(AVCodecContext *c, void *arg, int jobnr, int threadnr)
 
typedef int main_func(AVCodecContext *c)
 

Functions

static int main_function (void *priv)
 
static int worker_func (void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads)
 
av_cold void ff_slice_thread_free (AVCodecContext *avctx)
 
static int thread_execute (AVCodecContext *avctx, action_func *func, void *arg, int *ret, int job_count, int job_size)
 
static int thread_execute2 (AVCodecContext *avctx, action_func2 *func2, void *arg, int *ret, int job_count)
 
int ff_slice_thread_execute_with_mainfunc (AVCodecContext *avctx, action_func2 *func2, main_func *mainfunc, void *arg, int *ret, int job_count)
 
av_cold int ff_slice_thread_init (AVCodecContext *avctx)
 

Detailed Description

Slice multithreading support functions.

See also
doc/multithreading.txt

Definition in file pthread_slice.c.

Typedef Documentation

◆ action_func

typedef int action_func(AVCodecContext *c, void *arg)

Definition at line 37 of file pthread_slice.c.

◆ action_func2

typedef int action_func2(AVCodecContext *c, void *arg, int jobnr, int threadnr)

Definition at line 38 of file pthread_slice.c.

◆ main_func

typedef int main_func(AVCodecContext *c)

Definition at line 39 of file pthread_slice.c.

Function Documentation

◆ main_function()

static int main_function ( void * priv)
static

Definition at line 51 of file pthread_slice.c.

Referenced by ff_slice_thread_init().

◆ worker_func()

static int worker_func ( void * priv,
int jobnr,
int threadnr,
int nb_jobs,
int nb_threads )
static

◆ ff_slice_thread_free()

av_cold void ff_slice_thread_free ( AVCodecContext * avctx)

Definition at line 72 of file pthread_slice.c.

Referenced by ff_slice_thread_init(), and ff_thread_free().

◆ thread_execute()

static int thread_execute ( AVCodecContext * avctx,
action_func * func,
void * arg,
int * ret,
int job_count,
int job_size )
static

◆ thread_execute2()

static int thread_execute2 ( AVCodecContext * avctx,
action_func2 * func2,
void * arg,
int * ret,
int job_count )
static

Definition at line 100 of file pthread_slice.c.

Referenced by ff_slice_thread_init().

◆ ff_slice_thread_execute_with_mainfunc()

int ff_slice_thread_execute_with_mainfunc ( AVCodecContext * avctx,
action_func2 * func2,
main_func * mainfunc,
void * arg,
int * ret,
int job_count )

Definition at line 107 of file pthread_slice.c.

Referenced by vp9_decode_frame().

◆ ff_slice_thread_init()

av_cold int ff_slice_thread_init ( AVCodecContext * avctx)

Definition at line 115 of file pthread_slice.c.

Referenced by ff_thread_init().