[parsec-users] x264 Threading Model

Sudhanshu Shukla sudhan345 at gmail.com
Sat Apr 23 06:19:15 EDT 2011


Hi All,

I am trying to understand the threading in x264. The following post on the
parsec-users (
https://lists.cs.princeton.edu/pipermail/parsec-users/2009-August/000490.html)
sates
that

"X264 spawns one thread per frame to encode, but no more than the number of
threads you specify are running at once. In other words, the number of
threads you pass to the program determines the maximum number of threads
that exist at any time, but the number of threads that exist over the
lifetime of the program is determined by the input video."

Thus, following the above post, the number of threads created for the
simmedium input (32 frames) the number of threads created over the
lifetime of the application should be 32.

But when I track the number of threads created by a modified version
of malloc_mt pintool
(http://www.cs.virginia.edu/kim/publicity/pin/docs/39599/Pin/html/index.html#MallocMT),
the number of threads created over the lifetime of the application is
64.

Is this expected or I am missing some thing? Can somebody explain the
threading model used in x264?

Thanks

Sudhanshu Shukla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20110423/07bc8fa9/attachment.html>


More information about the parsec-users mailing list