Skip to contentSkip to conversation

Opinions about YUV framebuffers

DISCUSSION Nishant Kamat 3 participants 3 messages Aug 7, 2005 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

Hi experts,

I'd like to solicit some opinions about using the fbdev API for a display controller that accepts data in YUV format. fbcon seems to be written to work only for RGB framebuffers. Is that correct? Would it require lot of change to make it work with YUV data? Can X be run on YUV framebuffers?

Any comments would help!

Thanks,
Nishant

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

#1 lore raw
Quoted 5 lines · Nishant Kamat

Hi experts,

I'd like to solicit some opinions about using the fbdev API for a display controller that accepts data in YUV format. fbcon seems to be written to work only for RGB framebuffers. Is that correct? Would it

No support for YUV formats but fbcon can be made to work with YUV formats. For packed pixel, all you need to do is add another define in struct fb_fix_screeninfo.visual (ie FB_VISUAL_YUV_PACKED, FB_VISUAL_YUV_PLANAR), set info->pseudo_palette entries properly (in fb_setcolreg), do little adjustments to cfb_* generic drawing functions so they recognize your new visual formats and that's it.

For planar formats, you need to write your own imageblit, copyarea and fillrect.

Quoted 2 lines

require lot of change to make it work with YUV data? Can X be run on YUV framebuffers?

I don't know if X supports YUV formats, and I also don't know how difficult
it will be to add support for it in X. You can start with X's fbdev driver.

Tony

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

#2 lore raw
In reply to Nishant Kamat
Quoted 2 lines · Nishant Kamat

I'd like to solicit some opinions about using the fbdev API for a display controller that accepts data in YUV format. fbcon seems to be

Just add an additional #define FB_VISUAL_* for your YUV format to <linux/fb.h>. Been there, done that.

Quoted 1 line

written to work only for RGB framebuffers. Is that correct? Would it

In 2.6, if you provide an fb_imageblit() routine that converts from 256 color CLUT to YUV, you should have a text console and a penguin.

In 2.4, getting a text console (and penguin) on YUV is much more work.

Quoted 2 lines

require lot of change to make it work with YUV data? Can X be run on YUV framebuffers?

I'm afraid X doesn't support YUV yet.

But if you use the shadow buffer feature in recent X code, you can run the X server in e.g. RGB565 or RGB888, and write an update routine to convert a rectangular area from RGB565 resp. RGB888 to YUV. After that you'll have X running.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf