Closed novomesk closed 1 year ago
cc @podborski
If I change matrix coefficient from 5 to 6 via binary editor, Safari shows the file.
Daniel: Thanks for the info. Matrix coefficients 5 and 6 are functionally identical.
Matrix coefficients 5 and 6 are functionally identical.
Yes, but MatrixCoefficients 5 should be the preferred, if not the only strictly legal option (in addition to 0) to go w/ ColourPrimaries 1 and TransferCharacteristics 13, if you read the H.273 spec carefully...
Hi Miloš,
Thank you for your comment. H.273 says IEC 61966-2-1 sYCC is ColourPrimaries=1, TransferCharacteristics=13, MatrixCoefficients=5, but it also says in Table 4 that MatrixCoefficients values 5 and 6 are functionally the same, with the following note:
NOTE 8 – In a previous version of this Specification, the IEC 61966-2-1 sYCC representation was identified as corresponding to MatrixCoefficients equal to 1. Closer study later determined that this representation should correspond to MatrixCoefficients equal to 5 instead (which is functionally the same as the value 6). This Specification was therefore revised to correct the error.
So I cannot conclude from H.273 that 1/13/5 is preferred over 1/13/6 unless we want to refer to it as IEC 61966-2-1 sYCC.
So I cannot conclude from H.273 that 1/13/5 is preferred over 1/13/6 unless we want to refer to it as IEC 61966-2-1 sYCC.
This.
There will of course always be some wiggle room when interpreting specs. The way I read it, once you're in the TransferCharacteristics=13 case, there is (at least in my mind) clear intention that IEC 61966-2-1 is being used, meaning either sRGB (1/13/0) or sYCC (1/13/5).
@novomesk Matrix 5 support is unfortunately not there in all code-paths. It tends to be pretty uncommon in HEIF/AVIF though, with the MIAF defaults for NCLX being 1/13/6 IIRC. The feeling I have gotten in discussions over the years is that 6 is preferred over 5.
I have filed an internal bug report about it and routed it to the appropriate team. Since this is not a libavif issue, I guess this issue should be closed and a new issue should be filed with WebKit so that there is an externally visible issue tracking it.
As a workaround, using matrix 6 should work everywhere.
Hello,
@leo-barnes FYI,
I have a
problem.avif
which doesn't show in Safari browser for some reason. I'd like to know if there is something wrong with the file or it is something on Apple's side. It would be useful for me to know, what to do (or what to avoid) so that the AVIF images work in Safari.problem.zip
File was created by encoding JPG image via avifenc 0.11.1, I believe libaom v3.6.1 was used.
Image works in Firefox and Chrome.
Uploading to https://gpac.github.io/ComplianceWarden-wasm/avif.html shows: