Share / Save
E-mail
Bookmark

Secrets of the Nexus One's screen: science, color, and hacks

Secrets of the Nexus One's screen: science, color, and hacks

In two recent comparisons of the Nexus One's famed AMOLED screen to the iPhone's LCD screen, one done by a display testing company and another done by a blogger, the Google phone's display actually came out the loser. Most of the online debate that followed the two articles was centered around color accuracy, color quantization artifacts, viewing angle, etc., with Google's defenders arguing that the numbers don't tell the full story because you have to take human perception and the human visual system into account, among other factors. But a related, and potentially even bigger issue, hasn't been investigated as thoroughly as the others. Specifically, despite the fact that both Google and HTC have repeatedly claimed that the Nexus One's display is 480x800 pixels in size (252 pixels per inch), the actual effective screen resolution may be substantially less than that, depending on how you count the pixels.

Sorting out the real resolution of the Nexus One's screen is much more than a minor technical exercise, because a lot of Nexus One buyers (myself included) based their purchasing decision at least in part on the amazing-sounding screen resolution, and many of us were disappointed in the lack of crispness of text. It's also worth noting that the next-generation iPhone is rumored to use the same AMOLED technology as the Nexus One, and AMOLED will become the standard on many or most high-end Android phones in the near future—will all of these upcoming AMOLEDs take this same shortcut with their resolution?

In this article, I'll explore the issue of the Nexus One's screen resolution in some detail. I'll also talk a bit about the science behind how the screen works, and I'll show you some cool image hacks that let you turn greyscale images into color, just by using pinch-and-zoom in the Nexus One's gallery application.

Note: We offered a Google a chance to comment on the issues raised in this article, but we received no reply as of press time.

The PenTile matrix

The screen on the Nexus One is one of the features I was most looking forward to. The Nexus One is one of the first mainstream devices to employ AMOLED display technology, which is supposed to be more vivid, have better contrast, and draw less power than most LCD screens. However, the very first thing I noticed after switching on my new N1 was that the pixels looked swizzled somehow, resulting in fuzzy, dithered-looking edges at hard intensity transitions, especially when reading black-and-white text. Even areas of solid color looked like they were dithered with a regular pattern. A similar swizzling effect was present on the original OLPC XO's screen in color mode.

Subjectively comparing the Nexus One's display next to the Motorola Droid's display, it became even more obvious that, though the display resolutions are claimed to be almost identical (480x800 on the Nexus One vs. 480x854 on the Droid), text on the Droid's display looks significantly sharper than on the N1's display. The Nexus One display just doesn't look like it has the stated resolution.

A close look at the N1's display under magnification reveals what's really going on.

Figure 1: Left is a closeup of the Nexus One screen, with a pixel grid superimposed to make it easier to see pixel boundaries. The right image is a shot of the same screen region taken through the debugger.

You can see from the photo above that each logical pixel on the Nexus One screen contains one green subpixel and either one double-width blue subpixel or one double-width red subpixel. So the red and blue color channels on the Nexus One display each have half as many subpixels (480*800/2) as the green channel. Basically, half the red and half the blue spatial information in the 2D image being sent to the display is simply thrown away or spread to the nearest matching subpixel by a convolution or intensity-dispersion process.

Not only is image information being discarded, but to put a specific RGB color on the screen, at least two physical RG and BG pixels must always be addressed—more likely four pixels for symmetry between the axes. It's difficult to believe the stated resolution of the display if not every pixel contains every color channel, because pixels are normally counted in RGB triplets.

The peculiar arrangement of subpixels on the N1 display is known as the PenTile matrix, developed by Nouvoyance (formerly Clairvoyante), and acquired by Samsung in March 2008. The PenTile layout comes in an RGBW flavor that adds a white pixel for increasing "aperture ratio and transmissivity" on LCD screens as well as the RGBG layout used in the Nexus One's OLED screens.

