changeset 33028:038ff73f9894

Enable both frame and slice threading.
author reimar
date Sat, 26 Mar 2011 13:00:11 +0000
parents 55de45e1d943
children 6b6320dcefdf
files libmpcodecs/vd_ffmpeg.c libmpcodecs/ve_lavc.c
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Mar 26 12:43:19 2011 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Mar 26 13:00:11 2011 +0000
@@ -439,6 +439,7 @@
         avctx->bits_per_coded_sample= sh->bih->biBitCount;
 
     avctx->thread_count = lavc_param_threads;
+    avctx->thread_type = FF_THREAD_FRAME | FF_THREAD_SLICE;
     /* open it */
     if (avcodec_open(avctx, lavc_codec) < 0) {
         mp_msg(MSGT_DECVIDEO, MSGL_ERR, MSGTR_CantOpenCodec);
--- a/libmpcodecs/ve_lavc.c	Sat Mar 26 12:43:19 2011 +0000
+++ b/libmpcodecs/ve_lavc.c	Sat Mar 26 13:00:11 2011 +0000
@@ -690,6 +690,7 @@
     }
 
     lavc_venc_context->thread_count = lavc_param_threads;
+    lavc_venc_context->thread_type = FF_THREAD_FRAME | FF_THREAD_SLICE;
 
     if (avcodec_open(lavc_venc_context, vf->priv->codec) != 0) {
 	mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec);