]> git.sesse.net Git - vlc/blobdiff - modules/codec/x264.c
More cases were p_md was not checked in Mozilla toolbar code.
[vlc] / modules / codec / x264.c
index c009e2fe3e47becd35e4f25c3166f4efe2fac366..5f56815603b557cd0fb01ad49ce68d53939a5d4a 100644 (file)
@@ -715,7 +715,8 @@ static int  Open ( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    msg_Dbg ( p_enc, "x264 core:%d", X264_BUILD );
+    /* X264_POINTVER or X264_VERSION are not available */
+    msg_Dbg ( p_enc, "version x264 0.%d.X", X264_BUILD );
 
 #if X264_BUILD < 37
     if( p_enc->fmt_in.video.i_width % 16 != 0 ||
@@ -1164,12 +1165,13 @@ static int  Open ( vlc_object_t *p_this )
         p_sys->param.cpu &= ~X264_CPU_SSE2;
     }
 
+    /* BUILD 29 adds support for multi-threaded encoding while BUILD 49 (r543)
+       also adds support for threads = 0 for automatically selecting an optimal
+       value (cores * 1.5) based on detected CPUs. Default behavior for x264 is
+       threads = 1, however VLC usage differs and uses threads = 0 (auto) by
+       default unless ofcourse transcode threads is explicitly specified.. */
 #if X264_BUILD >= 29
-    /* As of r543 x264 will autodetect the number of cpus and will set
-       the number of threads accordingly unless ofcourse the number of
-       threads is explicitly specified... */
-    if( p_enc->i_threads >= 1 )
-        p_sys->param.i_threads = p_enc->i_threads;
+    p_sys->param.i_threads = p_enc->i_threads;
 #endif
 
     var_Get( p_enc, SOUT_CFG_PREFIX "stats", &val );
@@ -1187,7 +1189,9 @@ static int  Open ( vlc_object_t *p_this )
         p_sys->param.rc.b_stat_read = val.i_int & 2;
     }
 
-    /* We need to initialize pthreadw32 before we open the encoder, but only oncce for the whole application. Since pthreadw32 doesn't keep a refcount, do it ouurselves */
+    /* We need to initialize pthreadw32 before we open the encoder,
+       but only oncce for the whole application. Since pthreadw32
+       doesn't keep a refcount, do it ourselves. */
 #ifdef PTW32_STATIC_LIB
     vlc_value_t lock, count;