Avoiding/Removing 8-Bit Sky Artifacts

Ben_B

Veteran
Hi, thought I'd start this thread to see what people are doing either on set or in post to avoid blockiness and 8-bit banding in the sky and other places. It's present in lots of footage and can be highly exacerbated by color correction.

Here is a screen grab that shows the problem pretty heavily post color correction. You can see blockiness between the building and the flag, as well as lots of blockiness on the edges of the bands in the sky.

screenshot20101011at102.png


Yikes!

My primary method for removing this issue in post is what I call the "two layer" method. You attempt to isolate the problem areas to be edited separately, whether by keying, rotoscoping, or by using a brush tool of some kind. Then you apply your color correction (and problematic filters like post-vignetting, seen here) to the problem area separately . Then you apply a compound blur or some other non-distorting blur (that blurs while keeping everything in its place, gaussian probably won't work too well) to the layer that you've isolated the sky or other problem area on.

Here are the results of this process, using color keying. You can still see banding in the sky, but all of the blockiness of it is gone, and it's much cleaner. The blocky artifacts between the building and the flag are also gone (and keep in mind that they MOVE on the original footage, the remaining artifacting does not.) I could probably go in there with a brush and clean this up more, but I feel like it's satisfactory, especially compared to the original. I assume you must do this with 10-bit (after transcoding) footage in a 10-bit (or greater) environment or otherwise there is no point...you'll get the problem no matter what.

screenshot20101011at102h.png


Oh random note, this is a 720p clip that is being uprezed in a 1080p timeline so that's why there is some artifacting on the flag and the resolution of the building really probably isn't what it should be. My final output for this project is the web so I am not too concerned...played in a window it looks great, and full screen after compression will probably be about the same as the other clips.
 
I've also found that applying a film-grain filter in a program like Magic Bullet Looks helps reduce the visual impact of any blockiness in the sky. I will post some images. With a fine enough grain once the video hits the web you don't really notice the grain anyway...if you don't want that look.
 
Yes, noise is the usual and most effective way of reducing digital truncation like this. It's called dithering. You can actually get more apparent tonal response out of the same word length by just adding noise. You're probably best off adding the right amount straight away during conversion from sensor raw to 8-bit, but unfortunately the AVCHD on the GH1 includes some pretty heavy noise reduction so it doesn't work well there. In MJPEG mode though, if you turn noise reduction all the way down and shoot at ISO 320 or above, you've probably added enough random noise to dither any possible color banding.
 
Last edited:
Please give 5DtoRGB a go. It isn't optimised for the GH1 by any means but does transcode .mts files really nicely. Specifically there is an option to add grain before the transcode. This really does magic in my opinion and the grain is so slight as to be similar to a film grain. This is really useful when the material is broadcast because it adds noise that helps reduce banding. I almost always add noise to my graphics anyway to make gradients appear smoother. I think the 5DtoRGB transcode is stella and everyone should try it out. It's no good for long form as there is no batch facility, and you lose the audio. But since I work in motion graphics I very rarely deal in long form or audio. The other thing to mention is that it spits out a 50fps movie. You have to go into cinema tools on a mac and conform to 25fps PAL. No big deal.

I did contact the developer and he was very receptive to suggestions. He says some of the issues I mentioned would make i into the next beta phase

http://rarevision.com/5dtorgb/

all the best
reg
 
Dithering must be applied prior to truncation to 8-bit. When done properly (the noise must have right amplitude and probability distribution) it can extend the perceived bit-depth beyond 8-bits. Representing shades of grey with black & white (1-bit) dots is good example of (rather extreme) dithering. Looking at it from certain distance you can perceive grey even though the image is 1-bit.
Unfortunately, adding noise after truncation is not the same thing. It is not dithering, actually. Sure you can bury some artifacts in noise, mask them, but it gets nowhere close to what dithering can achieve - in fact it cannot increase the perceived bit-depth anymore. Proper dithering must be implemented in-camera :(

By the way (sorry if this sounds stupid) - what display do you watch your footage at? I've seen many people complaining the get such artifacts, but the reason often turns out to be their 6-bit laptop LCD...
 
Last edited:
This 'noise up the signal' is not limited to this sort of application... real 'test' equipment manufactures will 'noise up' test equipment when the lowest level of sensitivity is reached, so that their 'underwear' doesn't show. (That is how noisy their equipment is at these reduced levels.)...

I have been aware of 'still' image filters that either attempt to minimize nose/banding, etc. by general means, or for specific camera models where a noise profile is obtained.

I think there are 3 alternatives... 1) shoot things that don't have large continuous regions, when you have a bit-depth limited medium. 2) find some filter or method that minimizes the effect (I don't have one really for this particular problem...), 3) shoot with a camera that has deeper bit-depth... but I think you will find any 'digital' camera will have this problem at some point... even raw, one has the ultimate resolution of the sensor in terms of bits per pixel...

