All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: "Rhee, C. Joon" <jrhee@qualcomm.com>,
	"Geert.Uytterhoeven" <Geert.Uytterhoeven@sonycom.com>
Subject: Re: YUV Framebuffer
Date: Thu, 18 Oct 2007 21:20:10 +0800	[thread overview]
Message-ID: <1192713610.8484.53.camel@daplas> (raw)
In-Reply-To: <Pine.LNX.4.64.0710172141180.16690@anakin>

On Wed, 2007-10-17 at 21:45 +0200, Geert Uytterhoeven wrote:
> On Wed, 17 Oct 2007, Rhee, C. Joon wrote:
> > Interleaved means YCBCR is on the same plane in this order.
> > Y CB Y CR Y CB Y CR.... (TV-Out)
> 
> So it's still FB_TYPE_PACKED_PIXELS.
> 
> > The problem of matching Y=G, CB=B and CR=R for RGB offset is that the
> > pixel cannot be represented directly since CB/CR gets shared between Ys.
> > 
> > So, bitsperpixel would be 16 bit and both B and R offset will be 8.
> 
> Doesn't sound that bad to me, if you introduce a FB_VISUAL_YCBYCR
> visual. Even pixels have a Cb, odd have a Cr component.

We need at least 3 fields to describe YUV.

1. The component size - fb_bitfield.length
2. The sample period - fb_bitfield.offset
3. The component ordering - fb_bitfield.msb_right

So if Y = red, U = green, V = blue

YUV422

red|green|blue.length = 8 /* 8 bits per component */
red.offset = 1 /* sampled every pixel */
green.offset = blue.offset = 2 /* sampled every 2 pixels */
red.msb_right = 1, green.msb_right = 2, blue.msb_right = 3
(Y U V order)

UVY411

red|green|blue.length = 8;
red.offset = 1;
green.offset = blue.offset = 4;
red.msb_right = 3, green.msb_right = 2, blue.msb_right = 1;

The FB_VISUAL_* will differentiate if the bitfields are interpreted as
RGB or YUV.

That's the only way I can think of describing YUV packed pixel formats
without adding new fields, or modifying our user-visible structures.

We will need separate drawing functions for fbcon's use.

Of course, the simplest way is to use fourcc naming for our FB_VISUAL_*
constants. But that will become too unwieldy over time.

Tony




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

  reply	other threads:[~2007-10-18 13:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17  0:00 YUV Framebuffer Rhee, C. Joon
2007-10-17  6:57 ` Geert Uytterhoeven
2007-10-17 17:07   ` Rhee, C. Joon
2007-10-17 19:45     ` Geert Uytterhoeven
2007-10-18 13:20       ` Antonino A. Daplas [this message]
2007-10-18 13:41         ` Geert Uytterhoeven
2007-10-18 23:03           ` Antonino A. Daplas
2007-10-19  7:13             ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1192713610.8484.53.camel@daplas \
    --to=adaplas@gmail.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=jrhee@qualcomm.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.