FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
pthread_slice.c File Reference

Slice multithreading support functions. More...

#include "config.h"
#include "avcodec.h"
#include "internal.h"
#include "pthread_internal.h"
#include "thread.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/mem.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)
 

Functions

static void *attribute_align_arg worker (void *v)
 
void ff_slice_thread_free (AVCodecContext *avctx)
 
static av_always_inline void thread_park_workers (SliceThreadContext *c, int thread_count)
 
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_init (AVCodecContext *avctx)
 
void ff_thread_report_progress2 (AVCodecContext *avctx, int field, int thread, int n)
 
void ff_thread_await_progress2 (AVCodecContext *avctx, int field, int thread, int shift)
 
int ff_alloc_entries (AVCodecContext *avctx, int count)
 
void ff_reset_entries (AVCodecContext *avctx)
 

Detailed Description

Slice multithreading support functions.

See Also
doc/multithreading.txt

Definition in file pthread_slice.c.

Typedef Documentation

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

Definition at line 44 of file pthread_slice.c.

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

Definition at line 45 of file pthread_slice.c.

Function Documentation

static void* attribute_align_arg worker ( void v)
static

Definition at line 71 of file pthread_slice.c.

Referenced by ff_slice_thread_init().

void ff_slice_thread_free ( AVCodecContext avctx)

Definition at line 107 of file pthread_slice.c.

Referenced by ff_thread_free().

static av_always_inline void thread_park_workers ( SliceThreadContext c,
int  thread_count 
)
static

Definition at line 139 of file pthread_slice.c.

Referenced by ff_slice_thread_init(), and thread_execute().

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

Definition at line 146 of file pthread_slice.c.

Referenced by ff_slice_thread_init(), and thread_execute2().

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

Definition at line 179 of file pthread_slice.c.

Referenced by ff_slice_thread_init().

int ff_slice_thread_init ( AVCodecContext avctx)

Definition at line 186 of file pthread_slice.c.

Referenced by ff_thread_init().

void ff_thread_report_progress2 ( AVCodecContext avctx,
int  field,
int  thread,
int  n 
)

Definition at line 247 of file pthread_slice.c.

Referenced by hls_decode_entry_wpp().

void ff_thread_await_progress2 ( AVCodecContext avctx,
int  field,
int  thread,
int  shift 
)

Definition at line 258 of file pthread_slice.c.

Referenced by hls_decode_entry_wpp().

int ff_alloc_entries ( AVCodecContext avctx,
int  count 
)

Definition at line 274 of file pthread_slice.c.

Referenced by hls_slice_data_wpp().

void ff_reset_entries ( AVCodecContext avctx)

Definition at line 303 of file pthread_slice.c.

Referenced by hls_slice_data_wpp().