I experimeted with 'film grain' when I did some DVX100 stuff. Not only did I 'uprez' the SD to HD, but added 'grain' to cover the uprezed artifacts. If I was 'pressed' to do so, I think I'd go that route. But it is a specific stylization, that may not be appropriate for many situations... like a corporate video... isn't the place for 'grainy grungy indie film effects'... I know... I did that for a 'on location' sequence used in a presentation for 'conservative' top managers for a project... these guys never left their offices to go to 'locations', and so I thought I'd give them a view on how things are in the field... the other presenters had 'nice clean' images... dull as hell, but where received much better than the 'neo realism+grunge'...
 
Good post. Having to deal with this is going to come up at some point for most people.
IMO, this is one of the biggest problems with the GH1 and seems to have been covered up with all the talk of mud and FPN. It does seem more subdued since working with the hack though.

Something I tried a while back, was transcoding to different codecs and found that to my eyes, the 10bit AJA codec did a really good job of minimising this. Obviously the problem will reoccur once you round trip back to your edit or output codec, if it's an 8 bit one, so adding some noise does a good job. Neat image does a good job of clearing some of this too.
 
When done properly (the noise must have right amplitude and probability distribution)

Your post was good but I just have to argue what is possibly just semantics here... the "right amplitude" isn't necessarily an exact value. A better term might be "SUFFICIENT amplitude." As long as the noise is of fine enough grain, random even distribution, and high enough amplitude, when applied before truncation, dithering will be successful.

What this means is that shooting in MJPEG (probably above base ISO) can meet all these requirements with just sensor noise alone, and it will in fact truly dither the signal and reduce or eliminate color banding. It may or may not be shaped into the grain colors and grain sizes that are ideal (less noticeable) but it works!

The downside to adding more than just sufficient noise (> 1 bit) is that SNR suffers. And although we usually talk about SNR being interchangeable with dynamic range, I think in this case it's not - you should be able to perceive detail below the noise floor.
 
In After effects can use the Remove Grain and make a pretty good job removing the banding, must adjust some parameters cause the default doesn´t work, some softness appear in the image but not too much all depends how much noise do you remove. If you have access to the Magic Bullet Denoiser work too.

Give a try

Sorry for my bad english
 
Your post was good but I just have to argue what is possibly just semantics here... the "right amplitude" isn't necessarily an exact value. A better term might be "SUFFICIENT amplitude." As long as the noise is of fine enough grain, random even distribution, and high enough amplitude, when applied before truncation, dithering will be successful.

Good point. By saying 'right amplitude' I meant the smallest 'sufficient amplitude' - the one that dithers properly yet doesn't introduce too much noise.

What this means is that shooting in MJPEG (probably above base ISO) can meet all these requirements with just sensor noise alone, and it will in fact truly dither the signal and reduce or eliminate color banding. It may or may not be shaped into the grain colors and grain sizes that are ideal (less noticeable) but it works!

Very very interesting. Haven't though about that this way.

The downside to adding more than just sufficient noise (> 1 bit) is that SNR suffers. And although we usually talk about SNR being interchangeable with dynamic range, I think in this case it's not - you should be able to perceive detail below the noise floor.

True - we don't see SNR - we see 'dynamic range'. This is why dithering works. Our brains can 'look into the noise'.
 
