[X-Server] Question about Scaling an Image on the Glamo
rashid at milacom.de
Tue Sep 28 15:24:55 CEST 2010
Hi guys I wrote to the xorg mailing list about scaling an image in hardware.
Since a gamoboy has native resolution of 160*144 pixel, we could scale it in
glamo hardware easily. This would be unbelieveable faster then the current
method since the image we neet to send the glamo would be only 1/4 of the size.
We can use this at other applications too.
Answer from the xorg list:
"as such though the freerunner has a stretchblit in its gfx hardware. its
primitive and can only do a small subset of what xrender needs."
Thats enough if it scale the image. Someone know how to use it?
> Rashid wrote:
> > is there a way to scale a pixmap / image / frame buffer content with
> > native xlib-Code.
> No. The core X protocol doesn't include this functionality. You need
> to use an extension (e.g. XRender, Xv, GLX).
actually it is possible to scale. 2 pass xcopyarea, 1 copy per row and
of output. first u scale it up in 1 dimension by (for example) reading
source column once and writing it out twice in the ouput, and then
it's not too cheap though. lots of cmds to the gpu, lots of protocol,
the column copies do nasty things to cachelines and memory fetches even
the gpu side. :)
as such though the freerunner has a stretchblit in its gfx hardware. its
primitive and can only do a small subset of what xrender needs.
the freerunner's gfx chip is like taking a good old ISA trident card and
pushing it to run 32bpp @ 1600x1200 because someone managed to buy a
monitor cheaply and wants lots of pixels and colors because it looks
good on a
spec sheet. let's just for now assume the good old trident ISA card
such an output - for the sake of the analogy. the bus to and from the
weenie small. the card itself is being pushed to its absolute outer
terms of display resolution and depth attached. you can try and move
stuff to the gfx chip side to alleviate load on the "ISA bus" but even
over there life is very limited. where normally when your gfx chip is
you just move the ops back to the cpu and blast them over when done,
with a big downside on the freerunner due to the "ISA bus". the problem
the nice modern stuff people would like will need to go back to the cpu
and any read of the gfx chip programming docs clearly shows it was
qvga on a good day, and vga output for the freerunner gfx chip is an
capability but not an optimal target). so no matter what - you'll always
pushing poo uphill with that gfx chip unless you drop back to qvga. :)
More information about the community