[FFmpeg-devel] [PATCH] Reimplementation of OS/2 threads model

KO Myung-Hun komh
Wed May 5 06:42:36 CEST 2010



Ramiro Polla wrote:
> On Thu, Apr 29, 2010 at 11:38 AM, KO Myung-Hun <komh at chollian.net> wrote:
>> Ramiro Polla wrote:
>>> On Thu, Apr 29, 2010 at 9:14 AM, KO Myung-Hun <komh at chollian.net> wrote:
>>>> Ramiro Polla wrote:
>>>>> On Wed, Apr 28, 2010 at 11:45 AM, KO Myung-Hun <komh at chollian.net> wrote:
>>>>> Also have you tested performance?
>>>> How can I do the performance tests ?
>>>
>>> I'm not that sure either. I was suggested to run mpeg2 decoding and dv
>>> encoding. I also tried encoding with x264 to see what would happen if
>>> pthreads-win32 and w32threads were mixed in the same process.
>>
>> It would be better if you provide the specific commands. ^^
> 
> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/108115
> 
> But you won't have -benchmark 2, so just use -benchmark.

I've done some performance tests using os2thread based on w32thread,
os2thread based on pthread and pthread lib.

The following is the result.

----- benchmark info
ffmpeg -threads x -i test.avi -benchmark -f null -y NUL

Input #0, mpeg, from 'test.avi':
  Duration: 00:11:56.95, start: 0.180111, bitrate: 1651 kb/s
    Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x240 [PAR 200:219
DAR 880:657], 104857 kb/s, 24 fps, 24 tbr, 90k tbn, 24 tbc
    Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, 2 channels, s16, 96 kb/s
Output #0, null, to 'NUL':
  Metadata:
    encoder         : Lavf52.61.0
    Stream #0.0: Video: rawvideo, yuv420p, 352x240 [PAR 200:219 DAR
880:657], q=2-31, 200 kb/s, 90k tbn, 24 tbc
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
-----

----- benchmark results
os2thread(w32thread)
1  51.531 51.500 51.640
2  54.726 54.711 54.407
4  54.453 54.484 54.453
8  54.453 54.383 54.297

os2thread(pthread with some optimizations)
1  51.469 51.695 51.336
2  54.172 54.453 54.133
4  54.718 54.765 54.899
8  56.172 56.282 56.046

pthread
1  51.492 51.140 51.218
2  55.203 55.101 55.195
4  56.094 55.907 55.930
8  58.242 57.594 57.820
-----

As you see, the best is os2thread based on w32thread and the worst is
pthread lib. The performance of pthread lib is getting far worse than
os2thread based on w32thread if using more threads.

However, these tests have been performed on a non-SMP system. So I'm not
sure this is true for SMP systems.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.3
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr




More information about the ffmpeg-devel mailing list