Figure 2. PenTile subpixel layout on the Nexus One screen. Each pixel consists of a double-width blue or red subpixel element and a green subpixel element.

There are numerous reasons that Nouvoyance gives on their website for why this subpixel layout is a good idea. One benefit of the double-sized red and blue subpixels is that it supposedly increases the life of the blue subpixels, which are prone to have much shorter lives than red or green at smaller sizes. I don't know for sure if pixel lifetime is related to pixel size, but there are numerous reports of dead and stuck pixels on Nexus One screens all over the Web, and my own phone developed a dead pixel after I had had it for a week.

Pixel lifetime aside, the screen layout can't solely be a cost-saving measure, because patent licenses have to be paid for PenTile. And the layout can't logically be argued to be a limitation in manufacturing capability, because it is clear that the screen manufacturing process is able to create full-resolution green subpixels that are one-third the size of a physical pixel.

Overall, it is hard to see any really good advantages to the PenTile layout, yet there are some big downsides in reducing spatial resolution of two of the color channels.

Page:

Web annotations

 

Secrets of the Nexus One's screen: science, color, and hacks

What's the effective resolution of the screen?

Even though no single pixel contains all three color elements, is it legit to say this display has 480x800 pixels as claimed by HTC and Google?

The actual hardware resolution of the N1's display is clearly 480x800, but no pixel contains all three colors. Calculating an effective resolution that is comparable to the way pixels are counted on a standard RGB-striped LCD display is a hard problem, for the following reasons.

First, the Nexus One's display cannot be analyzed on just one axis at a time, because pixel intensities are potentially dispersed in two dimensions. So looking at just the row resolution or just the column resolution does not tell the full story.

Nouvoyance actually states in a white paper [PDF] that their display has full equivalent resolution to an RGB striped display by demonstrating that horizontal and vertical grille test patterns from the Vesa FPDM Standard Section 302-2 are correctly displayed on PenTile. These are basically alternating black and white lines in either horizontal or vertical configurations. But this methodology is insufficient to test the display's true resolution, at least for the way the PenTile display is configured on the Nexus One. On the Nexus One's screen, patterns of diagonal white and black lines exhibit significant color banding, illustrating that this method is insufficient to report the true resolution of the display.

Figure 3. Left is a test pattern consisting of diagonal stipple patterns of different forms that exhibit strong green color fringes (right) when displayed at 100% on the Nexus One screen. (However, see the comments from the Nouvoyante CEO note near the end of this article.) Click for left and right full-size

The PenTile display uses a series of local filter operations to convert the underlying image into display intensities, including convolution, thresholding, color curve adjustment, and postprocessing with locally-adaptive filters. In practice, this means the display blurs the red and blue channels by dispersing these color intensities to the nearest subpixel element of the right color, and then also implements subpixel positioning to increase the apparent resolution again. However, subpixel spacing is not constant across the display, making the real apparent resolution complicated to estimate.

One way to count raw pixels, ignoring the effect of all the signal processing on the PenTile display, is to calculate total effective RGB triplets on the screen. You can do this by taking a weighted sum of total number of red, blue and green subpixels, and then converting back to an effective screen size. The total number of effective physical pixels, counted using a weighted sum, is (480*800/2)*2/3 + (480*800)*1/3 = 256,000, exactly two thirds the claimed total number of pixels (480*800=384,000). This is equivalent to a screen with edge dimensions sqrt(256/384)=82% of the claimed length, or (480*82%)*(800*82%) = 392*653 = 256k.

Signal processing aside, this is probably the fairest way of counting raw pixels on the screen, since subpixel positioning can be used on LCD screens too to enhance the apparent resolution by a factor of three in the horizontal axis, but display manufacturers cannot use this fact to claim that their screen has three times the horizontal resolution the way that Nouvoyante uses subpixel rendering to make claims about PenTile display resolutions.

