Log in

View Full Version : How to test the performance of a DShow filter


jasonme
3rd December 2007, 08:05
Hello all,

I have a rookie question to ask. I have worked out a DShow filter, and I can use the filter to do the decoding by MPC. Now I want to know how fast my filter can process. I find that hard to test. If we decode, the decoder will restrain the speed of decoding to the display rate of the bis-stream, so it can not work under free-run mode. So under this kind of situation, how can I test the performance? Do I need some specific tools to do this? Thank you all you guys very much!

Dark Shikari
3rd December 2007, 08:06
TimeCodec.

KoD
3rd December 2007, 16:04
TimeCodec:
http://haali.cs.msu.ru/tmc.exe

Note: Haali says the results are not meaningful on multicore CPUs when using multithreaded decoders.

Sergey A. Sablin
4th December 2007, 10:59
TimeCodec:
http://haali.cs.msu.ru/tmc.exe

Note: Haali says the results are not meaningful on multicore CPUs when using multithreaded decoders.

check this out - http://forum.doom9.org/attachment.php?attachmentid=4541&d=1125055465
you'll need to connect your decoder in graphedit to this filter (Elecard Chegepuga, funny name, I know), turn off clock in the graph (menu Graph->Use Clock) and run the graph. Then (or in processing time) open property page of Chegepuga and you'll see current performance.

JohnnyMalaria
4th December 2007, 13:41
Depending on the what the decoder does, you could:

Use GraphEdit to build a graph that uses your decoder and either use a null renderer or use a standard renderer but turn off the graph's clock. This will make it run at maximum speed and you can open the renderer filter's property page while the graph is running to see the frame rate that is achieved.

Alternatively, use a high performance counter to time how long the Transform() function takes. Do this say 100 times and then display a message with the information.

Sergey A. Sablin
4th December 2007, 14:04
Depending on the what the decoder does, you could:

Use GraphEdit to build a graph that uses your decoder and either use a null renderer or use a standard renderer but turn off the graph's clock. This will make it run at maximum speed and you can open the renderer filter's property page while the graph is running to see the frame rate that is achieved.
very likely that video drivers will cap performance to display rate.
null renderer doesn't have such restriction, but doesn't have performance information as well.
above posted filter is in fact just null renderer with performance information.

Alternatively, use a high performance counter to time how long the Transform() function takes. Do this say 100 times and then display a message with the information.

that will do the work as well. just note that decoder might work on different thread with input pin (or use receive/deliver instead of transform), so it's better to measure performance inside decoder itself instead of direct show filter.


also measurements with any renderer will measure whole filter chain performance, in case you need only performance of your filter, than either measure clocks inside decoder, or run graph without decoder and than with decoder. or alternatively use performance analyzers like Intel VTune or AMD PerformanceAnalyst.

JohnnyMalaria
4th December 2007, 15:50
Sergey - sorry, I should have read your earlier reply more carefully but I was in a hurry. Nice to know we think alike.

Re the Transform() function, I did mean within the decoder function rather than outside - I didn't explain it as well as you!