Open lam2003 opened 3 months ago
I had a look at the file structure. It seems that there is no color-space information in that file (no nclx, no ICC). Also the file structure is different than what I have seen before. The EXIF data says that it was captured by a Xiaomi camera. Is that correct, or was it post-processed in some other software?
The original image can play on MacOS(Version 13.4.1) correctly. I use mediainfo to parse file structure and found something difference.
Is there something wrong on the color conversion?
I have confirm the rgb matrix take from decoder already has color incorrection
It's strange that your tool says RGB colorspace, but Chroma 4:2:0. I'll need to have a closer look into the h265 stream.
It's strange that your tool says RGB colorspace, but Chroma 4:2:0.
... and matrix coeffs identity? exiftool indeed does not see any nclx or ICC either, but only chroma 4:2:0 as well - no matrix coeffs, no transfer curve...
The white comes out as (128, 255, 128) in RGB, which looks to me like some (U, Y, V) values?
FWIW, Windows 11 photo app shows it correctly as well.
It's strange that your tool says RGB colorspace, but Chroma 4:2:0.
... and matrix coeffs identity? exiftool indeed does not see any nclx or ICC either, but only chroma 4:2:0 as well - no matrix coeffs, no transfer curve...
The white comes out as (128, 255, 128) in RGB, which looks to me like some (U, Y, V) values?
FWIW, Windows 11 photo app shows it correctly as well.
The matrix coeffs value is 0;
My assumption is that these other libraries have sanity checks to change RGB 4:2:0 to Unspecified (and just treat that as 709), because shoddy developers assuming 0 is default or just not caring is definitely A Thing. This isn't an illegal configuration, if someone decided to subsample red & blue, it's just a weird and slightly crazy one.
I haven't checked whether flipping that bit to 1 will fix it, I can try when I get home tonight, but I suspect it will.
My assumption is that these other libraries have sanity checks to change RGB 4:2:0 to Unspecified (and just treat that as 709), because shoddy developers assuming 0 is default or just not caring is definitely A Thing. This isn't an illegal configuration, if someone decided to subsample red & blue, it's just a weird and slightly crazy one.
I haven't checked whether flipping that bit to 1 will fix it, I can try when I get home tonight, but I suspect it will.
I set matrix_coefficients to heif_matrix_coefficients_unspecified and output image can show correctly. Thank you!
Hi, I use heif_convert command(from libheif example) to convert below heif image to jpg/png. The output image color incorrect which seems too green
1040g008313u8g0qp1m4g5nkalku094d2qla98k0 2.heic.zip