Framebuffer: расчёт line_length

Взгляд изнутри

Модератор: Модераторы разделов

Ответить
IMB
Сообщения: 2561
ОС: Debian

Framebuffer: расчёт line_length

Сообщение IMB »

Доброго дня!
В структуре fb_fix_screeninfo есть переменная line_length характеризующая длину линии в байтах.
Драйвер отдаёт мне значение 384 независимо от разрешения или я неверно его сконфигурировал.
Собственно вопрос - как расчитывается значение line_length?
Спасибо.

P.S. Похоже понял.
The line length (also called pitch) of the buffer. This is defined as the number of bytes between lines in an image buffer.

Код: Выделить всё

Lastly, the "pitch" is how many bytes in the linear frame buffer there are between one pixel's data, and the data of the pixel immediately below. You can think of this as the horizontal resolution multiplied by the bytes per pixel (bits per pixel divided by 8). In practice, the pitch may be more than this product due to alignment constraints.

http://us.download.nvidia.com/XFree86/Linu...mmingmodes.html
Спасибо сказали:
Ответить