[Ffmpeg-devel] upsampling of subsampled video data

Dan Maas dmaas
Wed Sep 13 21:42:54 CEST 2006


> No, the banding is an artifact of the bad colorspace conversion. If
> you treat the YUV data as the original picture then the codecs
> reproduce it quite well. The mistake is treating the RGB as the source
> (unless it's genuine RGB-10 or 12...)

I've done experiments with non-dithered 8-bit YUV converted directly
from floating-point RGB. The steps between successive 8-bit luma
levels are still big enough to be visible on a good TV monitor (output
via analog component from an Aja uncompressed video I/O
unit). Dithering is necessary when using 8-bit YUV if you want to get
perfectly smooth gradients. (10-bit YUV is OK without dithering).

Note that I'm talking about digitally generated images with perfectly
clean black-to-white gradients. On noisy images, like anything
captured with a real video camera, the problem is less apparent.

The codec problem is that, to a lossy codec operating in frequency
space, dithering looks like a very low-energy signal at very high
frequency. So it's usually the first thing that is dropped to reduce
the bitrate. With most DV and MPEG-2 encoders my experience is that
carefully dithered, subtle gradients just end up as 8x8 blocks of
solid color, with all of the high-frequency content knocked out.

Regards,
Dan




More information about the ffmpeg-devel mailing list