YUV to RGB matrix option has no effect

Anything and everything to do with DCP-o-matic.
Antti N
Posts: 22
Joined: Mon Nov 16, 2020 5:03 pm

YUV to RGB matrix option has no effect

Post by Antti N »

Hi,
I just created three DCP's from the same source file, each time choosing a different YUV to RGB conversion matrix under Colour –> Custom. To my surprise, I found out that the resulting j2k files are all bit-identical.

This also means that the Colour presets Rec.601 and Rec.709 actually give identical results, since the YUV to RGB matrix choice is the only difference between them.

I'm using DoM 2.16.71, and I tried two different source files: one tagged as Rec.601, another as Rec.709.
carl
Site Admin
Posts: 2362
Joined: Thu Nov 14, 2013 2:53 pm

Re: YUV to RGB matrix option has no effect

Post by carl »

Do you have the ffprobe.log output for the source files you are using?
Carsten
Posts: 2665
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: YUV to RGB matrix option has no effect

Post by Carsten »

One should see changes in the conversion parameters being reflected in the video waveform monitor. If it doesn't change, there must be something wrong (or no changes).

I also assume - if your source is already RGB, no YUV->RGB matrix is applied, so changes to the matrix parameters will have no effect. Most standard video files though should be YUV. The change between 601 and 709 is not that large, btw, and it may actually be hard to spot it in a DCP.


When I try different settings in 2.16.71 on my Mac, I see the changes reflected properly in waveform monitor, so, at least it's not a fundamental bug introduced lately.


Can you try e.g. Bunny from the benchmark reference? http://download.blender.org/peach/trail ... r_480p.mov
Antti N
Posts: 22
Joined: Mon Nov 16, 2020 5:03 pm

Re: YUV to RGB matrix option has no effect

Post by Antti N »

All right, found the explanation:

When I create the 2nd and 3rd versions from the same project file, only changing the YUV to RGB option and not touching anything else, DoM doesn't actually re-encode image data. It doesn't seem to realize that this setting has been changed (even though the video waveform display does change) and simply reuses the j2k encoding from the first version.

No wonder then that the files ended up bit-identical: I was actually comparing three Rec.601 encodings. ;-)
StephW999
Posts: 36
Joined: Mon May 17, 2021 1:15 pm

Re: YUV to RGB matrix option has no effect

Post by StephW999 »

I confirm that since version 2.16.xx that with the rec601 selection the YUV to XYZ matrix does not work. the result seems to always be rec709.
It works perfectly with version 2.14.59
Best regards
Antti N
Posts: 22
Joined: Mon Nov 16, 2020 5:03 pm

Re: YUV to RGB matrix option has no effect

Post by Antti N »

StephW999 wrote: Sun Jan 07, 2024 6:29 pm I confirm that since version 2.16.xx that with the rec601 selection the YUV to XYZ matrix does not work. the result seems to always be rec709.
It works perfectly with version 2.14.59
Best regards
Seems to work for me, as long as you delete the contents of the "video" project folder between encodings to work around the aforementioned bug. DoM 2.16.71 / Ubuntu 22.04.

I just created two test clips, and there's a very slight difference between the Rec.601 and 709 encodings, as expected. Mostly visible when comparing waveforms in something like DaVinci Resolve.
Last edited by Antti N on Sun Jan 07, 2024 7:27 pm, edited 2 times in total.
carl
Site Admin
Posts: 2362
Joined: Thu Nov 14, 2013 2:53 pm

Re: YUV to RGB matrix option has no effect

Post by carl »

Thanks for investigating further! I noted that in the tracker: https://dcpomatic.com/bugs/view.php?id=2714
StephW999
Posts: 36
Joined: Mon May 17, 2021 1:15 pm

Re: YUV to RGB matrix option has no effect

Post by StephW999 »

Antti N wrote: Sun Jan 07, 2024 7:23 pm
Seems to work for me, as long as you delete the contents of the "video" project folder between encodings to work around the aforementioned bug. DoM 2.16.71 / Ubuntu 22.04.
Ah yes indeed, I have just noticed it also with the Windows version.
:)
Carsten
Posts: 2665
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: YUV to RGB matrix option has no effect

Post by Carsten »

As far as I understand it, there is a range of image parameters that trigger a re-encoding when changed. Somehow that one must have been lost at some point.