View Single Post
Old 12th March 2009, 08:22   #16  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Manao View Post
A well dithered 8-bit 4:2:0 is perfectly watchable. However, you can't encode it efficiently without losing the dither (since dither acts like noise with a very small variance). Furthermore, though it isn't intuitive, 10bits AVC is actually more efficient than 8bits
Despite the fact that deblocking is partially broken at bit depths above 8 due to a mistake in the standard?

Quote:
Originally Posted by JVT-experts
Equations 8-474 to 8-477 derive tc and tc0 from tc0' (which itself is derived from indexA and bS). tc and tc0 are used to clip delta of pixels values, so their inherent scale is the plane bitdepth. tc0' is decorrelated from bitdepth. With a bitdepth of 8, we have :
(1) tc0 = tc0'
(2) tc = tc0 + (condP ? 1 : 0) + (condQ ? 1 : 0) or
(2') tc = tc0 + 1

With a bitdepth of more than 8, we have :
(3) tc0 = tc0' << (bitdepth - 8)
(4) tc = tc0 + (condP ? 1 : 0) + (condQ ? 1 : 0) or
(4') tc = tc0 + 1

I think that, for homogeneity's sake, it should have been :
(3) tc0 = tc0' << (bitdepth - 8)
(4'') tc = tc0 + (((condP ? 1 : 0) + (condQ ? 1 : 0)) << (bitdepth - 8)) or
(4''') tc = tc0 + (1 << (bitdepth - 8))

If we don't do it my way, the behavior of the deblocking is changed when bitdepth increases. Naively, I would say that, given a set of 8bits pixels, if I were to multiply those pixels by 2^N, then to apply the deblocking process as if I had a bitdepth of 8+N bits, and finally to divide the result of the deblocking process by 2^N, I should get the same results (if we ignore rounding errors) as if I were to run the deblocking process in 8bits on the original set of 8bits pixels. Equations 8-474 and 8-475 prevent that from happening, because they aren't homogeneous. And I think that definitely wasn't a wanted feature.
Dark Shikari is offline   Reply With Quote