VMR9 on ATI graphics, and how to render a frame immediately
- From: "Barry.Neilsen@xxxxxxxxx" <Barry.Neilsen@xxxxxxxxx>
- Date: Wed, 24 Oct 2007 07:46:02 -0700
Hi,
I have a pair of filters designed to perform trick play operations on
an MPEG stream. My filters sit either side of the decoder in the
graph, and pass samples though the decoder until an complete GOP has
been decoded into an array of sample buffers. The sample array sits
in the downstream filter, but the samples themselves are obtained from
the renderer. The downstream filter then passes each frame to the
renderer when needed. (My renderer is a VMR9 in renderless mode with
a custom Allocator-Presenter.)
Since we could be single stepping or playing in slow motion, I want my
downstream filter to decide when a frame should be rendered and not
rely on the renderer to schedule the sample. According to the
DirectShow docs article on Time Stamps, "if the sample arrives late,
or has no time stamp, the filter renders the sample immediately."
This is exactly what I want, so in my downstream filter I deliberately
clear the sample's time stamp with a call to to pSample->SetTime(NULL,
NULL), before calling Receive() on the renderer's input pin.
Now the fun starts: I just happened to develop all this on a couple of
PCs that use NVidia graphics hardware, and everything worked
wonderfully. When I tried things on a couple of PCs that use ATI
graphics hardware things break down. Specifically, the VMR9 delivers
blank or trashed video frames.
The whole mechanism is still apparently running and PresentImage()
*is* called on my allocator-presenter. I've used
D3DXSaveSurfaceToFile() the check that valid frames are still passed
to the VMR9, and I've used the same trick to verify that the surface
that's passed to PresentImage() is indeed empty or contains garbage.
So, why might ATI hardware behave differently to NVidia in this
respect?
(As a kludge, I found that setting a time stamp on the input sample
makes the mechanism work with ATI hardware, too, and I can even set
the *same* time stamp on all samples, but this is something I'd rather
not do because a) it's a kludge, b) it's a kludge that I don't
understand and c) the code doesn't always 'know' what to use as a
valid time.)
As ever, any thoughts would be much appreciated.
BN
.
- Follow-Ups:
- Re: VMR9 on ATI graphics, and how to render a frame immediately
- From: Alessandro Angeli
- Re: VMR9 on ATI graphics, and how to render a frame immediately
- Prev by Date: Alpha blending video
- Next by Date: Re: ASF custom file type
- Previous by thread: Alpha blending video
- Next by thread: Re: VMR9 on ATI graphics, and how to render a frame immediately
- Index(es):
Relevant Pages
|