* Re: Re: bits_per_pixel query
@ 2002-09-11 12:37 Linux PPC
2002-09-11 12:43 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Linux PPC @ 2002-09-11 12:37 UTC (permalink / raw)
To: Antonino Daplas; +Cc: fbdev
On Mon, 09 Sep 2002 Antonino Daplas wrote :
>Just pad the pitch/line_length/stride of the buffer to the next
>byte
>alignment your hardware is capable of. It is acceptable to have
>excess
>bits/bytes which theoretically your hardware will ignore.
The padding is at the end of the line_length, or
at the end of the pixel data? I tried both ways,
but I'm getting a skewed square, which I draw
using a user space application.
>For static pseudocolor and truecolor, that is true, since 0 is
>hardwired
>to black. For pseudocolor and directcolor, that depends on how
>the
>DAC/palette is loaded. In most cases, it will produce a black
>screen.
For psuedocolor and direct color, does the pixel
data, have the index into the colormap or does it
have actual colors? If it has the index, then the size of the
buffer would be lesser: right?
Thanks,
- navin.
__________________________________________________________
Give your Company an email address like
ravi @ ravi-exports.com. Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/
-------------------------------------------------------
In remembrance
www.osdn.com/911/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Re: bits_per_pixel query
2002-09-11 12:37 Re: bits_per_pixel query Linux PPC
@ 2002-09-11 12:43 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2002-09-11 12:43 UTC (permalink / raw)
To: Linux PPC; +Cc: Antonino Daplas, fbdev
On 11 Sep 2002, Linux PPC wrote:
> On Mon, 09 Sep 2002 Antonino Daplas wrote :
> >Just pad the pitch/line_length/stride of the buffer to the next
> >byte
> >alignment your hardware is capable of. It is acceptable to have
> >excess
> >bits/bytes which theoretically your hardware will ignore.
>
> The padding is at the end of the line_length, or
> at the end of the pixel data? I tried both ways,
> but I'm getting a skewed square, which I draw
> using a user space application.
The padding is at the end of the line.
If fix.line_length != 0, the line length (in bytes) is fix.line_length, and the
padding is fix.line_length-var.xres_virtual*var.bits_per_pixel/8.
If fix.line_length == 0, the line length (in bytes) is
var.xres_virtual*var.bits_per_pixel/8 and there is no padding.
> >For static pseudocolor and truecolor, that is true, since 0 is
> >hardwired
> >to black. For pseudocolor and directcolor, that depends on how
> >the
> >DAC/palette is loaded. In most cases, it will produce a black
> >screen.
>
> For psuedocolor and direct color, does the pixel
> data, have the index into the colormap or does it
> have actual colors? If it has the index, then the size of the
> buffer would be lesser: right?
In pseudocolor and directcolor, the pixel data is a colormap index. Pixels
always have a size of var.bits_per_pixel bits.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
In remembrance
www.osdn.com/911/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-11 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-11 12:37 Re: bits_per_pixel query Linux PPC
2002-09-11 12:43 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).