News for hackers. Stuff that matters.
Re:Decoding AVIF: Deep dive with cats and imgproxy by newpavlov on Monday August 16, 2021 @09:01PM (#28204895)
I wonder what are modern use-cases for 4:2:2 sampling? Is it simply a historic relic, which gets ported from codec to codec?
Re:Decoding AVIF: Deep dive with cats and imgproxy by brigade on Monday August 16, 2021 @11:09PM (#28205759)
Unlike 4:2:0 it works well as a packed format (e.g. Y0 Cb Y1 Cr), and unlike 4:4:4 it's a simple 2 bytes per pixel (packed 4:4:4 either uses an uneven 3 bytes per pixel or wastes 1 byte per pixel...)

Which led to a lot of simple and professional HW/SW being designed for packed 4:2:2, so codecs support 4:2:2 to fit into professional pipelines.

Re:Decoding AVIF: Deep dive with cats and imgproxy by newpavlov on Tuesday August 17, 2021 @01:00AM (#28206377)
Thank you! Yeah, the ability to handle pixel data in chunks of 4 bytes can be useful in certain context.
Re:Decoding AVIF: Deep dive with cats and imgproxy by CharlesW on Monday August 16, 2021 @09:42PM (#28205135)
> I wonder what are modern use-cases for 4:2:2 sampling? Is it simply a historic relic, which gets ported from codec to codec?

https://en.wikipedia.org/wiki/Chroma_subsampling nicely explains this clever hack's continuing relevance.

TLDR: Chroma subsampling (as done in the 4:2:2 Y'CbCr color space) is used to improve video encoding efficiency by taking advantage of the "human visual system's lower acuity for color differences than for luminance".

Re:Decoding AVIF: Deep dive with cats and imgproxy by newpavlov on Monday August 16, 2021 @09:46PM (#28205170)
I do understand [1] why 4:2:0 sampling is used, my question was strictly about 4:2:2.

[1]: https://news.ycombinator.com/item?id=28204865