Re: Transparent bitmaps and ISampleGrabberCB::BufferCB



On Mon, 23 Jan 2006 17:05:20 -0000, Mark Raishbrook wrote:

> Thanks for the reply, Iain. That did the trick.
>
> I'm not quite out of the woods yet, though (appalling pun!).
> My source bitmaps are subtitles that have been previously
> rendered as 24-bit, 720 x 576 bmp files. It takes
> approximately 15 ms to blit one of these bitmaps onto a
> sample/frame. As I'm working with PAL video that should be
> fine as samples are delivered every 40 ms, but the resulting
> AVI file is slightly jerky. Is this because I am blitting
> every time my callback function receives a sample? A
> subtitle might stay on screen for as long as 7 seconds,
> which presumably means I have to blit 25 x 7 times in a row.
> Would this explain the jerkiness and is there anything I can
> do about it? With the advent of HDTV and therefore even
> larger subtitle bitmaps, I'm worried that performance will
> degenerate even further.

THere is something seriously wrong here. your bitmap should be of the order
of 1.5MB. Even with xoring and masks and stuff, you should be able to
shift this in less than 1mS (assuming you have a moderately recent
processor) - unless there is something wrong with your code (for example,
if yoiu are processing the images byte by byte in dotnet, that might do
it!).

I presume your CPU is quite maxed out?

ANd, unfortunately, you have to blit on every frame - that's what gets
stored.


-
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.uk
.