Wrong aspect ratio... 16:9 widescreen or normal.... PAL black borders?
Maybe libogc and GX is just at a low level where it actually doesn't handle non-square pixel aspect ratio, either that or there is a bug in it? This maybe might explain the black border issue some PAL users are reporting too.
I thought the lib provided a 640x480 surface so I was surprised when I could never draw a perfect square or circle on my LCD. In standard mode everything was always too tall and almost looked correct in 16:9 but not quite.
Some PAL users reported black borders on the edges of the HBC and independently for other programs too. The circles containing arrows at the left and right of the HBC don't look circular to me but that could be by design? In the HBC source were those arrows really originally circles and not tall ovals?
Update: After experimenting with GRRLIB 3.01a and patching it, I found how to draw perfect (correct) circles on an NTSC LCD TV in both 16:9 widescreen and standard mode. This method can also be applied to programs directly accessing GX without GRRLIB but needs to be calibrated for PAL.
It probably has only to be tweaked a little for PAL, please let me know how my patch works for you in the EU. The patch is in the GRRLIB forums, you should also try the other great patches by Wil which were used during my experiments.
My numbers may be slightly off because I just used a 16ths inch ruler pressed against the screen (albeit flat LCD) to measure the centre lines of the width and height of circles, then fudged numbers in GRRLIB until the width the height looked the same. Keep in mind if you have a CRT the values you need may be slightly off due to calibration, but still would be interested to hear whether PAL users can use the same numbers as I used and have things look right, but I suspect not....
NTSC TVs use non-square pixels, I think 11/10 and PAL uses 1.094:1 yet I can't figure those numbers into any calculation to arrive at the values I found experimentally to get a correct aspect ratio with GX using GRRLIB.
If anyone can demonstrate a calculation to arrive at something close to my numbers or the numbers Pepsiman used for PAL I would be very interested.
I should note here I suspect emulators will not benefit from or should even be considering any of this at this time, this discussion probably will only benefit Homebrew apps, unless there turns out to be a bug or something in libogc that should be patched. Most console emulators probably already output images at non-square pixel ratios true to the originals because a TV was the original expected output.
Microsoft provides some video test files at various pixel aspect ratios which may come in handy (below).
I have a test program for drawing various circles and squares on the screen if anyone is interested. If people even care about this and there is enough interest this page can be moved.
The goal here is to provide:
- a consistant output no matter what display PAL/NTSC
- an easy, standard way of coding whether directly with GX or a library like GRRLIB
- an easy way to optionally implement widescreen 16:9 for homebrew while maintaining correct aspect ratio
It doesn't have to be perfect but to me currently aspect ratio seems "broken" as-is and it would be nice to have simple examples and code to encourage homebrew developers to implement optional widescreen capabilities.
Please add responses at the very bottom. CarstenK 08:08, 12 August 2008 (CEST)
- BBC Guide to Picture Size (PAL)
- Microsoft Nonsquare Pixel test video files
- michaeldvd.com.au PAL vs NTSC
- Television Standards - PAL to NTSC - DVDs and MPEG-2 formats and techniques en/de
- A Quick Guide to Digital Video Resolution and Aspect Ratio Conversions The Third Big Revelation about aspect ratios and frame sizes - the one that is usually left unsaid: Not a single one of the commonly used digital video resolutions exactly represents the actual 4:3 or 16:9 image frame. Shocking, isn't it?
- afterdawn: DVD Pixel Aspect Ratio
- lurkertech: Square and Non-Square Pixels
Mr_Alert reports that NTSC System Menu uses these framebuffer sizes:
- 670x456 4:3
- 686x456 16:9
(Don't know yet how these figures were arrived at.)