OSTİM OSB · Ankara  |  KÜ Teknopark · Kirikkale LinkedIn TR | EN
From Light to FPGA · Episode 2/20

Pixels, Resolution and Scan Geometry

Pixels, Resolution and Scan Geometry

If an image is 1920 × 1080, do we know the whole story? Show the same pixel array with the wrong aspect ratio and faces can stretch; get the timing wrong and the picture may not appear at all. Today we’ll start from the pixel itself and work our way up to which sample the display expects at which moment.

The active picture makes up only part of the total raster.
Figure 1. The active picture makes up only part of the total raster.

Let’s not mistake a pixel for a square box

In a digital image, a pixel describes a sample’s value and its position on the grid. The physical size of the light-collecting cell on a sensor, or of the light-emitting area on a panel, is a separate matter. Simply saying “a pixel is not a square” is not a correct explanation on its own either; we need to separate the digital sample from the physical structure.

More pixels make it possible to carry more detail. But if the lens, focus, sensor, compression and display can’t make use of that potential, a bigger number won’t make the picture sharper by itself. MTF helps assess how well detail is carried through with its contrast.

GETTING THE CONCEPTS RIGHT

Why did the circle turn into an egg?

The display aspect ratio is the product of the sample array’s ratio and the pixel aspect ratio: DAR = (width / height) × PAR. In FFmpeg, the name SAR is generally used for this PAR, meaning sample aspect ratio. The same abbreviation being given different meanings in different sources is a common cause of confusion. [1]

If the entire 720 × 576 array is to be shown as 4:3, PAR comes out to 16/15. For 704 × 576, the ratio that yields 4:3 is 12/11. The chosen width changes the correct pixel ratio as well. So let’s read a file’s clean aperture and its aspect ratio information together.

The time outside the active picture

Raster timing isn’t made up of visible pixels alone. Alongside the active area there are front porch, sync and back porch intervals. These come from CRT history, but they also matter in modern interfaces for timing and for organizing ancillary data.

In the classic 1080p60 example, the total horizontal length is 2200 and the total vertical length is 1125. The pixel clock is 2200 × 1125 × 60 = 148.5 MHz. The share of active samples in the total timing is 1920 × 1080 / (2200 × 1125), or about 83.78%. Let’s not take this ratio as the net data efficiency of every interface. [2]

Raster / Aspect ratio / Presentation.
Figure 2. Raster / Aspect ratio / Presentation.
Example raster Active Total / clock
1080p60 1920 × 1080 2200 × 1125 / 148.5 MHz
Active time share 83.78% Not the interface’s net efficiency
720 × 576 → 4:3 PAR 16/15 If all 720 samples are shown

DESIGN AND IMPLEMENTATION

Progressive, interlace and PsF

In progressive scan, a frame contains all of its lines. In interlace, the lines of the two fields can be captured at different times. If we merge two fields with motion as if they had been captured at the same instant, the edges show combing. That’s why field order is more than just a file label.

PsF carries a progressive source in two segments; it does not have the same temporal content as true interlace. The processing chain needs to know correctly what kind of source it is handling. “Deinterlace first” is a good starting point, but there are also specialized field-aware scalers, so it can’t be presented as the one mandatory processing order.

Safe areas and viewing distance

Overscan can push the edges of the picture beyond the visible display area. If we place text right at the edge, some receivers may cut it off. For 16:9 production, EBU R95 specifies a margin of 3.5% per edge for the action-safe area and 5% for the graphics-safe area, based on the pixel coordinates of the format in question. [3]

There is no single viewing-distance limit along the lines of “4K only pays off at this many meters.” Visual acuity, screen size, content, contrast and the viewer’s purpose all matter. Let’s not confuse the number with the product’s overall perceptual quality.

How should we think about timing in an FPGA?

Horizontal and vertical counters, together with comparators for the active area and sync intervals, can form a raster generator. We set the counter limits by the total timing, not by the active width. An error of a single line can shift the entire picture.

During verification, check the first and last active samples, the start of line, the start of frame and the first frame after reset. 60 and 60000/1001 frames/s are different modes. Before taking the example code onto a board, the clock, polarity and interface conditions also need to be verified separately.

Key takeaway: Let’s not describe a video mode by its active pixel count alone: aspect ratio, scan type, frame/field rate and total timing are all parts of the same picture. In the next article we’ll talk about the colors of that picture.

A print-ready version of this episode is also available: PDF version (4 pages, in Turkish)

References

  1. FFmpeg filter documentation: setdar / setsar
  2. ITU-R BT.709
  3. EBU R95

This episode is also shared as a document on Wupsoft’s LinkedIn page.

← All articles Share: LinkedIn
Continue Reading

Other Articles