<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 8 июн. 2023 г., 05:04 Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com">randrianasulu@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Found this tidbit<div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><a href="http://psychtoolbox.org/news.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://psychtoolbox.org/news.html</a><br></div><div dir="auto"><br></div><div dir="auto">in 3.0.18 beta</div><div dir="auto"><br></div><div dir="auto">16 bit native (effective 12 bit) framebuffer support for Linux with AMD Polaris and later.<br></div><div dir="auto"><br></div><div dir="auto">====</div><div dir="auto"><br></div><div dir="auto"><p>This commit switches PsychImaging() to only expose 16 bpc 
framebuffers on such Linux + X11 + AMD Polaris+ + amdvlk + Linux 5.14 
systems, but then at much better reliability and performance than our 
old dead code.</p>

    <p>It allows to get up to 12 bpc per color-channel color output, ie.
 4096 intensity levels for red, green, blue, grayscale/luminance and a 
total of 64 billion shades of color, either on suitable 12 bpc capable 
high-end displays, or via spatial dithering by the gpu on the more 
common 10 bpc capable displays or even - at a lower quality - standard 8
 bpc capable displays.</p>

    <p>This makes Linux the first operating system to my knowledge to 
support this color precision on out of the box on commodity graphics 
hardware and displays, natively at full performance without any 
compromise in timing precision or reliability.</p>

    <p>Basic testing has been performed with a CRS ColorCal-2 on a 
HDR-10 10 bpc capable monitor and on a MacBookPro 2017 Retina display 
under Linux, with AMD RavenRidge and Polaris.</p><p><br></p><p>====</p><p><br></p><p>test apps apparently even include gstreamer-based movie player (never thought I'll find HDR player in medical software ...)</p><p><br></p><p><a href="http://psychtoolbox.org/docs/PsychHDR" rel="noreferrer noreferrer noreferrer" target="_blank">http://psychtoolbox.org/docs/PsychHDR</a><br></p><p><br></p><p><a href="http://psychtoolbox.org/docs/PlayMoviesDemo" rel="noreferrer noreferrer" target="_blank">http://psychtoolbox.org/docs/PlayMoviesDemo</a><br></p><p><br></p><p>===</p><p>If the optional flag ‘hdr’ is specified as non-zero, then the demo<br>
expects the onscreen window to display on a HDR-10 capable display device<br>
and system, and tries to switch to HDR mode. If the operating system+gpu<br>
driver+gpu+display combo does not support HDR, the demo will abort with<br>
an error. Otherwise it will expect the movies to be HDR-10 encoded and<br>
try to display them appropriately. A flag of 1 does just that. A flag of 2 will<br>
manually force the assumed EOTF of movies to be of type PQ, iow. assume the movie<br>
is a HDR-10 movie in typical Perceptual Quantizer encoding. This is useful if you<br>
want to play back HDR content on a system with a [<a href="http://psychtoolbox.org/docs/GStreamer" target="_blank" rel="noreferrer">GStreamer</a>]<a href="http://psychtoolbox.org/docs/%28GStreamer%29" target="_blank" rel="noreferrer">(GStreamer)</a> version older than<br>
1.18.0 installed, where [<a href="http://psychtoolbox.org/docs/GStreamer" target="_blank" rel="noreferrer">GStreamer</a>]<a href="http://psychtoolbox.org/docs/%28GStreamer%29" target="_blank" rel="noreferrer">(GStreamer)</a> is not fully HDR capable, but this hack may<br>
get you limping along. Another restriction would be lack of returned HDR metadata,<br>
so if your HDR display expects that, you will not get the best possible quality.<br>
Upgrading to [<a href="http://psychtoolbox.org/docs/GStreamer" target="_blank" rel="noreferrer">GStreamer</a>]<a href="http://psychtoolbox.org/docs/%28GStreamer%29" target="_blank" rel="noreferrer">(GStreamer)</a> 1.18 or later is advised for HDR playback.<br>
A flag of 3 or 4 will use an alternative HDR display method only available on<br>
Linux/X11, with 4 applying the same hack to cope with older [<a href="http://psychtoolbox.org/docs/GStreamer" target="_blank" rel="noreferrer">GStreamer</a>]<a href="http://psychtoolbox.org/docs/%28GStreamer%29" target="_blank" rel="noreferrer">(GStreamer)</a> versions<br>
as a setting of 2.<br></p><p><br></p><p>====</p><p><br></p><p>happy psyching! (???)</p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">from psychdr.m</div><div dir="auto"><br></div><div dir="auto">=====</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">% End of enable sequence, now we kill ourselves: Today is a good day to die!</div><div dir="auto">    % This will kill the Vulkan driver and hosting Octave/Matlab process without</div><div dir="auto">    % closing the Vulkan window. As a result, the Linux kernel will clean up after</div><div dir="auto">    % our dead process, releasing all resources and also releasing the HDR monitor/</div><div dir="auto">    % RandR output back to the X-Server and thereby to the regular Screen() fullscreen</div><div dir="auto">    % onscreen window that we want to use for purely OpenGL driven HDR stimulus</div><div dir="auto">    % presentation without any further involvement of Vulkan.</div><div dir="auto">    % We do the kill, because if our driver/process gets killed, the one thing</div><div dir="auto">    % the Linux kernel does not do (as of Linux 5.8 at least) is disable HDR</div><div dir="auto">    % metadata transmission to the HDR monitor. So the HDR monitor continues to</div><div dir="auto">    % receive our static HDR metadata and stays in HDR-10 mode with the statically</div><div dir="auto">    % assigned HDR properties, ready to receive OpenGL rendered and displayed HDR</div><div dir="auto">    % PQ encoded visual stimuli for display:</div><div dir="auto">    kill(getpid, 9);</div><div dir="auto"><br></div><div dir="auto">====</div><div dir="auto"><br></div><div dir="auto">this made me laugh!</div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>