Vidvox / hap-qt-codec

A QuickTime codec for Hap video
Other
199 stars 27 forks source link

HapQ looks worse than Hap #16

Closed eclazi closed 10 years ago

eclazi commented 10 years ago

Encoded a gradient with v4 of the Windows codec using MPEG StreamClip v1.2 at 100% quality.

Result in HapQ looks worse than Hap significantly.

Both results and source are include in hap_example.zip https://www.dropbox.com/s/qstqz5ufrouye88/hap_example.zip MD5: b8c1e1af01dcce696d855b4629978794

bangnoise commented 10 years ago

Hap Q does indeed look worse than Hap for this particular image.

Gradients are definitely the main weak spot for all varieties of Hap. Pixel for pixel, Hap Q generates an image more like your original, but by reducing the amount of banding it becomes more obvious when banding does occur (the PSNR of your image encoded with Hap is 8 vs 36 for Hap Q (higher is better)).

Your image is doubly unfortunate in being a blue-red gradient - if you invert it, you'll see Hap Q does better than Hap for a yellow-green gradient.

If the gradient is gradual, and for images with no gradient, Hap Q produces better results by eye and by measurement than Hap - or do you find otherwise?

It may be possible to improve the YCoCg DXT encoder used by Hap Q, but gains are likely to be marginal. An additional Hap format with better results for rendered content such as gradients would be a good thing for sure.

When banding becomes problematic in gradients you can improve results by adding a bit of noise prior to encoding with Hap.

eclazi commented 10 years ago

I see. Makes sense. Thanks.