Monday, December 29, 2008

Aliasing on the PS3

I talked about the various video resolutions the Sony PlayStation 3 is capable of generating in PlayStation 3 Video Resolutions. I got several comments from posters who complained that certain PS3 games give them problems, video-wise. One of the problems appears to be that of "aliasing." The game Resistance 2 in particular was singled out, though my research indicates that many other PS3 games are affected.

In general, aliasing in digital video causes areas of the moving picture to shimmer or flicker. The affected areas are those with the most fine-grained video detail.

If you stop the motion and look at a still frame of the video, the shimmering will stop, but you will see a spurious pattern overlaying the fine detail in the image. This often called a moiré pattern. As you step from one still frame to the next, the moiré pattern will writhe. Played at normal speed, the writhing becomes a shimmering.


You can think of any still or moving image as being made up of various visual frequencies. The frequencies, which can be represented as sine waves, are overlaid or superimposed atop one another so as to make up a recognizable image. The finer the detail in any portion of the image, the more prevalent the higher frequencies are in that portion of the image.

But digital video doesn't understand continuous sine waves. It chops the image up into pixels. The pixel grid is 1920 x 1080 pixels for 1080i/p, 1280 x 720 for 720p, and 720 x 480 for 480i/p.

The crux of the aliasing problem has to do with the fact that the pixel grid, however coarse or fine, imposes a limit on the highest visual frequency that can be accurately rendered by that grid. Since a pair of adjacent pixels can be thought of as being able to (crudely) represent the positive and negative swings of one complete cycle of a sine wave, the highest frequency that can be represented without aliasing is one that is just less than one-half the pixel-grid frequency (which is a square-wave frequency, rather than a sine-wave frequency).

If the square-wave frequency puts 1920 pixels across the screen, then fewer than 1920 ÷ 2 = 960 sine wave cycles can be accurately represented in the horizontal direction. A similar logic applies to the vertical dimension, or to visual information that uses both dimensions at once.

This is all a fancy way of saying that for any given video resolution there is a maximum visual frequency that can be represented, if aliasing is to be avoided.

Think of using a digital camcorder to make a video of a picket fence as you ride by it in your car. If you are zoomed in on the fence, the visual frequency of the pickets as they move by is relatively low, and you will get no aliasing. But if you gradually zoom out, at some point you will start to see aliasing. This is the point at which the visual frequency of the moving pickets climbs to half that of the pixel grid of the camcorder. Any frequency above that threshold will produce aliasing.


The aliasing potential in digital video is compounded whenever digital video is re-rendered or scaled.

If the video's native resolution is, say, 720p, and it is scaled to 1080p, aliasing can creep in. After all, each 720p frame is itself an image with various frequencies of visual information in it. Among those frequencies are those representing the square-wave 720p pixel grid itself. The square-wave frequency of the 1080p pixel grid is less than twice that of the 720p grid. So, unless some sort of anti-aliasing technique is used, simply scaling up from 720p to 1080p may introduce aliasing.

By similar logic, scaling up from 480i/p to 780p can introduce aliasing.

Video scalers accordingly use sophisticated digital filters to offset the potential for aliasing. Video scaling takes place in the PS3 when a game that is nominally in 720p is output at 1080p. Grid is such a game.

If the PS3 is set up to output Grid at its native 720p into a native-1080p TV, the TV itself will scale the video up to 1080p. (This is what I do.) In this example, the user has the option to let the PS3 or the TV do the upscaling. Possibly, one of the two choices as to which device does the upscaling will introduce less aliasing than the other.

Another possibility is that aliasing can be reduced or eliminated by telling the 1080p TV to use a one-for-one pixel mapping for 1080p input. My New Samsung LN52A650 TV has a picture-size setting called "Just Scan" that does this. Ordinarily, the 16:9 setting for HDMI input on this TV enlarges the picture slightly so that its edges lie outside the frame of the screen; this is called "overscan." It is done because some TV broadcasts have visual "garbage" at the edges of the picture, particularly at the top edge. Overscan hides the garbage.

