MasteringDisplay_Luminance parameter different on Linux and Windows machines
MasteringDisplay_Luminance parameter different on Linux and Windows machines
Machines configuration: Linux: Debian 9 (x64 - VirtualBox machine) Windows: 7 (x64) Processor: Intel Core i3-3220 RAM: 16 GB
File: http://uhdsample.com/9-sony-swordsmith-hdr-60-fps-demo-trailer.html
Linux value: "Mastering display luminance: min: 0.1000 cd/m2, max: 0 cd/m2" Windows value: "MasteringDisplay_Luminance: min: 0.1000 cd/m2, max: 1 cd/m2"
MediaInfo version: 19.04 (x64) Linux: https://mediaarea.net/en/MediaInfo/Download/AppImage Windows: https://mediaarea.net/en/MediaInfo/Download/Windows
The HDR metadata in this file is really buggy! But not a reason for different output.
Meta.Luminance[1] = 5000 Linux: Ztring::ToZtring(((float64)Meta.Luminance[1]) / 10000, 0); = 0
Windows: Ztring::ToZtring(((float64)Meta.Luminance[1]) / 10000, 0); = 1

@JeromeMartinez when you plan fix this issue?
@JeromeMartinez when you plan fix this issue?
There is no guaranteed delay for a fix on free support, it may be anything between tomorrow up and never. If you desire a guaranteed delay for a fix, see support contracts and contact us directly.
@JeromeMartinez when you plan fix this issue?
There is no guaranteed delay for a fix on free support, it may be anything between tomorrow up and never. If you desire a guaranteed delay for a fix, see support contracts and contact us directly.
Can you tell me, what Mastering display luminance value is right for this file?
Can you tell me, what Mastering display luminance value is right for this file?
Linux version is obviously wrong as max is lower than min ;-). More exactly, it is a rounding issue + issue with not displaying enough precision, max having not digit after comma. The right value is "max 0.5000 cd/m2".
Can you tell me, what Mastering display luminance value is right for this file?
Linux version is obviously wrong as max is lower than min ;-). More exactly, it is a rounding issue + issue with not displaying enough precision, max having not digit after comma. The right value is "max 0.5000 cd/m2".
Thank you very much
Meta.Luminance[1] = 5000 Linux: Ztring::ToZtring(((float64)Meta.Luminance[1]) / 10000, 0); = 0
Windows: Ztring::ToZtring(((float64)Meta.Luminance[1]) / 10000, 0); = 1
@pavel-pimenov, could you tell me what does that condition (Meta.Luminance[1]-((int)Meta.Luminance[1])==0)?0:4? Why precesion may be zero?
https://github.com/MediaArea/MediaInfoLib/blob/38e2520e6f161edb7f1f1945aa7d7bdd4707b0d1/Source/MediaInfo/File__Analyze_Streams.cpp#L150
Why precesion may be zero?
What does it mean why? Because you usually need 0 precision after decimal point if there are no digits after decimal point. @JeromeMartinez is not (Meta.Luminance[1]-((int)Meta.Luminance[1])==0)?0:4 always true? Just change to just 4. Because consider 1000.1000 value, it will be printed not as 1000.1, so no point. You can of course do % 10, % 100, % 1000, % 10000, but why? We are not a math app. Also 0.0000 has no meaning.
Interesting, https://github.com/MediaArea/MediaInfoLib/blob/fafb087ed80f37ed370b503ee30254cd65f21317/Source/MediaInfo/File__Analyze_MinimizeSize.h#L781
I reopen the issue because the precision issue is fixed but not the rounding issue (definitely need to replace all the ugly rounding related code).
You should also add something to fix this: https://github.com/justdan96/tsMuxer/issues/313#issuecomment-659791664
Mastering display luminance : min: 322415.4473 cd/m2, max: 397427 cd/m2
What??????? P.S. See how max is rounded also, BTW ;) That is now fixed. D:)
What???????
Apparently that is MDCV in SEI of AVC. That was implemented recently. Totally forgot. https://code.videolan.org/videolan/x264/-/merge_requests/5