VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Banned
    Join Date
    Nov 2005
    Location
    United States
    Search Comp PM
    how many times has someone, on some forum, posted a question concerning the speed of his/her encoding and someone, supposedly knowledgeable, has chimed in with "the decoder is your bottleneck" or "the filter(s) you are using is/are single threaded" or some similar "observation", usually based on absolutely nothing more than that's what they heard from someone else and just want to feel smart by repeating it.

    well, i was bored and decided to run a number of experimental test encodes to see just how much a cpu is working at a given task. fortunately for me, my job was made a lot easier because the latest media coder actually tracks cpu usage of both the encoder and decoder, so with various tests i was able to monitor the cpu load of each to see if a pattern could be discerned.

    the test configuration was a phenom 2 x4 620, gts 250 1 gig, 6 gigs ddr2 667, vista 64 bit, media coder 2011 build 5033 x64.

    background tasks - utorrent, peerblock, ad aware, avira antivir, avg free, windows firewall, clam antivirus. total cpu usage ~ 10%.

    idle gpu usage - 25mb, 0% gpu load, 3% memory controller load, video engine load 0%, as confirmed by gpu-z.

    source 1 - mpeg-2 8400 kbps, 16:9, 29.97fps, 720x480p, 6 channel ac3 384 kbps, 48 khz, vob container

    audio decoder - mplayer
    audio encoder - ffmpeg
    video decoder - mencoder

    target 1 - x264, 3000 kbps, 16:9, 29.97, 720x480p, 2 channel ac3, 128 kbps, 48 khz, mkv container, preset = ultra fast, 2 b frames, 1 reference frame, tune = normal, main, 4.0

    cpu usage decoder - 20% fluctuated between 15% and 25%
    cpu usage encoder - 60% flucated between 45% and 70%
    total cpu usage - ~ 100%
    235 fps

    same test, preset = medium
    cpu usage decoder - <7%
    cpu usage encoder - 90%
    total cpu usage - ~100%
    45 fps

    same test, preset = very slow
    cpu usage decoder - .8% - 1.5%
    cpu usage encoder - 92% - 97%
    total cpu usage - ~100%
    9.2 fps

    target 2 - same source, xvid, high quality mode, quarter pixel, gmc, medium search, motion est. 6, use assembly optimization = no, sse3/ssse3 disabled, all other as x264 test

    cpu usage decoder - .8% to 1.5%
    cpu usage encoder - 55% to 70%
    total cpu usage - ~70%
    8.8 fps

    same test, SSE3/SSSE3 enabled
    cpu usage decoder - same as above
    cpu usage encoder - same as above
    total cpu usage - same as above
    8.8 fps

    same test, assembler optimization = on
    cpu usage decoder - 1.5% - 4.5%
    cpu usage encoder - 60% - 65%
    total cpu usage - 65% - 70%
    27.3 fps

    same test, sse3/ssse3 and assembler optimization = on
    cpu usage decoder - same as above
    cpu usage encoder - 55% - 65%
    total cpu usage - ~ 70%
    26-29 fps

    target 3 - cuda, main, 4.0, 2 b frames
    cpu usage decoder - ~ 20%
    cpu usage encoder - ~ 55%
    gpu usage encoder - 63%
    video engine load - 3%
    memory controller load - 3%
    gpu memory used 63 mb
    total cpu usage - 90%
    218 fps

    source 2 - vc-1, 11 mb/s, advanced profile, level 3, 1920x1080p, 23.97 fps, ac3, 256 kbps, 2 channel, 48 khz, mkv container
    test targets - same as previous tests except target resolution was 1920x1080p and target bit rate was 8 mb/s

    x264, ultra fast
    cpu usage decoder - 25%
    cpu usage encoder - <32%
    total cpu usage - 65% - 70%
    26 fps

    xvid, assembler and sse3/ssse3 enabled
    cpu usage decoder - 3% - 5%
    cpu usage encoder - <70%
    total cpu usage - <80%
    5.1 fps

    cuda
    cpu usage decoder - <29%
    cpu usage encoder - 25% - 30%
    gpu usage encoder - 32%
    video engine load - 0%
    memory controller load - 2%
    gpu memory used - 113 mb
    total cpu usage - <70%
    27 fps

    so what can we conclude? i think it's obvious that the bottleneck is not in fact the decoder but the encoder, when i standardized all the decoders and simply isolated the encoder the cpu usage of each changed dramatically, and even using more aggressive settings within an encoder changed how much cpu time was used by the decoder. basically it looks like the software decoders we have are capable of feeding data to the encoder as fast as the encoder will accept it, so anyone that tells you that we need gpu powered decoders or that your decoder is the bottleneck, clearly has no idea what he/she/it is talking about.
    Quote Quote  
  2. Member
    Join Date
    Nov 2005
    Location
    United States
    Search Comp PM
    great test deadrats....thanx for the effort
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    What "the decoder" is will depend on what file format you are decoding, what software you are using to decode it.

    More compressed formats as a general rule require more work to decode.
    (Eg, H264 compared with MPEG1).

    And similarly to encode; to stream to uncompressed format takes very little power compared with encoding to MKV.

    It's not obvious which side filtering should be counsted at either.
    Might be better to consider it a separate stage.
    Quote Quote  
  4. If you are working with uncompressed video the drive may become the bottleneck. And if you stick a slow filter in between a fast decoder and encoder the filter may become the bottleneck. So you have to consider all stages of the pipeline.
    Quote Quote  
  5. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    in addition to above notes..

    background tasks - utorrent, peerblock, ad aware, avira antivir, avg free, windows firewall, clam antivirus. total cpu usage ~ 10%.
    don't forget about network spikes, that includes wifi and also including each of the software you listed plus any m$ hidden things running in the background, these all gives spikes in cpu and at different levels. i know when i am capturing, if i forget to turn off my wifi, it get dropped frames at different intervals. when i had my built-in network card turned on in bios my captures would drop frames, same situation. i have to turn it off in bios.

    -vhelp 5483
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!