PDA

View Full Version : How to reduce MPEG artifacts in CGI source?


FredThompson
25th February 2004, 14:29
What "tricks" or techniques will help reduce MPEG artifacts when making MPEG2 stills from simple graphics?

Is that one of the reasons for anti-aliasing text?

I've found sharp transitions from one solid to another are messed up by MPEG2 encoding, regardless of pixel location or line width.

Dimmer
25th February 2004, 23:40
Be sure to maximize encoding bitrate. If you don't have an audio track, set it to 9.6Mbps. This should improve quality.

FredThompson
25th February 2004, 23:48
Most of what I'm seeing looks like DCT issues. Hard edges of high contrast colors look really bad. There must be guidelines to color use/placement which are used to make text on TV screens. That's what I'm most interested in discovering. How does text come out looking good on TV, DVD or digital satellite when my lossless bitmap sources look horrible after compression?

SomeJoe
26th February 2004, 17:28
As far as color information, there are a few rules for video. The following are for NTSC, but I believe PAL is similar:

1. Colors shouldn't be too saturated. In the RGB color space, no component should have a value above about 220. Over-saturated colors can cause bleeding & ringing artifacts.

2. Colors that are opposite each other in NTSC vector color space shouldn't be adjacent to each other. This means that the following color combinations are no-nos: Yellow/Blue, Red/Cyan, and Green/Magenta. You'll get a lot of mosquito noise, ringing, and color distortion on the boundaries between those colors, both due to the YUV conversion and heavy quantization in the MPEG encoding.

FredThompson
26th February 2004, 23:04
Many, many moons ago I read something about fingerprint powder. They always use colors which contrast highly with the surface. Red powder on a grey background, etc. That must be the same sort of thing I saw with red and green. There's always the artifacting but it's far more noticeable on high contrast colors.

Maybe the checkerboard pattern would have helped if the brightness difference was greater. At a distance, it will still appear to be more of a solid. Maybe it would help to bound the red stripes with a value halfway between the red and green? Maybe a single-pixel white stripe?

Sure would be nice if there are small modifications like that which will drastically reduce the visibility of artifacting.

FredThompson
27th February 2004, 03:42
Well, I've found a checkerboard background helps reduce the visual artifacts if the contrast is proper. The higher the contrast, the more visible the pattern is. There's also a point at which increased contrast really doesn't seem to reduce artifacts. I used the lighter color to outline the other elements in hopes that would help. It does help somewhat.

melodymaster
27th February 2004, 05:37
Originally posted by FredThompson
Well, I've found a checkerboard background helps reduce the visual artifacts if the contrast is proper. The higher the contrast, the more visible the pattern is.

The red line on a green background bitmap you sent me is going to have problems regardless of how it's used - a pattern in the red on Mpeg and DVcam encoding - even plain old NTSC will show excessive bleeding since it breaks the "non-contrasting colours" rule. However if the question is how well it's handled as a menu background with text, I think different authoring programs might give different results. I'll try it out tonight.

FredThompson
27th February 2004, 07:47
Oh, yeah, it's not going to be perfect. What's really weird is the ghosted copies of the horizontal line.

I tried to pick line locations and thicknesses that would work well into MPEG blocks in an effort to reduce noise. Seemed like a reasonable idea but I don't know enough about how MPEG works to really figure this out.