This final result of 392x653 in some sense describes the total effective addressable spatial resolution of the display, again sans signal processing. Conceptually—though this is not how the screen mapping is performed internally—you could think about this display as taking the 480x800 input image and scaling it down to 392x653 image, using subpixel positioning to reduce the apparent blurriness as much as possible.

One other way of counting pixels on the Nexus One's display is to simply say it has 480x800 pixels but that no pixel contains every color channel. This is the response I got from a core Android hacker that I pinged about this on IRC. However, this is a controversial way to count pixels, as evidenced by the furor over Foveon's analogous claims that their displays have 3x the actual number of physical pixels, because they count each color channel separately. Foveon argues says they are counting pixels that way because they are responding to other manufacturers' frequent habit of counting subpixels rather than pixels when using a Bayer Filter to demosaic camera sensor images. Note that the designers of the PenTile matrix are basically arguing that the eye does its own demosaicing, and that their display is "biomimetic."

Does it even matter what the effective resolution is?

We have repeatedly been told by both Google and HTC that the display is 480x800. Does it matter that it's hard to state categorically that the Nexus One's screen resolution is 480x800, at least the way pixels are normally counted? I think so.

The Droid's screen is dimmer and more washed-out than the N1's screen, but text is significantly sharper, to the point that the pixels on the Droid's screen are almost impossible to discern. I would trade resolution for some loss of color quality any day, because I look at a lot more text than photos on my phone. The fuzziness of text on the N1's display is visually distracting (at least to me), and it makes the screen much less functional when viewing zoomed-out webpages. It's also harder on the eye to read on the N1's screen, because when your eye sees something that looks fuzzy, it constantly tries harder to focus on it.

I understand that it's hard to explain to consumers what the true resolution of the screen is, hence this long article, but surely there could have been a footnote or URL somewhere in the tech specs explaining some of this?

The Nexus One is an awesome phone in general—it's the first one I will likely want to keep for a while. However, I feel like I didn't get the specs that I thought I was paying for. And for early adopters, the Nexus One was not "try before you buy." Ultimately, the screen is great for photos, but not great for its primary use case, text. It would've been great if Google and HTC could've made that fact clear up-front, instead of claiming that the resolution is a simple 480x800.

Science and the PenTile matrix

Newspapers and magazines have been doing something similar to PenTile for years, using halftone screening or mixing of dithered dot patterns to simulate solid colors and continuous color gradients. The idea is that if the dithering frequency is high enough, so that repetitions of the dithered pattern subtend a small enough solid angle on the retina to not be individually resolvable, then the eye will perceive the pattern as a solid shade of color, or close to it. This works well for photographs in print, except where fine details are needed (for example, eyes can look awful after halftone screening if the size of the eye is close to the size of the screen pattern).

The reason this trick works is that rods are 20x as dense as cones in the retina, meaning the eye has approximately sqrt(20)=4.5x the spatial resolution in detecting intensity or luminance transitions compared to detecting color or chrominance transitions. That means the eye sees a much lower-resolution map of color transitions than it does of intensity transitions. (JPEG compression leverages this by compressing color at half the spatial resolution of intensity by default.) The result is that PenTile works great on the Nexus One screen when color photographs are being displayed—it just doesn't work as well for text because text is always displayed with high contrast to make it readable. And it's arguable that text display is the most important use-case to optimize for on a mobile phone screen.

Page:

Secrets of the Nexus One's screen: science, color, and hacks

Image hacks and color fringing on the Nexus One

