[MPlayer-cvslog] r33119 - in trunk/libmpcodecs: vd.c vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Sat Mar 26 19:37:05 CET 2011


Author: reimar
Date: Sat Mar 26 19:37:05 2011
New Revision: 33119

Log:
Disable the combination of slices and multithreaded decode by default, it
usually results in a fully black picture.

Modified:
   trunk/libmpcodecs/vd.c
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd.c
==============================================================================
--- trunk/libmpcodecs/vd.c	Sat Mar 26 17:11:18 2011	(r33118)
+++ trunk/libmpcodecs/vd.c	Sat Mar 26 19:37:05 2011	(r33119)
@@ -128,7 +128,7 @@ int opt_screen_size_y = 0;
 float screen_size_xy = 0;
 float movie_aspect = -1.0;
 int vo_flags = 0;
-int vd_use_slices = 1;
+int vd_use_slices = -1;
 
 /** global variables for gamma, brightness, contrast, saturation and hue
     modified by mplayer.c and gui/mplayer/gtk/eq.c:

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sat Mar 26 17:11:18 2011	(r33118)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sat Mar 26 19:37:05 2011	(r33119)
@@ -265,6 +265,9 @@ static int init(sh_video_t *sh){
     AVCodec *lavc_codec;
     int lowres_w=0;
     int do_vis_debug= lavc_param_vismv || (lavc_param_debug&(FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP));
+    // slice is rather broken with threads, so disable that combination unless
+    // explicitly requested
+    int use_slices = vd_use_slices > 0 || (vd_use_slices <  0 && lavc_param_threads <= 1);
 
     init_avcodec();
 
@@ -280,7 +283,7 @@ static int init(sh_video_t *sh){
         return 0;
     }
 
-    if(vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
+    if(use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
         ctx->do_slices=1;
 
     if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ && lavc_codec->id != CODEC_ID_VP8 && lavc_codec->id != CODEC_ID_LAGARITH)


More information about the MPlayer-cvslog mailing list