w32threads: support for frame multithreading

Replace our incomplete w32threads implementation with x264's pthreads
w32threads wrapper.
Relicensed to LGPL with kind permission by Pegasys Inc.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This commit is contained in:
Steven Walters
2011-10-09 21:38:35 +02:00
committed by Janne Grunau
parent b44522981c
commit 27237d524e
10 changed files with 230 additions and 190 deletions

View File

@ -723,7 +723,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
avctx->pkt = avpkt;
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
if (HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
if (HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ret = ff_thread_decode_frame(avctx, picture, got_picture_ptr,
avpkt);
else {
@ -1089,7 +1089,7 @@ const char *avcodec_license(void)
void avcodec_flush_buffers(AVCodecContext *avctx)
{
if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
if(HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ff_thread_flush(avctx);
else if(avctx->codec->flush)
avctx->codec->flush(avctx);
@ -1277,7 +1277,7 @@ unsigned int ff_toupper4(unsigned int x)
+ (toupper((x>>24)&0xFF)<<24);
}
#if !HAVE_PTHREADS
#if !HAVE_THREADS
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
{