The eye is more sensitive to quantization levels of green light than to levels of red or blue light, which is probably related to the fact that the sun emits more power in the green region of the visible spectrum than in red or blue. (The eye's spatial resolution in each of the three primary colors is approximately uniform.) It's therefore common practice in computer graphics to allocate finer-grained quantization to the green channel where possible: in 16 bit color, the division of bits is usually 5/6/5, meaning the red and blue channels are capable of 2^5=32 different intensities and the green channel is capable of 2^6=64 different intensities.

Because the N1 display has twice the number of green subpixels, more of the spatial variance in luminance is handled by the green channel than the red or blue channels. Also the blue and red subpixels are twice the size of green, making them twice as likely to be illuminated at the perceptual edge of a hard intensity transition than green. Both of these facts together contribute color fringing of its own peculiar kind that's visible around the edges of text on the PenTile display if you look closely enough. This is clearly visible when the test pattern in Figure 3 is viewed at 100% on the N1 screen.

I realized that if I view the test pattern in Figure 3 in the Gallery3D app on the N1, and then pinch-zoom-out to scale the image to slightly greater than 100%, I could get not just green shading but every color of the rainbow, albeit somewhat washed out. I generated a few constantly-varying grayscale stipple patterns to demonstrate this.


Figure 4. Two grayscale stipple patterns (left), and how those patterns appear on the Nexus One when displayed at 100 percent (right). Click for left and right full-size

I then developed a far more nefarious test of color fringing: an algorithm that would take an arbitrary full-color image and generate a pure grayscale stipple pattern that appears colored on the N1 screen. The interesting thing about these images is if you display them at anything other than 100% zoom, the colors disappear and you only see the grayscale stipple pattern.

Figure 5. A pure grayscale stippled image generated by my algorithm, and an approximation of how the image appears on the Nexus One PenTile display when viewed at 100%. Links to higher-res versions: top left, top right, bottom left, bottom right.
Figure 6. Every color of the rainbow can be generated by some grayscale stipple pattern, although the colors can be washed out.

If you want to try this at on your own Nexus One, you can't easily view these images at exactly 100 percent zoom in the browser. It is easiest to download the stipple images [ZIP] to an SD card and display them using the Gallery3D app.

On a final note, Candice Elliot, CEO of Nouvoyance, told me via email that there are numerous register values that can be tweaked to change the behavior of the PenTile display driver hardware. By "reducing the amplitude of the modulation, such that the locally adaptive filter detector is no longer triggered," she claims that these color fringes can be eliminated. So the tricks outlined here are specific to the Nexus One implementation of PenTile technology, and statements here (particularly about color fringing) may not apply to other PenTile configurations. I do have to wonder what the trade-off is if you do turn off the "locally adaptive filter detector", however. And I find it almost impossible to believe that color fringes can be 100% eliminated, given that the display relies heavily upon subpixel positioning.

Full sourcecode for this algorithm, and lots more example images, are available on my blog for anyone who's interested. The method I use to map colors to stipple patterns is just a first rough cut, and the color banding in the above images could be substantially reduced with a bit more work.

Some final thoughts

There's no need sell your phone on eBay after reading this, and don't change your mind about purchasing a Nexus One until you've had a chance to see the screen yourself. You may not even notice or care about the text reproduction issue. Only when compared with an extremely high-res LCD screen like on the Droid are the text fuzziness comments truly noticeable—and that's a high standard to hold the screen to.

The Nexus One screen remains better than the iPhone screen for text reproduction because the overall resolution is much higher, even taking into account the factors I describe. So if the iPhone is your measuring stick, the N1 screen really rocks. Overall, the N1 display is beautiful and vivid with dark blacks and incredible photo reproduction. (I don't even have a problem with the visibility of sunlight viewing of the display which is a frequent complaint.)

My main point about screen resolution in this article is that both the Nexus One and the Droid screen were specced at almost the same resolution so they should look the same (I think this is a fair assumption)—and they simply don't. This article is an attempt to explore why that is in a detailed way. The apparent difference in quality becomes ever more obvious the smaller the text, like when reading an e-book or zoomed-out webpage. Again, you may not even notice or care.

When all is said and done, the Nexus One remains an incredible phone all around. Just remember that specs have normal interpretations that translate into consumer expectations, which is why we're having a discussion about some of the tradeoffs inherent in switching to a non-standard and non-uniform subpixel layout.

Luke Hutchison is an Android hacker and PhD candidate in computer science and computational biology at MIT CSAIL. Follow: Blog/Twitter

Page:
Next >