Dolphin, the GameCube and Wii emulator - Forums

Full Version: Correct aspect ratio option?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
I guess I should take a photo of the shield with the game running in my Gamecube. Maybe I'll try with both LCD and CRT TVs. My CRT is flat, so it won't have curvature distortion. I'll be home in 12 hours, more or less. If I have time to spare, I'll do it.
Don't bother. My CRT is flat too. There is all sorts of stuff going on to make flat CRT's work right, naturally I think they have even more distortion than curved ones (the sides of the image are wider than the middle, etc). On mine, you can even adjust how tall/short the picture is just by going into the service menu. Aspect ratio is very fluid on CRTs, not good for specific measurements.
VI doesn't/can't perform vertical scaling, it can only crop or letterbox. Dolphin just doesn't emulate this properly. The vertical size is fixed at either 480 lines for NTSC or 576 lines for PAL (disregarding the double-strike modes which have an extra half-line).
Ignoring blanking and colorburst signals, a line is 720 ticks wide. That means left border + active area + right border = 720 analog samples. This means for a 4:3 output device, the NTSC sample aspect ratio would be 8:9 (480*4/3/720) and for PAL it would be 16:15 (576*4/3/720). If you applied that to the active area you would end up with the "proper" output resolution, which should then be scaled (maintaining 1:1 aspect) to the output window.
(07-07-2015, 03:37 PM)mirrorbender Wrote: [ -> ]I wish I knew exactly what the devs intended so that I didn't have to do all of this guess and check and STILL not be sure that it's right.
I'm with you there, and games aren't the only arena where this poses a problem.

NTSC DVDs also use a 720x480 resolution, but it's quite common to see DVD transfers that don't obey the specifications. Since only 711 pixels out of the 720 are supposed to be used for the image, you would expect to see thin black bars on both sides of the image (5 on one side and 4 on the other), thus giving you a clear view of which part of the picture is important and which part should be cropped, prior to resizing to 4:3 or 16:9 (depending upon whether the DVD is 4:3 or anamorphic 16:9).

Some DVDs have larger black bars, while some have no black bars at all. In the latter case, there's no way to know whether the person who mastered the DVD made an error and stretched the entire image to the 720 pixel width, in which case you'd need to resize the whole image without cropping in order to achieve the correct DAR, or whether the extra content was not meant to be viewed and was just included with the assumption that it would get cropped during playback and thus didn't need to be replaced with black bars.

SD digital video is just a mess, since it was kludged together to be semi-compatible with existing analogue technology. I just don't think that there is any possible way that your methodology can be correct, because you're using a bunch of obscure formulas that an actual GC would have no way of applying (especially since, based on that site, different games have different DARs, thus requiring each game to have its own SAR); thus, if we assume that the developers were competent enough to design the game so that it would display correctly when played on a real console on a CRT, there is no way your methodology would yield the developers' desired result, as games will never be scaled in the way you describe. One can certainly speculate as to the developers' mistakes, but it's important to never pass such speculation off as fact.
(07-07-2015, 03:38 PM)tueidj Wrote: [ -> ]So far there is so much handwaving and math based on assumed values that I can't see any merit at all in implementing any changes. But having said that, what Dolphin currently does is not right (just look at the Rogue Squadron games where the cutscenes get rendered fullscreen instead of letterboxed), the only "proper" way to fix it would be to fully implement VI scaling (complete with blank overscan areas used by most games) and allow customizable borders for cropping, just like how you can choose a TV based on how much of the viewing area is hidden by the screen bezel.

That would be great, especially if you can save values per game.
I looked at the numbers a little more today, and I think I came up with a standard that is based on the NTSC specification, rather than measurements in a specific game. This means that it may not be perfect for all games (if the devs didn't do it right), but it should accurately represent how the game would be displayed on a theoretical distortion free CRT TV. This is based on this article that Aleron Ives posted:

http://web.archive.org/web/20140218044518/http://www.iki.fi/znark/video/conversion/

According to that document, the SAR for the "Active picture frame for 525/59.94 systems in ITU-R BT.601-4 pixels" is ((4/3)*486)/710.85, or 4320/4739. This means that for a game with no scaling (like Melee) you just need to scale the width by this factor to get it to look "right" (meaning looking like a perfect NTSC display device). This means that you render @ 640*480, and then scale that output to 583.41422241 pixels wide (and round to an integer, of course). I originally tried doing this with an active picture frame of 720x480, but that didn't quite look right, so I tried to make it look better using the Melee shield as a benchmark. Now, using the proper 710.85x486 picture frame to do the math gets me a SAR that's within ~0.2% of my shield measurement based estimate of 21:23. So is the math based standard of 4320/4739 acceptable to Dolphin's quality and accuracy standards?
If you want to check your calculations, you ought to ask over at Doom9, which references the uwasa.fi website (which is sadly offline now) whenever people ask aspect ratio questions. If the fine folks there can confirm your math, I'd call this a worthy approach for a new "use NTSC aspect ratio" checkbox option in Dolphin's graphics configuration. Using the actual NTSC specification is much more likely to produce accurate results in all games, whereas the texture-based approach would both be a nightmare to implement and likely to produce inconsistent results between games. It ought to be possible to use the PAL numbers to make PAL games display as they would on a CRT, too (when they're running in 576i mode).
Their guide confirms my math. From http://www.doom9.org/index.html?/capture/start.html :

"One field contains 243 active lines. The first line of field 1 and the last line of field 2 may contain a whole picture line, only half a picture line or even be completely black. Most often, these two lines will contain only half picture information. For some reasons this has caused a lot of confusion about the active area of the NTSC frame, while this did not happen for PAL. The NTSC frame consists of 486 lines. "

and

"While a single scan line takes 63.556 µs to process by a TV, only 52.6555 µs is actually spent drawing a picture line. This is the ‘official’ ITU-R BT.470-6 number, which is often used by people dealing with digital video. There are many standards for NTSC/M, all giving a slightly different number for the active part of a scan line. Assume 52.6555 µs if you need a number for calculations."

52.6555 * 13.5 (the sampling rate in MHz) gives you 710.85 active samples per line, and there are 486 active lines. 710.85x486 is the correct resolution. When displayed at 4:3 (as on an ideal 4:3 TV), this gives you the 4320/4739 SAR.
Wouldn't be much simpler to just get a video capture card or game recorder to get a screenshot directly from the video output of a real GC/Wii to compare with Dolphin's output instead of trying to assume the correct calculation formula?
(07-08-2015, 11:34 AM)mirrorbender Wrote: [ -> ]52.6555 * 13.5 (the sampling rate in MHz) gives you 710.85 active samples per line, and there are 486 active lines.  710.85x486 is the correct resolution.  When displayed at 4:3 (as on an ideal 4:3 TV), this gives you the 4320/4739 SAR.

No, it's not right.
- GC/Wii do not use 486 lines, they are based on the standard 480/576 lines per frame.
- They assume the display device can handle (at most) 720 samples.

Forget what standards say, or what a TV "should" do. THAT is what the console expects a TV to be able to handle, displayed with a aspect ratio of 4:3.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17