Re: Rapid gfx display Qs
- From: "Jim Mack" <jmack@xxxxxxxxxxxxxxx>
- Date: Sun, 18 May 2008 00:16:33 -0400
Schmidt wrote:
"Jim Mack" schrieb...
Thanks very much. It's going to take a while to decipher and absorb
the lessons in there.
Sorry, just put it together somewhat, without many comments.
Oh, that wasn't a complaint, it was an acknowlegement that it's
complex code and worth studying. My uses of DirectDraw to date have
been much more primitive.
I changed the test slightly, to load and display 100 random
1280x720 JPGs (obviously with incorrect colors, but sized OK) from
my larger pool.
That's caused by Color-swapping (changed Blue and Reg-Channels),
because the ijl15 sadly does not support a 32Bit-Destination-Format
in BGRA, instead it only offers RGBA - that's why I wrote the
Save-Routine, which already saves the jpg with changed Red and Blue
Channels. That means, you will have to reencode all your current
BMPs using my ijl-save-routine, which needs a 24Bit-DIB in normal
Windows BGR-Order as Input.
I won't have the actual images for a couple of weeks, so I'm just
using a completely random set of images that I resized to 1280x720.
Some are rather surprising when they pop up, no matter what the
colors. (-:
I have in my library some very fast ASM code to swap red/blue on
entire bitmaps. At least it will be fast enough to do a one-time
swap-and-encode on the (now I'm told 85,000) images in my final set.
The result, with no VBlankWait, is about 30-31 ms per frame on my
system: Intel Celeron 2.2GHz with NVidia GeForce 200 AGP. Waiting
for VBlank (@60hz refresh) gives 35 ms average.
That's not bad - in my timing-loop I read from Disk-Cache -
if you jump around between 100 different Files, then your 30msec
are not that much slower than my 14msec + 9msec-Head-Tracking-
time = 23msec.
BTW, which code do you use - the one with the additional
Memory-Surface - or the older version with the AGP-Surface?
I haven't tried the newer version yet, and if it's deliberately
slower, I probably won't. I'll have the advantage of a high-end video
card with lots of surface memory on board.
Ok, if you wait for VBlank, then one shouldn't force any other
screen- updates - and I made a mistake with drawing directly to the
Forms-hwnd in my example - normally in my Apps I draw to
a PictureBox.hWnd on a borderless PictureBox. In the
example as is, I use GetWindowRect against the Form (inside .Blt) -
and this includes the caption and Form-Borders of course, forcing
the system to an additional redraw. That's why you got it working
better with your borderless form.
It's my understanding that using a flipping chain with 2 backbuffers
can eliminate the need to delay updates while waiting for the VBlank
to flip. I don't have the display memory now to support that (I don't
think), but when I do, I'll give that a try too. In any case the
target system will use a full-screen borderless form, so I don't
foresee any problems with shear.
Would be interested in your results, if your new hardware
arrives - and maybe you should spend your system a 10000
RPM SCSI-Disk - this reduces your DiskAccess-Time
from 8-9 to 5-6msec - but a fast 7200Sata-Drive should
also do fine, at least the JPEG-Decoding-time scales
lineary with the Processor-speed - as said, currently
on a 1.8GHz Intel-DualCore ca. 10msec - on a 2.6GHz
Intel-DualCore this should result in ca. 7msec for the
JPG-Decoding-Task.
If I know my client, the disk will be two cheap SATA3 in RAID0. That
should be more than fast enough for loading JPGs. I'll know more in a
week or so.
--
Jim
.
- Follow-Ups:
- Re: Rapid gfx display Qs
- From: Schmidt
- Re: Rapid gfx display Qs
- References:
- Rapid gfx display Qs
- From: Jim Mack
- Re: Rapid gfx display Qs
- From: Larry Serflaten
- Re: Rapid gfx display Qs
- From: Jim Mack
- Re: Rapid gfx display Qs
- From: Schmidt
- Re: Rapid gfx display Qs
- From: Jim Mack
- Re: Rapid gfx display Qs
- From: Schmidt
- Re: Rapid gfx display Qs
- From: Schmidt
- Re: Rapid gfx display Qs
- From: Jim Mack
- Re: Rapid gfx display Qs
- From: Schmidt
- Rapid gfx display Qs
- Prev by Date: Re: Additional info in file
- Next by Date: Re: Need help which way is fastest to pick out a segment from a st
- Previous by thread: Re: Rapid gfx display Qs
- Next by thread: Re: Rapid gfx display Qs
- Index(es):
Relevant Pages
|