Theoretical Q: Do we even need YUV 4:2:0 colorspace ?

57 views
Skip to first unread message

Alexey Eromenko

unread,
Jul 28, 2016, 12:26:25 AM7/28/16
to codec...@webmproject.org
Hello again,

Today we have two knives in video encoding:
1. color space transform RGB -> YUV 4:2:0
2. DCT + quantization

Do we actually need both knives to cut our data ?

I was thinking about it: yes, it is a very effective "knife" that cuts
colors from an image, *but*...

If DCT and quantization can sort-the-values and cut it like knife,
maybe it will do a better job than using YUV 4:2:0 ?

My idea is instead to use YUV 4:4:4 colorspace + very aggressive color
quantization table. (for Red+blue colors; or chroma channels as you
call them)
What do you think ?

Alternatively, if you think the 1st knife is so very good (which I
doubt), why not make it even bigger like YUV 16:2:0 colorspace ?
(using 4x4 blocks)

--
-Alexey Eromenko "Technologov"

Monty Montgomery

unread,
Jul 28, 2016, 7:02:22 AM7/28/16
to codec...@webmproject.org
On Thu, Jul 28, 2016 at 12:26 AM, Alexey Eromenko <al4...@gmail.com> wrote:
> Hello again,
>
> Today we have two knives in video encoding:
> 1. color space transform RGB -> YUV 4:2:0
> 2. DCT + quantization
>
> Do we actually need both knives to cut our data ?

Yes. We need every knife we can apply, and the simple knives are
especially indispensible.

> I was thinking about it: yes, it is a very effective "knife" that cuts
> colors from an image, *but*...
>
> If DCT and quantization can sort-the-values and cut it like knife,
> maybe it will do a better job than using YUV 4:2:0 ?

They cut different things, and for different reasons. 4:2:0 has a
physiological basis in that the spatial resolution of human color
perception isn't nearly as high as the resolution of luma perception.
You can hack around it later and reduce the effective spatial color
resolution other ways, but 4:2:0 is comparatively simple and, in most
ways, more effective. You start with less data to begin with, have
less chaff to eliminate, and fewer unintended consequences.

> My idea is instead to use YUV 4:4:4 colorspace + very aggressive color
> quantization table. (for Red+blue colors; or chroma channels as you
> call them)
> What do you think ?

You can reduce the effective spatial resolution this way, but you'll
end up with considerably more ringing in the color planes, which you
will then also need to mitigate.

> Alternatively, if you think the 1st knife is so very good (which I
> doubt), why not make it even bigger like YUV 16:2:0 colorspace ?
> (using 4x4 blocks)

Similar things have been done, and NTSC is occasionally quantized as
4:1:1 or 4:1:0. However, 4:2:0 seems to be the empirical sweet-spot
for color subsampling.

Monty

Alexey Eromenko

unread,
Jul 28, 2016, 7:42:54 AM7/28/16
to codec...@webmproject.org

Okay,  thanks

Reply all
Reply to author
Forward
0 new messages