Hiding the picture's edges requires re-scaling the picture slightly, which can in theory introduce aliasing. If your TV has a way to defeat overscan and your PS3 games evidence aliasing, you might try defeating the overscan ("just scanning") as a way to reduce or eliminate aliasing.


But I gather that most PS3 game aliasing problems lie deeper than this. For example, a post in this GameSpot forum thread reads:

All sony exlcusives offer AA the problem comes with ports. Since ports are done from 360 to ps3 the developers do whatever they can to have similar looking games with decent performance meaning they put all their "hard" work ito the 360 versions and port it over and take out certain details such as AA in order to maintain decent performance. But yes ps3 does offer AA look at Racvthet and clank Uncharted Resistance Heavenly Sword Ninja Gaiden. The only game with aliasing problems that i know of thats sony exclusive is GT5.

My interpretation is that AA ("anti-aliasing") is being done for some PS3 games and not for others. Most or all of the games written (usually by Sony) for the PS3 are "anti-aliased" such that the PS3 can scale them to any of its supported output resolutions without aliasing creeping in. On the other hand, games that are written for other game consoles such as the Xbox 360 and then ported to the PS3 are not necessarily "anti-aliased."

I gather that the Xbox does not internally scale game video. (I don't really know this; anyone who knows more should feel free to correct me.) If the game is 720p, it is output at 720p.

The PS3's games can scale to higher resolutions than they were written for. I think, but don't really know, that this is something the game itself chooses to take advantage of, or not. For instance, I believe Grid does not scale itself from its native 720p to 1080p.

I believe — but again, I don't really know — that this game-internal upscaling capability may be separate from the PS3's usual method of upscaling video.

Whether or not the upscaling is game-internal or done externally to the game by the PS3, it seems that some PS3 ports from Xbox 360 and other platforms introduce aliasing during upscaling. The forum poster I quoted seems to think that there could have been "anti-aliasing" included in the game ports, but, due to the negative effects of anti-aliasing on game performance, there wasn't.

I am going to investigate this subject further and post about what I learn. For now, those who are irritated by aliasing in their PS3 games should be aware that it may be the unavoidable result of how the games were ported to the PS3. There may be nothing "wrong" that they can fix by using different settings on the PS3 or the TV.

16 comments:

Anonymous said...

The XBox 360 has an internal chip dedicated to scalaing the video internally rendered at 720p (for example) to any resolution. AFAIK the PS3 does not have this facility, so has to devote some CPU time to it.

eric said...

Thanks, Anonymous. Yours is valuable information. I definitely need to spend some time researching this issue.

I gather that the PS3 is prone to aliasing on games that were ported from XBox but not on games written for PS3 directly. While the XBox has a dedicated hardware scaler and the PS3 doesn't, I wouldn't think that difference alone would account for the aliasing on the PS3, given that the aliasing supposedly is associated only with ported games. So I'd like to learn more before making any final pronouncements.

Anonymous said...

hello eric, not sure if you will see a comment on an older blog but im wondering if you have heard of any issues running a PS3 on a samsung syncmaster 2333hd?

i have been researching the internet and have seen a few others with the same problems as me but never a definite resolution or answer to the situation.

you see the 2333HD is an HDTV as well as a PC monitor. its a GREAT monitor but lacks in the HDTV dept. even though it supports all general HDTV resolutions, 480p, 720p, 1080i/p. anyways, if you know anything i would love to hear your opinion. i stumbled across your blog while researching these issues.

thanks, rocknerd.

eric said...

Anonymous,

You said:

... im wondering if you have heard of any issues running a PS3 on a samsung syncmaster 2333hd?

i have been researching the internet and have seen a few others with the same problems as me but never a definite resolution or answer to the situation ...


First, check out this YouTube video to see what appears to be the Gran Turismo 5 game played on a PS3 into the 2333HD at full 1080p resolution. The video was "shot with a very poor camera" pointed at the monitor screen, but the game video looks pretty good to me. I can't see any aliasing.

The PS3 is well-known in the gaming world for having difficulty with anti-aliasing. I gather that PS3 games have to be written especially to invoke the idiosyncratic anti-aliasing capabilities of the PS3. Games written for other platforms generally don't do that. So I think (but do not know for sure) that aliasing is mainly a problem on games that were not written for the PS3 but ported to it from another platform.

Possibly, aliasing occurs on ported games mainly when game video is scaled from one resolution (such as 720p) to another (such as 1080p) by the PS3, as the ported game is being played into the TV monitor. You want to avoid scaling of ported games. Probably, also, of all other games, but definitely of ported games.

You can set the output resolution of the PS3 by going to Settings —> Display Settings —> Video Output Settings. If the game is a 720p game, make sure the only check mark is by 720p while you are playing that particular game. (480p will also be checked for HDMI and cannot be disabled, but if the native resolution of the game is 720p, that's what will be used by the PS3 ... as long as the monitor is set up to accept 720p on HDMI, that is.)

Check out a bunch of games and try to see whether they all give the same problem. If not, you know it's the fault of the individual game.

If you have a problem with certain games while others don't see a problem, then maybe you need to do some more research.

Does the PS3 look good on your monitor when playing Blu-rays? Then obviously the problem is with games, not Blu-rays, and you can narrow your attention to problems with PS3 games played into a monitor like yours.

Good luck solving your problem ...

Anonymous said...

Eric, thank you so much for your time, you seem like a swell guy and you remind me of my uncle who is also a tech genius, and i have lots of respect for him.

All of your tips are helpful and I actually have been doing some of them the last few days. I even tried turning off certain resolutions in my PS3's settings if a game was a native 720p for example.

I think it may have helped a bit, and from here on out, with the testing of blu-rays I have done, I think that this monitor/TV has issues with 720p. as long as i get the picture as smooth as possible and the colors adjusted I will learn to be content over time.

Yesterday was the first time i tried turning off 1080p/i, if the game was a native 720p and it did seem to help.

Unfortunately I have found that many PS3 games are 720p but the few I have tried that are 1080p i noticed a big difference in visual quality. So i will keep researching others experiences with this model and see what the best settings are for this TV.

I enjoy your blog and I'm glad I have found it, you have a new reader.

Thanks again, rocknerd.

Jeremy said...

whew... i think i have trave;;ed around the internet and its NOT flat!!! i previously askled you if you knew of any issues running a PS3 on a samsung 2333hd monitor.

i came across a tech spec called something like "interpolated aspect ratio" or something like that, and next to it it said 1440x900...

could that mean that if the monitor is trying to run in its native res of 1920x1080 and my PS3 is trying to force the monitor to run 1280x720 that its defaults to some odd resolution thus the heavy artifacting and aliasing???

eric said...

Jeremy said:

whew... i think i have trave;;ed around the internet and its NOT flat!!! i previously askled you if you knew of any issues running a PS3 on a samsung 2333hd monitor.

i came across a tech spec called something like "interpolated aspect ratio" or something like that, and next to it it said 1440x900...

could that mean that if the monitor is trying to run in its native res of 1920x1080 and my PS3 is trying to force the monitor to run 1280x720 that its defaults to some odd resolution thus the heavy artifacting and aliasing???


You need to give me more information ...

(1) Are you using HDMI?

(2) What resolutions do you see a check mark by when you go to Settings —> Display Settings —> Video Output Settings on the PS3?

(3) If not all of the possible resolutions are set on the PS3, why not?

(4) Specifically, is 720p set? I believe many or most of the games for the PS3 use 720p natively, so if your PS3 has 720p output disabled (no check mark) then the PS3 has to scale the game to another resolution. That adds an undesirable "X factor" to trying to find out where the video artifacts and aliasing are coming from.

If 720p is not check-marked on the PS3 and the game uses 720p, the PS3 will down-convert it to 480p and send it to the 2333HD. The 2333HD will up-convert 480p to 1080p for display.

If 720p is set as an available output format on the PS3, then ...

(5) Is the Samsung 2333HD actually receiving 720p from the PS3?

If not, then for some reason the HDMI "handshake" between the 2333HD and the PS3 isn't allowing 720p. I have no idea what to do in that case ...

There may be some kind of status display that appears on the 2333HD screen, perhaps one that disappears after a few seconds, that tells you what resolution is being received over HDMI. Perhaps it is like the display box on my Samsung LCD flat panel; it comes up every time the input on HDMI changes from one format or resolution or another, then disappears after a few seconds.

If the 2333HD is in fact receiving 1280 x 720p input, then it has to scale it to its own native 1980 x 1020p for display. This can theoretically cause very minor problems with the picture, but nothing like you seem to be seeing. I think you can rule it out as the source of your problem.

As far as "interpolated aspect ratio" is concerned: I have never heard of it, but doing some quick Googling tells me that it seems to be a capability of some HDTVs and monitors to be set to fabricate a displayed aspect ratio of 14:9 (instead of the usual widescreen 16:9). Perhaps this is done so games written for that ratio of video frame width to video frame height will "look right." I gather the user can select it when needed. But you're not actually using this aspect ratio, right? So it shouldn't be an issue ...

Jeremy said...

Hello again Eric, and you have gone above and beyond the call of duty, so I thank you for it!!!

Ok, a quick review...
I'm using an HDMI cable, I have tried a component and a HDMI to DVI, they all look similar, except that the component causes ghosting.

When I'm in the video settings of the PS3, I auto check for display resolutions and when the PS3 is done it says that my TV supports all of the available HD resolutions.
480p,720p, 1080i, 1080p.

Sometimes I turn off both 1080s hoping that maybe that will fix my problem. It doesn't.

When I play a game, every time now, I ALWAYS use the "Info" button on the remote that came with this TV and when I do, it says, "HDMI 1, Game, 1280x720".

Now on another post I started someone said its possible that my PS3 is outputting 720p but the monitor is upscaling it to 1080p because its more of a LCD PC monitor than an HDTV. And maybe when I hit info it's just displaying what the TV is receiving and not what the TV is actually outputting.

Another hint that this is what's happening is whenever I run one of my PC games in 1280x720, the picture looks very foggy, as if a cheese cloth were laid over the screen. You know that look when your not running a monitor at its native res? And when I'm playing a game like Red Dead Redemption or Infamous (both 720p) it doesn't have that foggy look, and it looks crisp as though i were running it in 1080p (minus the aliasing).

What device is in a HDTV like say a 32" Sony Bravia @1080p, that makes a console game look good at any resolution, that's not in this 2333HD, LCD TV/PC monitor?

Thank you so much for your time Eric. Cheers.

eric said...

Jeremy,

... the component causes ghosting.

Whoa! That shouldn't happen!

Sometimes I turn off both 1080s hoping that maybe that will fix my problem. It doesn't. ... I ALWAYS use the "Info" button on the remote that came with this TV and when I do, it says, "HDMI 1, Game, 1280x720".

OK, so we know for sure that the PS3 is outputting 720p, because it's definitely true that the

PS3 is outputting 720p but the monitor is upscaling it to 1080p

All flat panel monitors and HDTVs, whether or not they are LCDs, scale all inputs as necessary to their native screen resolution, which for the 2333HD is 1980 x 1080p. So any input signal that is not already 1980 x 1080p is upscaled by the 2333HD.

When you experimented with turning off 1080p and 1080i output from the PS3, thus making sure of 720p output, you saw aliasing. What happens if you turn off 720p output from the PS3? My prediction is that the 2333HD will report 720x480 input (i.e., 480p). The question is: what effect if any will that have on the aliasing? (I'm not suggesting you use such a setup normally, just that you test with it to see what happens ... )

I think its time for you to bite the bullet and try hooking your PS3 up to another TV or monitor, preferably a flat panel of some kind, via HDMI if possible. Enlist a friend who has a flat panel, or take your PS3 with an HDMI cable into Best Buy or some other store and tell them you're auditioning possible HDTV purchases or something. I'd imagine they'd let you hook up to one of their floor models. Or, be honest and tell them exactly why you're doing it, and you may be lucky enough to have someone give you some useful information.

Another hint that this is what's happening is whenever I run one of my PC games in 1280x720, the picture looks very foggy, as if a cheese cloth were laid over the screen. You know that look when your not running a monitor at its native res? And when I'm playing a game like Red Dead Redemption or Infamous (both 720p) it doesn't have that foggy look, and it looks crisp as though i were running it in 1080p (minus the aliasing).

What device is in a HDTV like say a 32" Sony Bravia @1080p, that makes a console game look good at any resolution, that's not in this 2333HD, LCD TV/PC monitor?


I use Macs with built-in monitors, so unfortunately I know little about the world of standalone computer monitors. I'm guessing that maybe your monitor lacks the video processing circuitry in consumer LCDs that allows them to smooth motion on screen, for example. Such circuitry relies on sophisticated "digital filter" technology. It typically takes advantage of a high screen-refresh rate like 128Hz or 256Hz -- I don't know what the refresh rate of the 2333HD is. Such sophisticated video processing can "clean up" an otherwise artifact-y signal, to an extent.

Even if this guess is correct, though, it still leaves open the question of where the artifacts come from in the first place. Here, my guess is still that some but not all PS3 games (often because they're ports from another gaming system) don't properly use the antialiasing capability of the PS3, a capability which is apparently harder to code for than on other gaming systems. The PS3, accordingly, outputs a signal with a lot of aliasing artifacts ... and your monitor, lacking the video processing circuitry of consumer HDTVs, is powerless to clean up the signal.

In short, I'm guessing that you're paying a price for trying to run the PS3 into a computer monitor: you're finding that the monitor reveals a shortcoming of the PS3, in terms of anti-aliasing, that many posts online confirm has bothered other PS3 owners who don't even use a computer monitor as their video output device.

Does any of this make some sense to you?

Jeremy said...

Yes Eric, I really appreciate your time. I was a bit worried that it was something simple wrong that I didn't realize and that i should have taken the monitor back. I feel comfortable with the knowledge you have helped me with that it just was a slightly un-informed purchase on my part.

But ultimately I paid 250$ (it was on sale) for a great PC monitor and an HDTV that looks decent if a game is native 1080p and "workable" if its anything else.

And I think I understand why HDTVs cost more than a monitor of the same size. They have the high end circuitry that results in a high end picture, where as a PC does a lot of its video execution "in house" and the PC monitor is a little more stripped down as far as internal hardware goes.

I think we can finally call this case closed. I am at peace with my purchase, knowing "I got what I paid for" lol.

And Eric, thanks again, I think I'll stick around a while too, you blogs are very helpful to say the least, cheers!!!

eric said...

Jeremy,

You said:

... I think I understand why HDTVs cost more than a monitor of the same size ...

OK, now that we have talked about this, I think I do too!

I forgot to ask, do you get good results when you play a Blu-ray disc from your PS3 into your 2333HD? How about when you look at bonus features on the disc that are not recorded at 1080p24? If you don't see aliasing with the same PS3 and 2333HD settings as you use for games that alias, that's a clue that the aliasing is coming from the games themselves as they render their graphics on the PS3. That is, if the games don't use the PS3's anti-aliasing capabilities to the best possible advantage, then that's the true source of the picture defects you see ...

Jeremy said...

I have tested a few Blu-rays. I did have one 1080p native game for the PS3 a while back called Final Fantasy 13. When I ran that game, it looked MUCH better than the 720p games. They still had a little aliasing but the picture was much better.

The two movies I tested were Hellboy and The Watchmen. With Blu-rays, they look like the 1080p game, a little better.

But they also introduce a new artifact. The best way to explain would be a swirling snow affect within any light gray to white colored sections.

At this point, I can tolerate this monitor only looking good at 1080p because thats all it was designed for, but even when Blu-rays and hi-res games don't look near spectacular, I have to ask myself, 'what did I pay for'?

Right now, since I'm as content as I can be with the 720p settings, I'm going to go test some Blu-rays and switch between enabling 24hz and turning it off for both movies.

Also, I mentioned on another forum I've been on as of late, that I was messing with Blu-ray settings one day and while switching between 16:9 and Just Scan and the picture switched from "Full Screen" to a "Letterbox" mode and the Blu-ray looked better. Before every movie would just fill the screen and that was that.

It just seems so inconsistent...
I'll let you know what I find out about the 24hz.

Cheers and thanks Eric!

eric said...

Jeremy,

Can you do screen snaps of the various things you have watched/played? If you can, please e-mail some of them — with documentation, including your current settings — to my e-mail address at the top of this blog page. I'd like to see exactly what kinds of picture "crud" you are getting.

Even better, do you have a way to make a short "movie" of your screen activity while you are witnessing aliasing during game play? I use an app called SnapZ Pro X on my Mac. On Windows, try HyperCam, as it's free.

Don't get a hernia trying to do that, though. I find a lot of this screen capture software doesn't necessarily work for video inputs, anyway.

If you are able to capture some of this, maybe I'll link to it in a blog post that might wind up helping others in the same situation as you ...

Cheers,
Eric

Jeremy said...

Eric, so sorry I have not been here for a while, I assure you, i'm not giving up just yet.

I have some interesting new info and I will be using my wife's camera to do some videos and shots here soon. maybe i'm blind but I can't seem to find your e-mail address at the top.

I'm going to get some video running my XBOX 360 as I thought it would be a great device to test on this monitor since it has a better scaling device (at least what I have heard).

Anyways i'm having the same issues with my 360 as the PS3. heavy aliasing using an HDMI cable and trying every possible configuration within the 360 control panel settings and the HDTVs CP settings.

I don't understand how i can play my PC game on this monitor and while it looks perfect, hit the source button on the remote to change from DVI input to the HDMI 1 input to have it look bad. It's as if the monitor is always trying to scale the image and by doing so is zooming in on the image the 360 is putting out.

Anyways, I hope to have some video and shots here soon of me showing my TVs CP and settings while turning on the 360. Talk to you soon Eric, thanks- Jeremy.

eric said...

Jeremy said...

Eric, so sorry I have not been here for a while, I assure you, i'm not giving up just yet.

I have some interesting new info and I will be using my wife's camera to do some videos and shots here soon. maybe i'm blind but I can't seem to find your e-mail address at the top.

I'm going to get some video running my XBOX 360 as I thought it would be a great device to test on this monitor since it has a better scaling device (at least what I have heard).

Anyways i'm having the same issues with my 360 as the PS3. heavy aliasing using an HDMI cable and trying every possible configuration within the 360 control panel settings and the HDTVs CP settings.

I don't understand how i can play my PC game on this monitor and while it looks perfect, hit the source button on the remote to change from DVI input to the HDMI 1 input to have it look bad. It's as if the monitor is always trying to scale the image and by doing so is zooming in on the image the 360 is putting out.

Anyways, I hope to have some video and shots here soon of me showing my TVs CP and settings while turning on the 360. Talk to you soon Eric, thanks- Jeremy.


Oops, I didn't realize that my e-mail address only shows up when I am signed in. It's epstewart2004 AT yahoo.com

You seem to have identical issues using the XBOX 360 as with the PS3, which suggests (since the 360 supposedly doesn't internally generate aliasing problems) your issues are not with aliasing generated from within the PS3.

You mention that you use the Samsung 2333HD's DVI input for your computer video, correct? To the best of my understanding, DVI and HDMI should give pretty much identical results! HDMI of course carries audio and DVI doesn't, and HDMI may be able to give you true 1080p where DVI couldn't, but I would think any tendency to put aliasing artifacts on the screen would be the same. What would you think of this:

Inverst in an HDMI-to-DVI converter like this one and use it to hook the PS3 to the 2333HD, just for testing purposes. You will lose audio for the time being, but never mind. Try playing your PS3 games. You can expect to be able to use 720p output from the PS3, as before, I would think. Do the aliasing artifacts still show up? Also try the DVI hookup with the XBOX. Same result as before?

If your problem clears up, then you would have to think the 2333HD isn't handling input on its HDMI ports well. That might be due to a malfunction on your particular unit, or it might be due to a design problem ...

If the problem persists using DVI, then we would have to ask what it is about the output video from your computer that works fine with DVI, while the output video from either the PS3 or the XBOX does not?

Anonymous said...

Very interesting my friend this gave me some relief