What should the default color space for `YCbCr` be?

Hi all,

I (we) will make a clarification about the default color space for each color type in the next minor releases of ColorTypes.jl and Colors.jl.

Of the color types defined in ColorTypes.jl, the definition of YCbCr is somewhat ambiguous. In fact, there are about 20 of just some of the candidate definitions.

So let me know some of your thoughts.

  • Are you currently using the YCbCr type defined in ColorTypes.jl? If so, what is your use case for it?

  • What do you think would be a suitable default color space for the YCbCr?

  • Do you need an add-on package to handle non-default YCbCr definitions/conversions?

  • Do you think it would be worth adding the YCoCg type, which is more clearly defined and has a speed performance advantage, to ColorTypes.jl?

Of course, other suggestions are welcome.

cc: @galenlynch

BTW, in practice, YCbCr is often used with chroma subsampling. I think the feature should be provided separately as a package under JuliaImages or related to VideoIO.jl rather than ColorTypes.jl or Colors.jl.

I have my hands full right now just maintaining ColorTypes.jl, Colors.jl and ColorVectorSpace.jl, so it would be great if someone could work on that.

VIdeoIO.jl was using YCbCr for video encoding and decoding, but I think it no longer does (it now instead relies on ffmpeg for color space conversion).

I think in your list Rec.709 (a) may be the most versatile and least surprising for people who don’t really know that many of the details, since from what I’ve seen it’s a pretty widely used YCbCr color space, but is not tied to a particular integer width. I think 10 bit versions of that color space are also being used more widely, which gives (a) a bit of an advantage over just Rec. 709.

YCoCg sounds nice, but YCbCr is so common that I think it would be worth keeping YCbCr even if you add YCoCg.

1 Like

I have added to the list variations on the corresponding RGB color spaces for the “so-called” Rec.709 case. The fact that the default RGB color space is sRGB is one of the troublesome aspects of this problem.