[opendtv] Re: Popular screen aspect ratios

  • From: Craig Birkmaier <craig@xxxxxxxxx>
  • To: opendtv@xxxxxxxxxxxxx
  • Date: Sun, 9 Jan 2011 11:03:49 -0500

At 12:50 PM -0800 1/8/11, Ron Economos wrote:
We'll see how this goes through the reflector.

For a 4:3 display, here's the progression from source to display.

16:9 source image.

16x9 source

Decoded 720x480 image.

720x480 decode

Crop to 540 wide image.

540x480 crop

4:3 display image.

4:3 display

Sounds correct to me. And evverything made it through correctly. So the net result is a 5:4 image presented in pillarbox on the 4:3 screen.


For a 16:9 display, nothing needs to be done. The original
source is 16:9. The physical dimension of the 16:9
display will "stretch" the 720x480 decoded image.
16:9 display

This is where you got me with the trick question. You just decode, and scale to fit the 16:9 screen.

The key here is that the presence of display_horizontal_size
different than horizontal_size is signaling that the original
source is 16:9. The 540 value tells you what to do for
4:3 displays, but it's irrelevant for 16:9 displays.

Not exactly.

The display_horizontal_size data signals that for a 4:3 display the image is to be cropped to 5:4 and if V&H offset data is present, to offset the image in this window (i.e. pan & scan).

There is another piece of metadata that signals the 16:9 format.

aspect_ratio_information should be set to 0011 to signal that the source is 9:16.

If this were 1280 x 720 or 1920 x 1080 source, the aspect_ratio_information would signal 0001 for square samples. The decoder would then know that the aspect ratio is 9:16 based on the number of samples in the raster (in essence it knows that the sample are square so it does not need to scale them).

This raises an interesting question about the ability of MPEG-2 to handle various formats with non-square samples. The table that defines formats has only 4 bits (16 possibilities). 0000 is forbidden; 0001 is square samples; 0010 is 3:4; 0011 is 9:16; 0100 is 1/2,21 and the rest are reserved (I don;t know if any other aspect ratios have been defined).

By specifying the three aspect ratios it is possible to use any line length (in macroblock increments) to encode these formats - the sample aspect ratio varies with the line length, but the display aspect ratio is specified so you can calculate the scaling required. For any other aspect ratio you would need to use square samples, or letter/pillar box it into one of the defined aspect ratios. OR; get MPEG to define that aspect ratio using a reserved extension.


BTW, VLC is available for Mac OS X, so you
can play the test file if you want to. But don't you
think it's a little weak that a Mac can't play a
Transport Stream out of the box? ;)

http://www.videolan.org/vlc/download-macosx.html

Previous versions can be found here. I've tested the
Windows executable of 1.0.5, and it works correctly.

http://download.videolan.org/pub/videolan/vlc/

In other news, VLC was just deleted from the Apple
AppStore.

http://apple.slashdot.org/story/11/01/07/2341227/Apple-Pulls-VLC-Media-Player-From-AppStore

Ron

Thanks for the pointers. I downloaded VLC and looked at the file. There was one problem.

It presented the original pixels without scaling - essentially a very large postage stamp on my 1440 x 900 display. The "stamp" is larger than 720 x 480, so some scaling of the original samples has occurred, but the actors look a bit thin. If I go to the aspect ratio settings and select 16:9 the image is stretched to fill the width of the screen and everyone looks properly proportioned. BUT the aspect ratio is no longer 16:9, it's more like 2:1. This suggests that the original widescreen source was encoded into a 16:9 container in letterbox. And it does not explain why VLC did not present it properly...

Was this in fact the case with the source you sent?

As for why I've never messed with VLC, its probably because I got interested in beer.

There is also an issue related to the MPEG-LA license fees for the use of MPEG-2. Apple does not include the MPEG-2 codec in QuickTime because of this fee. They sell it as an add on codec for video professionals. They do include the MPEG-2 decoder with their DVD player software and the full codec with iDVD, but these application may be leveraging the GPU for which the manufacturer may have paid the license.

Do you know if VLC uses the GPU or is just running on the CPU? There may be some concern with VLC about Apple being liable for the MPEG-LA license fees. There may also be concerns about the ability of VLC to play bootlegged MPEG-2 files...

Regards
Craig



----------------------------------------------------------------------
You can UNSUBSCRIBE from the OpenDTV list in two ways:

- Using the UNSUBSCRIBE command in your user configuration settings at FreeLists.org
- By sending a message to: opendtv-request@xxxxxxxxxxxxx with the word 
unsubscribe in the subject line.

Other related posts: