SimpleMovieDemo: Cleanup help text a bit. Kill some cruft.
add support for devicenumber parameter in el, this is sent to KbCheck
when calling EyelinkGetKey.m, see help for KbCheck for details on what
this does
Merge pull request #15 from iandol/eyelink1

add support for devicenumber parameter in el
Screen/GStreamer: Allow override of selection of threaded video decoding method.

For multi-threaded video decoding on capable codecs, we default to use
both slice-threading and frame-threading. An environment variable
allows to override this choice.

The variable can be set via new PsychTweak subcommand:
PsychTweak('GStreamerPlaybackThreadingMethod', methodId);

-> Screen for 64-Bit Matlab on OSX rebuilt and tested against patched
gst-ffmpeg decoder branch. Works as expected.
Screen: Improve setting of slackfactor for missed deadline detector.

Take OpenML timestamping as another high-quality implementation into
account, also the crappy quality of OSX displaylink timestamping.
Screen/OSX: Try a different workaround for shoddy OSX CoreVideo implementation.

Remove workaround for long delayed displaylink callbacks from
PsychOSGetVBLTimeAndCount() - the trick only works if the function is
called in sync with vblank, which is not the case most of the time.

Instead increase timeout for vblcount query retries in higher level
code from 2 msecs max to 4 msecs max, with each retry taking 0.5 msecs
instead of 0.25 msecs. This should increase the chance of the callback
catching up in time.

Screen for 64-Bit Matlab on OSX rebuilt and tested.

In the end, anything but timestamping with the PsychtoolboxKernelDriver
on OSX is pretty much flawed or at least somewhat fragile or noisy.
This will be the only way forward afaics.
Screen/OSX: Fix frame-sequential fallback path on OSX.

Intel GPU's on OSX don't support stereomode 1 for native stereo. This
was supposed to trigger fallback to our own method, but didn't. Instead
context creation failed with an invalid pixelformat, as the returned
pixelfomrat object on Intel gpu was a NULL pointer, despite the OS
reporting successfull pixelformat selection. Thanks iPhone company, you
rule!

Now on NULL pfmt with stereo request, we remove the stereo attribute
and retry choosing a pixelformat, so we get a non-stereo context and
our higher-level fallback triggers our own stereo implementation.

Screen for 64-Bit Matlab on OSX rebuilt & tested with Intel HD graphics
"Ironlake" under OSX 10.7.5
PsychHID/OSX: Try harder to open devices for low-level USB access.

Use DeviceOpenSeize() instead of DeviceOpen(), trying to ask other
drivers to release a device we want to open but they have already
claimed.

Also retry up to 5 times, with 1 sec pause between retries.
Doesn't help at all with ColorCal-II on OSX 10.7.5, but maybe it helps
somebody else sometime...

PsychHID for 64-Bit Matlab on OSX rebuilt.
ColorCal2(): Make compatible with Octave-3.

Successfully tested under Linux. Works.

However, ColorCal2 doesn't work at all on OSX 10.7.5 on MBP,
because it can't open the device. Needs investigation...
Screen/FontInfo OSX: Make font enumeration even more robust.

Add additional error handling to reduce probability of crashes due to
corrupted osx font files/database. Give advice on fixing problems
upfront, so user gets something out of it even in case of a crash.
Improve advice.

Screen and FontInfo for 64-Bit Matlab/Octave on OSX rebuilt & tested.
IOPort/Windows: Refine serial port error reporting.

If 'OpenSerialPort' fails on Windows, be a bit more specific about the
cause of open failure.
Screen, IOPort for 64-Bit Matlab on Windows rebuilt for testing.
PsychImaging: Add support for xyY -> XYZ and XYZ->RGB color space conversion.

Add support for imaging pipeline implementation of the
SensorToPrimary() and xyYToXYZ() M-Functions.

This allows to draw into the framebuffer in xyY chromacity+luminance
format and auto-convert to RGB framebuffer values at Screen('Flip')
time via imaging pipeline. It also generally allows to convert
XYZ->RGB, which is the basis for support for other possible input color
spaces.

RenderDemo.m now demonstrates all methods to display xyY format, given
a 'cal'ibration struct and gamma table from display calibration.

This is based on the description given by David Brainard in
Psychtoolbox forum message #15092.

The code seems to work correctly and with high precision, but is only
very lightly and manually tested. A unit test is needed for safety.
This is a backup commit to document the basic working state.
RenderDemo: Refine new methods...

Skip sync tests for faster openwindow.
Add out-of-range checks to detect/mark non-displayable colors.
Set proper background clear color in XYZ or xyY input color space for a
desired RGB background output color of [0.1,0.1,0.1].
Add more documentation.
Load proper gamma tables at proper places.
PsychGPGPU: Initial commit of new folder/routines for GPGPU computing.

The Psychtoolbox/PsychGPGPU/ subfolder shall contain code for general
purpose computation on GPU's, as implemented via NVidia's CUDA, the
cross-platform / cross-vendor OpenCL, or other related toolkits and
api's.

As a starter with this commit, provide a toolkit agnostic CUDA<->OpenGL
interop interface, a mex file "memcpyCudaOpenGL" to copy image data
(textures, renderbuffers, framebuffers) between NVidia CUDA memory
buffers and OpenGL resources. This allows low-overhead data exchange
between OpenGL based toolkits and CUDA based toolkits.

Next a M-Function GPUTypeFromToGL.m: This uses the mex file to
implement interop support between Psychtoolbox and various CUDA /
OpenCL / etc. based toolkits. The idea is that at some point, the
compute backend/toolkit can be switched, e.g., between different CUDA
and OpenCL based  toolkits like GPUmat or Jacket or others and this
function abstracts whatever backend is used.

As a start it only supports interop with one hard-coded backend, the
FOSS GPUmat toolbox which uses CUDA for GPU computing in Matlab.

Also some very basic testGLInterop.m test script.

-> This works so for on 64-Bit Matlab for OSX with CUDA SDK 5.0 and
current GPUmat v0.280, but hasn't been optimized for performance yet,
and the high-level interface etc. needs work. This is just a backup
commit of the initial working state.
GPUTypeFromToGL: Change call syntax, make more flexible.

Define type of operation and type of OpenGL object to operate on.
Implement recycling for textures and gpu objects, but also now allow
creation of textures if none are provided for recycling.
GPUTypeFromToGL: Always expect textures and renderbuffers in normalized upright format.

Usercode must make sure this is the case by using proper transformation
flags in 'MakeTexture', 'OpenVideoCapure' and 'OpenMovie' as explained
in help text.

-> Want the GPU backend to receive consistent upright, non-transposed,
row-major order pixel data to avoid tears & pain.
GPUTypeFromToGL: Support low-level OpenGL objects via descriptor structs.

For use within PTB imaging pipeline, where no Screen() calls are
allowed, or from 3rd party low-level OpenGL code or Horde3D rendering
engine interface or MOGL etc.
GPUTypeFromToGL: Implemet glObjType 2: Psychtoolbox virtual framebuffer.

The drawBufferFBO aka virtual framebuffer of the imaging pipeline -
capture or write to.
GPUTypeFromToGL: Support glObjType 3 - Currently bound FBO.

Reading/Writing the currently bound FBO resp. its 1st color attachment,
allows to directly use this functionality from within processing chains
/ slots of the imaging pipeline, either as part of preflip/postflip
operations, or as part of Screen('TransformTexture').