View Full Version : xvYCC in x264 or other encoders?


benwaggoner
17th June 2013, 23:50
Say,

Is there support for encoding H.264 with xvYCC in x264 or other generally available H.264 encoders?

http://en.wikipedia.org/wiki/XvYCC

It may just be a matter of setting a metadata flag correctly, as long as the encoder doesn't clamp the chroma range or something.

kieranrk
18th June 2013, 00:10
There is some sort of undocumented SEI in AVCHD for setting xvYCC

drmpeg
18th June 2013, 02:45
There is some sort of undocumented SEI in AVCHD for setting xvYCC

Isn't it just a matter of setting transfer characteristics = 11 in the VUI?

Doesn't look like it's supported in the current version of x264.

Ron

kabelbrand
18th June 2013, 10:50
Doesn't look like it's supported in the current version of x264.

There was a patch adding BT.2020 to the Colour Primaries a few days ago.
One of the newly added Transfer Characteristics was IEC 61966-2-4:
http://mailman.videolan.org/pipermail/x264-devel/2013-June/010127.html

benwaggoner
19th June 2013, 19:23
There was a patch adding BT.2020 to the Colour Primaries a few days ago.
One of the newly added Transfer Characteristics was IEC 61966-2-4:
http://mailman.videolan.org/pipermail/x264-devel/2013-June/010127.html
Nice! I hope it makes it into a release build soon.

Was Rec 2020 included too? A guy can dream :)...

http://en.wikipedia.org/wiki/Rec._2020

sneaker_ger
19th June 2013, 19:37
Yes, as kabelbrand said:
There was a patch adding BT.2020 to the Colour Primaries a few days ago.

--colormatrix now goes up to 10, --transfer up to 15 and --colorprim up to 9. (dev commit (https://github.com/DarkShikari/x264-devel/commit/3beb02ea53a55b09f180a8b714bd28ea55374b0c))
Each corresponding to the values in the updated H.264 spec.

benwaggoner
19th June 2013, 20:28
Yes, as kabelbrand said:


--colormatrix now goes up to 10, --transfer up to 15 and --colorprim up to 9. (dev commit (https://github.com/DarkShikari/x264-devel/commit/3beb02ea53a55b09f180a8b714bd28ea55374b0c))
Each corresponding to the values in the updated H.264 spec.
So it is! But the 10-bit version without the expanded luma range, of course, which requires 12-bit.

I see xvYCC is in there as well: IEC 61966-2-4.

I look forward to doing some tests in the next few weeks!

drmpeg
19th June 2013, 21:44
So it is! But the 10-bit version without the expanded luma range, of course, which requires 12-bit.

All the BT.2020 permutations have been included in the patch.

transfer characteristics = 14, "bt2020-10" /* 10-bit */
transfer characteristics = 15, "bt2020-12" /* 12-bit */

matrix coefficients = 9, "bt2020nc" /* non-constant luminance */
matrix coefficients = 10, "bt2020c" /* constant luminance */

Ron

sneaker_ger
19th June 2013, 21:49
I look forward to doing some tests in the next few weeks!

So, what is there to test? It's just a flag, isn't it?

benwaggoner
19th June 2013, 22:01
So, what is there to test? It's just a flag, isn't it?
End-to-end from source to encode to player to screen, making sure it does what it is supposed to do and I can see the expanded xvYCC gamut colors.

Biggiesized
21st June 2013, 15:49
I never understood why xvYCC couldn't be shoe-horned into Blu-ray when the format was launched coincidentally with the spec.

I think Sony is doing something with xvYCC now, but it's particular to using a Sony Blu-ray player and Sony HDTV.