Solved

Decode Rate VS Playback Rate using Directshow

Posted on 2007-03-22
1
291 Views
Last Modified: 2013-11-13
Hi Experts,
    This is the graph that I built using directshow

Source Filter (file) -> Transform Filters -> Decoder -> FPS Counter (trans-in-place) -> Renderer

FPS Counter's function will be called each time a sample has been decoded.
The function that is called basically outputs the system time using timeGetTime()
I placed FPS Counter between decoder and renderer in order to obtain "decode rate", because I need to test the performance of the decoder.

I tested this graph on
/windows/clock.avi
as many of you might already know, this video clip has a playback rate of 1 fps with a total of 12 frames.

but the results i got follows (in millisecond):

> 16356152
> 16356332     180 milliseconds
> 16356445     113 milliseconds
> 16357354     909 milliseconds
> 16358340     986 milliseconds
> 16359342     1002 milliseconds
> 16360349     1007 milliseconds
> 16361346     997 milliseconds
> 16362342     996 milliseconds
> 16363341     999 milliseconds
> 16364344     1003 milliseconds
> 16365341     997 milliseconds

the first column represents the system time returned on each call to FPS Counter, and the second column represents the time it took to decode that frame, merely the system time of the current frame minus the system time of the previous frame.

first three frames were being decoded in less than one second, while the subsequent frames were being decoded in roughly one second, equal to the playback rate.

My question is, does this data look reasonable?
I understand that decode rate does not necessarily equal to the playback rate, since the renderer needs to do time synchronozation.

but what i am concerned is the accuracy of this data, since it has a large variations betwen the beginning frames and subsequent frames.

are there any useful tools that can produce fps in decode rate rather than playback rate?

thanks!
0
Comment
Question by:fungi8210
1 Comment
 
LVL 22

Accepted Solution

by:
grg99 earned 500 total points
ID: 18778491
It looks like you have a fast computer that can decode a frame in around 100 to 200  msec.

But as soon as it has decoded a frame or two, the decoder has to wait until the previous frame has been displayed, that's why the time jumps up to around 1000 msec.

Everything is fine.



0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sameEnds challenge 3 133
Create a path if not exists 7 69
Safe conversion? 4 57
outlook office 365 8 82
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now