Commit 2c266656 authored by Dennis van Amerongen's avatar Dennis van Amerongen

* modules/codec/x264.c: backport [25152] fix for x264 threads=0 (auto)

parent 5d486354
......@@ -5,7 +5,7 @@ Changes between 0.8.6d and 0.8.6e (not yet released):
Various bugfixes:
* Resume playback for viewing content over FTP
* Fix XShm detection with remote X11
* Fixed XShm detection with remote X11
Security updates:
* Subtitle demuxers overflow (CVE-2007-6681)
......@@ -24,13 +24,16 @@ Audio output:
* Fixed 5.1 audio on ALSA
Access:
* Fix some RTSP hanging and user/password passing through RTSP URLs
* Fixed some RTSP hanging and user/password passing through RTSP URLs
Stream output:
* Fixed waiting for SPS/PPS problem in H.264 packetizer
Encoders:
* Improved compatibility for creating H.264 video playable on iPhones
* Fixed detection of optimal amount of threads for multi-threaded H.264
encoding on multi-cpu systems
- Note that this is used when transcode threads is set to 0 (default)
Mac OS X Interface & Port:
* Restored compatibility with Mac OS X 10.3.9
......
......@@ -1057,12 +1057,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
/* Open the encoder */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment