Go to the documentation of this file.
70 "Application has requested %d threads. Using a thread count greater than %d is not recommended.\n",
96 unsigned cnt = *(
unsigned*)((
char*)obj +
offsets[0]);
97 const unsigned *cur_offset =
offsets;
99 *(
unsigned*)((
char*)obj +
offsets[0]) = 0;
109 const unsigned *cur_offset =
offsets;
113 #define PTHREAD_INIT_LOOP(type) \
114 for (; *(++cur_offset) != THREAD_SENTINEL; cnt++) { \
115 pthread_ ## type ## _t *dst = (void*)((char*)obj + *cur_offset); \
116 err = pthread_ ## type ## _init(dst, NULL); \
118 err = AVERROR(err); \
126 *(
unsigned*)((
char*)obj +
offsets[0]) = cnt;
int ff_slice_thread_init(AVCodecContext *avctx)
#define AV_LOG_WARNING
Something somehow does not look correct.
int capabilities
Codec capabilities.
int ff_thread_init(AVCodecContext *avctx)
av_cold void ff_pthread_free(void *obj, const unsigned offsets[])
void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
const struct AVCodec * codec
int thread_count
thread count is used to decide how many independent tasks should be passed to execute()
int flags
AV_CODEC_FLAG_*.
#define AV_CODEC_FLAG_LOW_DELAY
Force low delay.
static const int offsets[]
int thread_type
Which multithreading methods to use.
static void validate_thread_parameters(AVCodecContext *avctx)
Set the threading algorithms used.
void ff_thread_free(AVCodecContext *avctx)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
#define AV_CODEC_FLAG_TRUNCATED
Input bitstream might be truncated at a random location instead of only at frame boundaries.
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
int flags2
AV_CODEC_FLAG2_*.
#define FF_THREAD_SLICE
Decode more than one part of a single frame at once.
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
#define FF_THREAD_FRAME
Decode more than one frame at once.
static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex)
int caps_internal
Internal codec capabilities.
int ff_frame_thread_init(AVCodecContext *avctx)
#define AV_CODEC_FLAG2_CHUNKS
Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
main external API structure.
int active_thread_type
Which multithreading methods are in use by the codec.
void ff_slice_thread_free(AVCodecContext *avctx)
#define PTHREAD_INIT_LOOP(type)
av_cold int ff_pthread_init(void *obj, const unsigned offsets[])
Initialize/destroy a list of mutexes/conditions contained in a structure.
#define FF_API_FLAG_TRUNCATED
int(* cond)(enum AVPixelFormat pix_fmt)