Jump to content
  • Advertisement
Sign in to follow this  
Weeb

VMR9 custom allocator choppy???

This topic is 4610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When implimenting the sample for directshow that provides a custom allocator and presenter the playback seem choppy. The cycle seems to repeat. Here is what happens. When the video is being played back it seems like it is rendering fine for about a second and then suddenly skips ahead a couple frames and starts rendering fine again. This is kind of hard to see except for when there is scrolling text, a ticker, on the bottom. Then it is really obvious. Does anyone know what the performance problems are with this example? Has anyone else experiences a similar thing. I am rendering 3 videos on top of eachother, but only one video is visble at any point in time. Alpha values are constant and I just switch the z-order when I want to display another video. I do it this way because I am still presenting all the videos elsewhere on the screen. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Three video might potentially be a little much, but not necessarily. I'd suggest also rendering something else on the screen too, just a red box sliding across the screen 1 pixel per frame, or something like that. If the sliding box also jerks every second or so, then you don't have a problem with DirectShow's filter graph stream, but instead of a problem with Direct3D's present call, or something else related to the rendering itself.

Also, are you running this fullscreen on an LCD? I've had problems with smooth animation on LCDs, because apparently they don't stick excessively closely to a refresh rate. The refresh rate of the screen tends to get off from the refresh rate of the card around once a second, in my experience, resulting in a jerk. Switching to a CRT makes it look beautifully smooth. Can't do much about that, as far as I'm aware.

Share this post


Link to post
Share on other sites
I a running dual displays, my promary is an LCD and the secondary is a CRT. They both seem to have this problem, but maybe it still has something to do with what you are saying with the monitors. That is interesting.

Secondly, if there are no real issues with the custom-allocator example, is my only option to run faster CPUs???

Share this post


Link to post
Share on other sites
Have you tried it with only one or two videos at a time, rather than three? That could go a long way towards determining if you're merely running out of time to decode all three videos simultaneously, along with doing all the copying/rendering associated with it.

It might also be useful to query the VMR9 for the IQualProp interface. That can give you information on framerate and such.

Finally, in my experience, while additional CPU power can hide problems such as this, there are often ways to fix the problems without extra CPU power. In DirectShow, I've found that having the wrong media type connections can cause problems; sometimes even a whole filter that I figured would be insignificant turned out otherwise. Check your filter graph carefully, see if there might be anything suspicious looking, such as media types that sound like it might take some processing to convert to, filters that aren't really needed, etcetera. (I was recently using an Infinite Tee Filter, for future expansion of rendering to multiple devices; I would send the file through any splitters/decoders, and then send the final stream to the splitter. That splitter would send the stream to multiple VMR9s, one for each device. At the moment I only have one device, though, so I figured the splitter was insignificant. Somewhere I messed stuff up, though, and video runs slightly slower than it use to, and I think it might have something to do with that splitter.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!