T3) shoot with a camera that has deeper bit-depth... but I think you will find any 'digital' camera will have this problem at some point... even raw, one has the ultimate resolution of the sensor in terms of bits per pixel...

The problem is when the gorgeous footage leaves your workstation. You can have pristine 10bit footage that looks great in the suite, but it gets compressed to hell when it goes to air. At least that's the case in Australia. Until we start to see consumer 10 bit TV's and the bandwidth to feed them over the air, then you will still get banding to some extent, because of the excessive compression used. I am constantly amazed at what goes to air. I usually add a little noise to my stuff especially if it's graphics with large gradients.
 
Dithering must be applied prior to truncation to 8-bit. When done properly (the noise must have right amplitude and probability distribution) it can extend the perceived bit-depth beyond 8-bits.
Unfortunately, any dithering added before encoding the video in MJPEG or AVCHD would either be crushed flat by the compression or max out the bitrate. While dithering can make the image appear to be smoother, it adds randomness that resists compression. This is one of the reasons why it's such a bad idea for a video acquistion device to use encoders optimized for commercial content delivery.
 
Unfortunately, any dithering added before encoding the video in MJPEG or AVCHD would either be crushed flat by the compression or max out the bitrate.

True. Having properly dithered uncompressed 8-bit output (SDI, HDMI) is possible, though
 
Unfortunately, any dithering added before encoding the video in MJPEG or AVCHD would either be crushed flat by the compression or max out the bitrate.

I don't think this is necessarily true of MJPEG with a very high bitrate hack on the GH1. If you think about it, the only areas that really need dithering are those with large blocks of near-similar colour. Any scene that includes this definitely isn't going to be using all the available bandwidth on the scene's detail (because real detail isn't occuring through the whole scene - we have big blocks of flat colour!) That leaves a lot more room to encode the noise. And from what I've seen, MJPEG does exactly that. In lower detail scenes you will get a lot of really fine-grain sensor noise encoded. This can work really well as dithering because the compression means the noise will be adapatively encoded only to the areas that happen to actually need it - where bandwidth is available to do so.
It doesn't work in AVCHD where the algorithms see a big block of flat colour and try to do everything possible to sieze the opportunity to save bandwidth, crushing it flat.
 
I don't think this is necessarily true of MJPEG with a very high bitrate hack on the GH1... the only areas that really need dithering are those with large blocks of near-similar colour. Any scene that includes this definitely isn't going to be using all the available bandwidth on the scene's detail... That leaves a lot more room to encode the noise.
Yes, this effect can be exploited in MJPEG when you have enough bitrate (65+ Mbps) to force both luma and chroma quantization tables into saturation. It's easy to do in severely under or overexposed scenes where there is only limited dynamic range to begin with. For well-lit, properly-exposed daylight scenes, the GH1's MJPEG encoder's Quality Levels will drop below 95, and noisy chroma details will effectively reduce the tonal dynamic range. What this means is that genuine color resolution has been reduced and replaced by dithered approximations.
 
I've tried 5DtoRGB and the final result it's good, but I found it really slowly, compared with the Final Cut Pro acquisition
and you can't make a list of clips, but have to transcode one by one..

salute,
Miko

Please give 5DtoRGB a go. It isn't optimised for the GH1 by any means but does transcode .mts files really nicely. Specifically there is an option to add grain before the transcode. This really does magic in my opinion and the grain is so slight as to be similar to a film grain. This is really useful when the material is broadcast because it adds noise that helps reduce banding. I almost always add noise to my graphics anyway to make gradients appear smoother. I think the 5DtoRGB transcode is stella and everyone should try it out. It's no good for long form as there is no batch facility, and you lose the audio. But since I work in motion graphics I very rarely deal in long form or audio. The other thing to mention is that it spits out a 50fps movie. You have to go into cinema tools on a mac and conform to 25fps PAL. No big deal.

I did contact the developer and he was very receptive to suggestions. He says some of the issues I mentioned would make i into the next beta phase

http://rarevision.com/5dtorgb/

all the best
reg
 
Last edited:
Back
Top