Releases: Psychtoolbox-3/Psychtoolbox-3
Psychtoolbox 3.0.19.13 release "Stupido!"
Psychtoolbox 3.0.19.12 release "Scraps"
Psychtoolbox 3.0.19 update "Scraps" was released at 5th June 2024.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.12”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.12
Some of this Psychtoolbox release was sponsored by Mathworks under the year
2023/2024 contract..
Compatibility changes wrt. Psychtoolbox 3.0.19.11:
- None.
Highlights:
- None. Just some small fixups for improved Ubuntu 24.04-LTS and Matlab R2024a
compatibility.
All:
Linux:
-
Psychtoolbox was built and tested against Matlab R2024a.
-
PsychLinuxConfiguration: Quote paths, to improve MLTBX compatibility.
-
PsychLinuxConfiguration(): Add users also to 'gamemode' group.
This provides additional permissions to the gamemoded running on behalf
of the user, to execute additional performance optimizations as part
of Priority(n) with n > 0. Needed on at least Ubuntu 24.04-LTS and later. -
Screen('OpenMovie')
: On Linux, use pipewiresink as audio sink if
available. Should fix the following issue on Ubuntu 24.04-LTS and later,
and other distributions that use Pipewire as desktop sound server and
have an outdated buggy Pulseaudio 16 installation, instead of the more
recent Pulseaudio 17. The bug can't be fixed on Ubuntu 22.04-LTS without
manual user workarounds. See following issue for this bug, which is
likely not encountered often:On unfixed affected systems (mostly Ubuntu 22.04-LTS), if there is
a notable time delay betweenScreen('OpenMovie')
and start of
video+audio playback viaScreen('PlayMovie')
, then the movie
playback will freeze after displaying the 1st video frame for the
duration of that delay between OpenMovie and PlayMovie, then
continue. Problem didn't exist in earler Linux distributions like
Ubuntu 20.04-LTS and is fixed by this bug fix for later distros like
Ubuntu 24.04-LTS from April 2024.
Windows:
- Psychtoolbox was built and lightly tested against Matlab R2023b.
macOS:
-
Psychtoolbox was built against Matlab R2023b and tested against
Matlab R2024a and Octave 8.4 from HomeBrew. It also works on the
new Octave 9.1 from HomeBrew -
SetupPsychtoolbox: Quote paths, to improve MLTBX compatibility.
-
TextInOffscreenWindowTest.m: Fix it for Retina displays on macOS. Also cleanup.
-
BitsPlusPlus: Handle Apple macOS Retina displays properly for imaging pipeline validation runs.
-
ImagingStereoDemo: Handle Apple Retina displays properly during movie writing.
-
TwoStateQuery(): Add workaround for broken Matlab R2024a on Apple macOS.
Enjoy!
Psychtoolbox 3.0.19.11 release "Eyegazer"
Psychtoolbox 3.0.19 update "Eyegazer" was released at 18th May 2024.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.11”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.11
Some of this Psychtoolbox release was sponsored by Mathworks under the year
2023/2024 contract..
Compatibility changes wrt. Psychtoolbox 3.0.19.10:
- None expected. But possibility due to massive Eyelink toolbox changes.
Highlights:
- Big Eyelink toolbox update by SR-Research with the most massive
improvements in over a decade.
All:
-
Release of the new Eyelink toolbox. This is the biggest update of the
Eyelink toolbox for Eyelink gaze trackers from SR-Research since over
a decade! Most of the work was done by the team at SR-Research. Credits
to Brian Richardson, Marcus Johnson, and Kurt Debono. Additional 88
hours of my work time were sponsored by SR-Research, to provide code
review, feedback and advice on improving the integration while
maintaining backwards compatibility, and code improvements. Among
many other improvements, the new Eyelink toolbox can integrate better
with PsychPortAudio for playing feedback sounds during tracker calibration,
and it can use dynamic animated calibration targets by playing back
movies. Upload of backdrop images to the tracker host computer is possible.
Stereoscopic/Binocular display modes of Psychtoolbox are now supported
for use with the gazetracker. Many new functions have been added to improve
ease and efficiency of use. A new set of demos demonstrates efficient use
and best practices with the new toolbox. Legacy functions should be still
supported for backwards compatibility, but many legacy demos have been
removed. The toolbox has been carefully tested by SR-Research on all
supported operating systems, so we hope this major update will go without
major problems. Thanks to our partner SR-Research for this contribution
and the team at SR-Research for good collaboration! -
CedrusResponseBox(): Disable any flow control.
It was supposed to use hardware flow control (FlowControl=Hardware),
but that did not work until PTB v3.0.19.6 due to an IOPort parameter
handling bug. Since the bug is fixed, hardware flow control would be
used. This was supposed to make Cedrus to work more robust, but it
apparently had the opposite effect, as the following PTB forum message
suggests:https://psychtoolbox.discourse.group/t/waiting-forever-for-data-transmission-with-cedrus-rb/5319
Disable flow control explicitely, to revert to pre 3.0.19.6 behaviour,
where Cedrus boxes worked as well as they could.If this fixes the bug though, that means my original opinion about
the quality of Cedrus hardware - or the lack thereof - would be
true, and the fragile communication was not caused by our IOPort
driver bug, ie. by lack of hardware flow control. Let's see... -
ImagingStereoMoviePlayer.m: Also handle top-bottom stereo encoded movies.
Linux:
-
Psychtoolbox was built and lightly tested against Matlab R2023b.
-
Fix most basic compatibility with Ubuntu 24.04.0-LTS. Extensive compatibility
testing with Ubuntu 24.04-LTS is still outstanding. -
Fix Matlab R2020 - R2024a plotting on Intel graphics. After this Matlab bug
being reported to Mathworks and going unfixed for multiple years, I decided
to cave and add a workaround to PsychLinuxConfiguration(). It will add some
config option during post-install to Matlab's Java JOGL OpenGL interface, to
avoid use of OpenGL ARB contexts. This works around the Matlab bug and makes
Matlab's graphics and plotting functions work on Intel graphics chips. -
Refine PsychCV's Apriltags implementation. Make sure that if the same marker
is apparently detected multiple times in an image, that then the detection
with the lowest hamming error and highest score is returned, so good detections
can't override false positive noise. Allow limiting the number of markers used
from a tagFamily, so one can select tag families whose total marker count would
cause a very high memory consumption, leading to out-of-memory errors on machines
with even 8 GB of RAM, or very long startup times, by only using a subset of
markers. Allow to select more tuning parameters for marker detection. Suppress
useless debug output. -
Screen('OpenVideoCapture'): Allow to disable videorate converter during recording.
Windows:
-
Psychtoolbox was built and lightly tested against Matlab R2023b.
-
PsychPortAudio: Use auto samplerate conversion under WASAPI shared mode
with reqlatencylcass 0 or 1 (the default). This should allow to request
arbitrary audio sample rates, as the operating system should perform
proper sample rate conversion. Should automatically fix issues like the
following:https://psychtoolbox.discourse.group/t/ptb-thinks-usb-sound-card-doesnt-support-44100hz/5324
For now this is only implemented for Octave, not yet Matlab, until it can be
tested a bit more.
macOS:
- Psychtoolbox was built and lightly tested against Matlab R2023b and
Octave 8.4 from HomeBrew. It also works on the new Octave 9.1 from
HomeBrew
Enjoy!
Psychtoolbox 3.0.19.10 release "Bitty Bits"
Psychtoolbox 3.0.19 Beta update "Bitty Bits" was released at 26th March 2024.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.10”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.10
Compatibility changes wrt. Psychtoolbox 3.0.19.9:
- None.
Highlights:
- None, just bug fixes and minor improvements, and Octave 9.1 on macOS support.
All:
-
PropixxImageUndistortionThrowaway.m: Fix stupid bug. Don't close the onscreen
window and then try use it again afterwards! -
Fix wrong definition of glPathGlyphIndexRangeNV().
-
Sound input demos: Allow specification of number of input channels.
For BasicSoundInputDemo and DelayedSoundFeedbackDemo, allow to specify the
number of inputs, to also deal with sound cards which only provide one mono
input channel. Continue to default to 2 stereo channels. -
Various internal cleanups with no immediate user facing benefit.
Linux:
-
Psychtoolbox was built and lightly tested against Matlab R2023b.
-
Screen: Fix idiotic bug in
Screen('GetFlipInfo')
there since day 1!
If a query for a flip info struct was made, but no new struct was available,
the function errored out, instead of returning an empty [] return argument!This was not ever noticed due to the way our only test scripts for this
PerceptualVBLSyncTestFlipInfo2 had try-catch-end statement placed just so
that the error was swallowed and never showed up!Fix this properly by returning an empty [] return argument in this case,
as expected.
Windows:
- Psychtoolbox was built and lightly tested against Matlab R2023b.
macOS:
-
Psychtoolbox was built and lightly tested against Matlab R2023b and
Octave 8.4 from HomeBrew. It also works on the new Octave 9.1 from
HomeBrew -
Enable use with the brand-new Octave 9.1.0 from HomeBrew.
Psychtoolbox 3.0.19.9 release "Tag games"
Psychtoolbox 3.0.19 Beta update "Tag games" was released at 16th March 2024.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.9”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.9
Compatibility changes wrt. Psychtoolbox 3.0.19.8:
- None
Highlights:
- Experimental Apriltags fiducial marker tracking support on Linux.
All:
- New helper function
PsychCamIntrinsicsToGLProjectionMatrix()
.
Given camera intrinsic parameters from some camera calibration software,
and the desired zNear and zFar clipping planes of the view frustum,
compute and return a projection matrix for use as GL_PROJECTION_MATRIX
for OpenGL rendering with a virtual pinhole camera that approximates the
properties of the real camera.
Linux:
-
Psychtoolbox was built and lightly tested against Matlab R2023b.
-
(Re-)add
PsychCV()
mex file for Octave and Matlab, with support for
vision based tracking of AprilTag fiducial markers (aka tags) by use
of the apriltag library. This PsychCV mex file will only work on
Ubuntu 22.04-LTS and later, not on Ubuntu 20.04-LTS anymore.
Psychtoolbox 3.0.19.8 release "CamJam"
Psychtoolbox 3.0.19 Beta update "CamJam" was released at 14th March 2024.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.8”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.8
Some of this Psychtoolbox release was sponsored by Mathworks under the year
2023/2024 contract., and our partner SR-Research, makers of the Eyelink gaze trackers.
Compatibility changes wrt. Psychtoolbox 3.0.19.7:
dontOpenExisting
non-zero flag inEyelink('OpenFile')
now error aborts,
instead of trying to implement something unsupportable.
Highlights:
- None. Mostly a small refinement release.
All:
-
Eyelink('OpenFile')
: Error out if optional dontOpenExisting flag is set
to a non-zero value. Update help text. According to feedback from SR-Research
this is simply not supportable with all current and past Eyelink runtimes and
tracker host software. Game over for this feature, just warn users about it. -
Gamepad() / Joystick()
et al.: Improve docs, help, setup instructions. Especially
for proper choice of joystick driver on Ubuntu 20.04/22.04-LTS. -
Downloaders/Updaters etc.: Update again for final SVN death on GitHub. In combo
with website updates, to make clear that functionsDownloadPsychtoolbox
and
UpdatePsychtoolbox
andDownloadAdditionsForLinux
are currently dead. -
SetupPsychtoolbox()
: Dead code removal, cleanup, docs updates.
Linux:
-
Psychtoolbox was built and lightly tested against Matlab R2023b.
-
XOrgConfSelector
: Add error handling and error resolution tips.
There wasn't error handling in case of delete() or copyfile() failure.
Add something, and try to give some helpful feedback and advice, e.g.,
running PsychLinuxConfiguration(). -
Allow selection of a different clock to be used as the general GetSecs
clock for (almost) all timing and timestamping, e.g., by GetSecs, WaitSecs,
PsychPortAudio, Screen, etc. Since the year 2007, the so called wall clock,
or gettimeofday() clock, or Posix CLOCK_REALTIME clock was used for this,
and it continues to be the default. But now one can use the new PsychTweak
functionPsychTweak('GetSecsClock', clockid);
at the beginning of a
script (before any other calls to Psychtoolbox mex files!) to select a clock
with a different clockid. A clockid setting of 0 uses the default CLOCK_REALTIME
clock, as in the past. A clockid setting of 1 uses CLOCK_MONOTONIC instead.
CLOCK_MONOTONIC, as opposed to default CLOCK_REALTIME, does not maintain time
in seconds since 1st January 1970 0:00:00 UTC, but has an unspecified zero
point, but usually 0 denotes time of operating system boot. CLOCK_MONOTONIC
is always guaranteed to be monotonically increasing, not subject to step
adjustments by the system administrator, NTP, PTP, or other external clock
reference sources. This prevents synchronization to other computer on the
network/setup, but may avoid clock trouble caused by time jumping in certain
situations. CLOCK_MONOTONIC behaves like the GetSecs clocks for Psychtoolbox
on MS-Windows and macOS. For now the new monotonic mode is only lightly
tested, and only available on Psychtoolbox for Intel processors, not yet for
RaspberryPi - this will follow in a future release.This improvement was sponsored by a Mathworks sponsored support incident under
our 2023/2024 contract.
Windows:
- Psychtoolbox was built and lightly tested against Matlab R2023b.
macOS:
-
Psychtoolbox was built and lightly tested against Matlab R2023b and
Octave 8.4 from HomeBrew. -
Detect futile attempt of running under native Matlab for Apple Silicon / ARM,
ie. not under Rosetta2 emulation and bail with more enlightening messages.
Psychtoolbox 3.0.19.7 release "Christmas looks"
Psychtoolbox 3.0.19 Beta update "Christmas looks" was released at 16th December 2023.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.7”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.7
This Psychtoolbox release was sponsored to a large degree by Mathworks under the year
2023/2024 contract., and
to some degree by our partner SR-Research, makers of the Eyelink gaze trackers.
Compatibility changes wrt. Psychtoolbox 3.0.19.6:
None.
Highlights:
-
Further refinement to the performance improvements for hardware accelerated
movie playback via GStreamer and gpu hardware video decoders on Linux and
MS-Windows, with only very minor benefit to macOS. -
Eyelink mex file improvements.
-
Usability improvements for macOS.
All:
-
Screen: Allow dynamic, per-movie, enable and disable of hardware accelerated video
decoding when using GStreamer 1.18 or later, iow. on MS-Windows, macOS, RaspberryPi OS,
and Ubuntu 22.04-LTS and later. Only on older GStreamer versions, e.g., Ubuntu 20.04,
will a hardware decoding disable last for the remainder of a session, ie. until
Octave/Matlab is quit, once the disable flag for hardware decoding has been given
once in a session. Also some minor robustness improvements to movie playback if
special flags are given, which could cause some trouble sometimes. -
Eyelink: New and improved Eyelink mex files with some contributions by SR-Research,
specifically from Brian Richardson, Marcus Johnson, and Kurt Debono. Thanks!-
A new subfunction 'EDKVersion' provides version information about the Eyelink
software core library runtime in use. -
A new subfunction 'EyelinkSendFile' to send a file to the Eyelink tracker
computer. Using this function, an image or video can be uploaded from the
display PC to the host Tracker PC. -
Eyelink('OpenFile'): Another attempt to fix the 'dontOpenExisting' flag.
'dontOpenExisting' functionality was broken from day 1, but nobody bothered
to ever give us feedback about this, not even the person who requested that
functionality! As a new attempt at a fix by myself, lets try the following
untested fix:Assume that create_path() is a way to find out if a file already exists
on the tracker computer, given that file_exists() actually operates on
the stimulation computer, contrary to what anybody expected. The Eyelink
programmers manual is very unclear about these file utility functions.This may be wrong as well, no feedback from SR-Research yet. Let's see...
-
Eyelink('ImageTransfer'): Restore my version of it, but also add some bug
fixes by SR-Research, so that it hopefully now finally works as intended. -
Fix regression for potential buffer overflow in 'EyelinkGetQueuedData', and
generally make 'EyelinkGetQueuedData' and 'EyelinkGetFloatDataRaw' more robust
and memory-safe. -
Minor other improvements and cleanups to Eyelink mex.
-
-
Simplify OS type and 64-Bit detection functions, ie. IsWin(), IsLinux(), IsOSX(),
IsARM(), Is64Bit(), IsWindows(), IsWinVista(), IsWinMatlabR11Style(). -
IsARM(): Try to detect running on 64-Bit ARM or on native Apple Silicon Matlab/Octave.
-
DownloadPsychtoolbox and UpdatePsychtoolbox: Prepare for EOL at 8-Jan-2024.
GitHub will shut down and permanently remove its Subversion frontend that day,
so our current SVN based downloader and updater methods will fail completely.There may be, and already have been, temporary brownouts in the service, as a
heads up by GitHub about what's coming.Inform users, and about their inconvenient alternatives, so they are less
stumped by what is happening, assuming an ability to read. Due to the severe
lack of financial support by the vast majority of our users, we didn't have
and don't have the time right now to deal with this and find new solutions or
workarounds for this problem. Finally people get what they pay for. -
Merge in some new GitHub actions, contributed by Mathworks open-source team,
which allow auto-building of zip files of the Psychtoolbox folder and of a
corresponding MTLBX file for each tagged release. This is preliminary and needs
more work and refinement, but may help a bit to work around imminent failure
of DownloadPsychtoolbox and UpdatePsychtoolbox for MS-Windows and Apple macOS
users. Thanks to Bensingh Pancras from Mathworks for this work!
Linux:
- Psychtoolbox was built and lightly tested against Matlab R2023b.
Windows:
- Psychtoolbox was built and lightly tested against Matlab R2023b.
macOS:
-
Psychtoolbox was built and lightly tested against Matlab R2023b and Octave 8.4
from HomeBrew. -
IsARM(): Try to detect running on 64-Bit ARM or on native Apple Silicon Matlab/Octave.
-
PsychtoolboxPostInstallRoutine(): Detect and reject native Apple Silicon Matlab/Octave.
Point to Intel variants under Rosetta 2 emulation instead. Untested so far.
Psychtoolbox 3.0.19.6 release "Raspberry Cake"
Psychtoolbox 3.0.19 Beta update "Raspberry cake" was released at 12th December 2023.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.6”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.6
This Psychtoolbox release was sponsored to a large degree by Mathworks under the year 2023/2024 contract.,
and to some degree by Cambridge Research Systems.
Compatibility changes wrt. Psychtoolbox 3.0.19.5:
-
Psychtoolbox is now tested and supported on Matlab R2023b, instead of R2022b.
It is expected to continue to work on older releases than R2023b, but no longer
developed or tested against them. -
Slight behavioral changes in IOPort BreakBehaviour settings on MS-Windows, and
generally a few IOPort config options. Not expected to affect (m)any user scripts.
Highlights:
-
This release was tested for compatibility with Matlab R2023b on Linux and Windows,
specifically Ubuntu 22.04.3-LTS with AMD RavenRidge (AMD Ryzen 5 2400G processor
integrated graphics) and AMD Polaris graphics, and on Microsoft Windows 10 22H2
with AMD RavenRidge and NVidia GeForce GTX 1650 graphics, and to a lesser degree
on Ubuntu 20.04.6-LTS and Windows 11 22H2 with Intel Kabylake (GT2) "UHD 620"
integrated graphics. Testing with some onboard sound chips was also performed.
The testing led to various smaller improvements, and various workarounds on
MS-Windows for AMD OpenGL and Vulkan graphics driver bugs, and for some NVidia
driver bugs, as well as some bugs in Matlab wrt. backwards compatibility and
OS compatibility. Most improvements in this release are due to that.This was done as part of out Mathworks 2023/2024 contract for ensuring compatibility
with recent Matlab releases, spending over 65 work hours. Due to not even remotely
sufficient funding for this work, no significant testing beyond some very quick touch
and go spot testing was performed for macOS. -
Substantial movie playback performance improvements in pixelFormat 11 for HDR
and WCG movies when hardware video decoding is used on Linux and MS-Windows. A
small fraction of this work was sponsored as part of the Mathworks contract. -
10 bit deep color framebuffer and HDMI output for the RaspberryPi 4/400 by
improvements to Psychtoolbox and to the Mesa 23.3.1 OpenGL graphics drivers
for RaspberryPi's VideoCore 6+ gpu. Mostly paid for by Cambridge Research Systems.
All:
-
Screen: Optimize storage format for LUMINANCE16 textures for texture normalization.
If a 16 bpc luminance texture is turned into an offscreen window, or drawn into,
the needed normalization / conversion to RGBA format now converts into RGBA16
format instead of RGBA32 float format. This retains full precision of the original
image content, but at half the memory consumption. -
Screen: In DrawTexture(s), always filter planar textures via nearest neighbour
sampling instead of any of the other filtering/sampling modes, as any sampling
other than nearest neighbour will cause massive artifacts. -
Screen: Improve performance of HDR movie playback by more efficient use of hardware
video decoding. Enable the GStreamer movie playback engine in HDR mode (aka pixelFormat 11)
to accept and handle typical semi-planar YUV formats used for HDR movies when
gpu hardware accelerated video decoding is in use. This allows GStreamer to avoid
cpu expensive frame format conversions from semi-planar frames provided by the
gpu hardware decoders to planar formats previously accepted by PTB's texture
creation code, leading to way higher performance when such hardware decoders
are used. Software decoding still works via the previous path, whenever that is
wanted or needed. Software decoding can also be enforced by disabling of hardware
decoding by passing in specialFlags1 flag +4 inScreen('OpenMovie', ...)
. One
limitation of the disable is that hardware decoding will stay off for the remainder
of the whole session, ie. until Octave/Matlab is quit, once the disable flag
for hardware decoding has been given once in a session. This could be fixed by
requiring GStreamer 1.20+ as minimum requirement, ie. Ubuntu 22.04 and later.Note that I've repurposed/redefined specialFlags1 flag +4 as hw accel disable,
from previously "draw 2D flow vectors on content for debugging/visualisation".
This is ok, as the feature was probably never used by anybody, and also because
this feature is deprecated and unsupported in all supported GStreamer versions
since quite a while.The following new formats are supported for efficient handling:
-
Y42B = YUV planar 4:2:2 with 8 bpc.
-
NV16 = YUV semi-planar 4:2:2 with 8 bpc, aka P208.
-
P0xx formats of YUV semi-planar 4:2:0 sampling with 8, 10, 12 and 16 bpc,
ie. NV12, P010_10LE, P012, P016. These are the relevant ones for typical
HDR-10 hardware decoding from H265/HEVC, AV1, and from VP9.
So far this has been tested on MS-Windows 10 with NVidia GeForce GTX1650 and
AMD Raven Ridge / Vega as part of a Ryzen 5 2400G processor. On NVidia it shows
a 2x speedup in decoding speed, to allow playback of 4k HDR at 60 fps with stable
framerate and none to minimal frame dropping. This typically uses NVCODEC on
NVidia hardware or Direct3D11/DXVA decoding on NVidia, AMD and Intel gpus.Tests on Ubuntu 20.04.6-LTS + Intel Kabylake + GStreamer 1.16, and on two
Ubuntu 22.04.3-LTS machines with GStreamer 1.20.3, once with AMD Polaris11
and once with AMD Raven Ridge, also showed 2x performance improvements.
This uses VAAPI for hardware accelerated video decoding on AMD and Intel,
and maybe on NVidia, but NVidia is untested so far on Linux.Note that while AMD and NVidia worked well in my testing, at pixelFormat 11,
Intel Kabylake produced some visual decoding artifacts under Ubuntu 20.04, and
massive visual artifacts in decoded video on Windows 11. May or may not be
general Intel bugs, or may just be a problem on my specific old Intel iGPU.Additional successful testing was performed by a user under Windows-10 with
a NVidia GeForce RTX 3080 with H265 and AV1 4k HDR 60 fps content.As a general guideline, as of November 2023, these video codec formats
are generally hardware accelerated on Linux and Windows with typical
recent hardware from AMD, NVidia and Intel:-
MPEG2, VC1, H264, VP8: YUV 4:2:0, 8 bpc.
-
H265, VP9: YUV 4:2:0, 10 bpc HDR.
-
Sometimes also MPEG4, and AV1, the latter only on latest gpu's from
NVidia, AMD and Intel, specifically NVidia Ampere+ RTX3000+, or AMD RDNA2
Navi 2nd gen, or Intel Xe+/Arc+ or macOS 14 on Apple M3+.
For best cross-platform, cross-vendor compatibility and with older hardware,
the safest choices for high performance playback are probably H264 and H265
at the moment.None of this applies to Apple macOS, as macOS too primitive OpenGL implementation
currently does not allow use of pixelFormat 11 playback. -
-
PlayMoviesDemo.m: Optimize further for fast playing movies.
Suppress costly text drawing for any fps >= 30. Skip wait for flip complete for
non-HDR playback. Ths way the demo also serves as a real-world performance test. -
help GetChar
: Update wrt. OS+GUI+Matlab/Octave support, internationalization. -
PerceptualVBLSyncTest[FlipInfo2]
: Add optimizations, especially for RaspberryPi.
Avoid redundant stimulus draw in non-stereo mono-mode. Do clear the backbuffer
after each flip, as that seems to give a substantial performance boost for the
VideoCore gpu's - See speculation in code comments - probably related to it being
a tiled renderer, or a split gpu + display engine design at least for VideoCore 6+
of RaspberryPi 4 and later. I haven't checked the driver source for the more likely
reason yet.Another thing that can really help sync tests on the Pi is Priority(1), because
then gamemode daemon chooses a more aggressive cpu governor. This only matters at
high display refresh rates though, e.g., on a RPi 400 with a 1920x1080 120 Hz
display. At somewhat lower refresh rates, e.g., 60 Hz, it isn't needed. -
IOPort
: Fix 'OpenSerialPort' bugs where default settings override user settings.As GitHub user @qx1147 found out during a code review, there is a flaw in
the handling of serial port options, where default serial port options may
override user provided configuration options, so the wrong settings are
silently applied! This only happens if the user script provides different
settings inIOPort('OpenSerialPort', ..., settings)
, ie. on initial port
open. Calls toIOPort('ConfigureSerialPort', ..., settings)
are not
affected.Luckily (dumb luck!), only a few options were mishandled, and most of these
are rarely changed by user scripts, specifically:ProcessingMode=Cooked would get ignored, and raw mode used instead. Rarely
used on Linux/macOS and not supported on Windows anyways. Low impact.BreakBehaviour=Ignore would be used instead of Flush or Zero. Not a
problem on Windows, as that is the only supported option. The fact that
this went unnoticed on Linux/macOS suggests not much use of Flush or Zero
by users scripts. No use by PTB itself. Low expected impact. Note that the
implementation of 'Flush' on the Unixes is of questionable use, as Flush
would not only flush read/write buffers, but also send a SIGINT, which may
end in unexpected ways on Unix, as we don't handle SIGINT specifically.StopBits=2 would get ignored and the default of 1 stop bits would be used.
Unclear how many devices want 2 stop bits, but I haven't ever seen one, so
probably low expected imp...
Psychtoolbox 3.0.19.5 release "Eye to eye"
The Psychtoolbox v3.0.19.5 update "Eye to eye" was released on 17th November 2023.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.5”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.5
This Psychtoolbox release was fully sponsored by Mathworks under the year
2023/2024 contract.
This is the last release built and tested with Matlab R2022b. Future development
and user support will immediately switch to Matlab R2023b after this announcement,
as we no longer have access to earlier Matlab releases, but Psychtoolbox is expected
to continue to work just fine on older Matlab versions.
Highlights:
-
Eye gaze tracking support for OpenXR supported devices via
PsychVRHMD()
, ie.
Virtual Reality (VR) / Augmented Reality (AR) / Mixed Reality (MR) Headsets
with built in eye trackers and suitable eye tracking runtimes!This release should support monocular "cyclops eye" eye gaze tracking on HMDs
with monocular eye trackers and binocular eye trackers (typically reporting a
fused gaze vector for noise reduction, based on sensor fusion between both
eyes tracking data) on all hardware and OpenXR runtimes which support the
XR_EXT_eye_gaze_interaction OpenXR extension. Data reporting is very limited
due to the limited functionality provided by that extension: Only a binary
confidence value (eye tracked / not tracked) and a 3D eye gaze vector aka
gaze ray aka eye position and looking direction, usable for determining the
looking direction in a 3D VR scene and hit testing with 3D scene geometry, as
well as remapped 2D pixel coordinates of where the user is looking inside the
Psychtoolbox onscreen window, both for monoscopic mode and stereoscopic mode.
Demos which demonstrate 3D gaze areVRInputStuffTest.m
if the optional
withGazeTracking
flag is set to 2, or just 2D position for flag setting 1.
2D gaze reporting is demonstrated - if the proper flags are set - by the
following demos and tests:VRHMDemo.m
- simple mono/stereo view reporting,
GazeContingentDemo.m - monoscopic display, "foveated area" is moved via gaze,
andVREyetrackingTest.m
for extensive demo and testing.The API / how to use and description of features and limitations is in the
help PsychVRHMD
where one would expect VR/AR/MR/XR related functionality.Setup instructions can be found under
help OpenXR
.For VR HMDs with builtin eyetrackers from HTC, e.g., HTC Vive Pro Eye, on
MS-Windows only, a second more feature rich eyetracking mechanism via use
of HTC's proprietary Windows-only SRanipal eyetracking runtime is used. It
additionally to the above "cyclops eye" reporting allows for binocular
eyetracking, more precise gaze sample timestamps, and estimates reported for
"eye openess" aka how much are the eyelids open, and pupil diameter.Due to lack of other equipment, time and funding, this functionality was only
tested under Microsoft Windows 10 with a rented HTC Vive Pro Eye HMD under
SteamVR 1.26, and to a lesser extent, the new SteamVR 2.0.10 runtime from
Valve. The monocular "cyclops" eye gaze tracking should work on any other HMD
with OpenXR compliant eye tracking though, also on Linux. And binocular tracking
should work on other HTC HMDs under Windows as well. Theory and practice, we
will see...Performance and precision is reasonably good, although functionality wise there
is a lot of room for improvement. Further funding would be needed to do that
work. This OpenXR eye gaze tracking was sponsored by Mathworks as the main
new sponsored improvement under the 2023/2024 contract.
As so often though, the funding was insufficient to fully cover our costs
up to this point, so future development of this eyetracking support will be
mostly dependent on future funding or contract work from interested labs
or users.Given that the HTC Vive Pro Eye used for developing and testing this support
is only rented, and due to the lack of funding, we will likely have to give
the HMD back before christmas, so no further debugging / refinement or
related user support can be provided after that point in time, unless some
labs or users contract and fund us for further development and support.Therefore I urge you to test this functionality early and give timely feedback,
before it is too late for a cheap solution. That still means of course that
while constructive feedback is appreciated, no free help will be provided
for setup and first steps in general. That's what our paid support is for.
All:
-
OpenXR VR/AR/MR/XR eyetracking support. See above.
-
PlayMoviesDemo.m: Some performance optimizations for high fps HDR movie playback.
-
CreateResolutionPyramid()
: Fix and deuglify MipMapDownsamplingShader. -
Minor bug fixes, documentation updates and improvements.
Linux:
-
Psychtoolbox was built and lightly tested against Matlab R2022b and Octave 6.4.
-
OpenXR VR/AR/MR/XR eyetracking support. See above.
Windows:
-
Psychtoolbox was built and lightly tested against Matlab R2022b and Octave 7.3.
-
Additionally to OpenXR eyetracking, also SRAnipal binocular eyetracking on
suitable HTC HMDs, as tested with the HTC Vive Pro Eye.
macOS:
- Psychtoolbox was built and lightly tested against Matlab R2022b and
Octave 8.3 from HomeBrew. Octave 8.4 was also lightly tested and seems fine.
Enjoy!
Psychtoolbox 3.0.19.4 release "Virtuality!" SP4
Psychtoolbox 3.0.19 Beta update "Virtuality" SP4 was released at 27th October 2023.
As usual, the complete development history can be found in our GitHub repository.
The release tag is “3.0.19.4”, with the full tree and commit logs under the URL:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.4
This Psychtoolbox release was partially sponsored by Mathworks under the year
2023/2024 contract.
Compatibility changes wrt. Psychtoolbox 3.0.19.3:
-
On MS-Windows, GStreamer 1.22 is now required, the latest lightly tested
version is GStreamer 1.22.5. With the older GStreamer 1.20, text rendering
with the high quality drawtext plugin will no longer work, and the fallback
GDI text renderer would be used, which is officially unsupported in case of
trouble and has lower performance/quality/features/reliability. -
On macOS if using Octave, Octave 8.3 is now recommended and tested, but older
Octave versions back to v6.3 are expected (but not tested) to continue to work.
Highlights:
None, just a large grab bag of various minor and major fixes and improvements.
All:
-
Some Unix file permission cleanup contributed by Yaroslav from NeuroDebian.
-
CalibrateMonSpd(): Fix some fallout from previous fixes. Set cal.describe.dacsize
also if g_usebitspp is already set. Reference:
kleinerm#252 -
DegreesToRetinalEccentricityMM(): Fix typo in code that prevented replacement
of small angles by the linear approximation. Contributed by Stella Prins. -
MakeSineImage(): Allow passing of center (0 phase) position of the sinusoid.
Contributed by David Brainard. -
ComputePhotopigmentBleaching(): Add constants from Wyszecki and Stiles.
Contributed by David Brainard. -
New touchscreen demo: MultiTouchPinchDemo.m, to show detection and handling of
two finger pinch gestures on touchscreens. -
Output info message with potential troubleshooting tips if drawtext init takes
unusually long, hinting at potential fontconfig cache rebuild (problems) on
MS-Windows. May or may not help anybody, but probably doesn't hurt. Suggested
by GitHub user @mirh. -
DrawFormattedText(): Add new keyword 'left' to use for the 'sx' parameter. It
will left-align drawn text to the left border of an optionally provided
'winRect', similar to the 'right' keyword for right-alignment. Improvement
contributed by GitHub user @SVNKoch. -
PsychPortAudio: Add potential workaround to deal with temperamental / weird
audio sound cards. Add a new optional parameter to the tweaking command
PsychPortAudio('EngineTunables', ...., workarounds);
, which allows to
specify a non-default (ie. non-zero) workarounds bitmask to selectively
disable or enable workarounds. The currently defined workaround bits are the
following, which modify how the Portaudio audio format test function
Pa_IsFormatSupported is handled:+1 = Do not error abort on test failure, ie. print warnings but don't abort.
+2 = Skip the whole test and always assume success.Both could help if the test reports false positives (+1 to continue), or
if some hardware queries/operations themselves during the test trigger
some trouble (+2 to skip the whole test).Also various other minor improvements to PsychPortAudio and some of the audio
demos and tests. -
Snd(): Switch fallback method from use of sound() to use of audioplayer().
Both modern Octave and Matlab implement sound() as a wrapper around their
audioplayer() objects, so using audioplayer() directly gives us more control
for a better Snd() fallback implementation. Also use the fallback method as
new default by default. Iow. unless specified otherwise, Snd() will play
via audioplayer(). This provides good interop with other audio clients and
with Screen()'s GStreamer based movie playback engine. -
Beeper(): Formatting/Indentation fixes, refine soundvector calculation.
-
BitsPlusIdentityClutTest: Disable encoder test if Vulkan display is used.
Current design lead to the tests running before the Vulkan backend is fully
in charge, so we display the PTB welcome screen or pixeltrash during the test,
instead of the test stims, which leads to false-positive test failure. Just
don't offer the test option under Vulkan. DatapixxGPUDitherpatternTest is an
alternative working way to test with Vulkan at the moment. -
PsychOpenHMDVR: Use correct ipd/2 instead of ipd for warp-mesh setup in our
OpenHMD driver. -
Minor bug fixes, documentation updates and improvements.
Linux:
-
Psychtoolbox was built and lightly tested against Matlab R2022b.
-
RPiGPIOMex: Various bug fixes and improvements. Also merged two alternative
implementations of the file co-written by Steve Van Hooser and myself. These
reimplement functionality by using the pigpio library instead of the old and
deprecated wiringPi library. This should be more future-proof and maintainable.
For now, the original file based on wiringPi is still used though, until we
decide which of the two new variants is the better choice. -
Fix exception handling on Octave for RaspberryPi on RaspberryPi OS, so errors
only abort the users script and don't terminate the whole Octave application.
Windows:
-
Psychtoolbox was built and lightly tested against Matlab R2022b.
-
GStreamer 1.22 is now required, GStreamer 1.20 will have limitations.
-
Fix drawtext plugin again, so it no longer breaks under Matlab with
GStreamer 1.22 on some systems. This will now require the installation
of GStreamer 1.22, the older GStreamer 1.20 will no longer work with
the drawtext plugin. -
Windows: Remove support for building 32-Bit mex files.
Matlab is 64-Bit only since a long time on Windows, Octave is about to
remove 32-Bit support as well. Windows-10 - the last MS 32-Bit operating
system is on the way to final retirement. Ergo, no need for 32-Bit builds
in the future anymore. -
Make Screen('Openwindow') timing startup tests and calibrations more
robust. This by disabling processor idling during the tests, ie. ACPI
C-State processor power management transitions out of C0 (active). Such
transitions can induce latency / variability in code execution timing bad
enough to affect timing tests on some setups. If and how much this helps
in practice remains to be seen. Based on investigations / measurements
by GitHub user @mirh, see GitHub isse #793 for reference. If this new
optimization causes trouble or interop problems with cpu performance
tweaking tools, e.g., the Windows tools "throttlestop", it can be disabled
by use of the command before the first time you try to open an onscreen
window in your experiment script:PsychTweak('DontDisableProcessorIdling', 1);
macOS:
-
Psychtoolbox was built and lightly tested against Matlab R2022b and
Octave 8.3 from HomeBrew. -
Screen(): Add iMac20,1 and iMac20,2 aka year 2020 iMacs to timing fixup lut,
so the visual timing fixes also apply to these final Intel iMac models with
AMD Navi graphics chips. As the PsychtoolboxKernelDriver does not support AMD
Navi graphics, our visual timestamping and our diagnostic for visual timing
problems on these machines will be more limited than on older machines, but
the untested expectation is that this should fix timing on 2020 iMac internal
displays. -
Screen(): Remove conserveVRAM flag kPsychDontCacheTextures. It was useless and
even buggy since years, so let it die. -
Screen(): Add new conserveVRAM preference flag 2 == kPsychDontSwitchToOptimalVidMode.
May or may not help fullscreen display on connected external video splitters like the
Matrox DualHead2Go. This is based on a hunch, not on proper root causing. Cfe.
https://psychtoolbox.discourse.group/t/open-window-cant-set-to-a-specified-rect-size-on-macos-with-matrox-dualhead2go/5061
Enjoy!