Screen.m: Make compatible with Octave, so "help Screen.m" works.
PsychtoolboxVersion(): Add in (Neuro)Debian support.

So NeuroDebian doesn't have to carry its own support patches
for this function. Also fix lacking 'date', 'websvn' fields,
and generally clean it up a bit.
ShowCursor: simplified and added check
- when get to Screen call, type is always numeric or empty as parsed above, so simplified screen call code
- added extra check in persing though to make sure type is numeric
- case error in oldtype returned at bottom of function, removed redundant one at the top
Screen/Linux: Add safeguard against negative msc values.

On two occassions glXWaitForSbcOML() returned a negative msc
value, which is legal, as msc is a signed 64 Bit integer, but
our remaining code can't deal with this, so simply strip the
sign bit from returned msc's, so they are always positive and
incrementing from the perspective of our code, so we are
protected against such a "underflow by overflow" scenario.

It was not clear in those two isolated cases why suddenly
negative (but incrementing) values were returned, as values
large enough to overflow are very unlikely in practice. A
restart of the X-Server via logout/login resolved the problem.
Maybe somewhere a zero initialization is missing in XOrg 1.15?
That would technically be not a bug, as the "start point" is not
defined and could be in the high value range, but it would still
be confusing to clients.
Screen: Support new imagingMode flag kPsychNeedOtherStreamInput.

When the flag is provided and a stereomode is active, this will
bind the complementary input image to texture unit 1 during
processing of a stereo processing chain. For left-view processing,
the input image of the right view channel is exposed, during right-
view processing, the input image of the left view channel is exposed.

This allows for things like stereo crosstalk reduction shaders
which need access to the "other eyes" input image to use it for
their suppression strategy.
PsychImaging: Reshuffle stereo setup code to treat VPixx devices better.

DataPixx/ViewPixx/ProPixx special feature setup code should also
execute for stereo modes selected via PsychImaging tasks, not only
for user-provided numeric stereomode specs.

Reorder taks processing to make it so.
Screen/Linux: Add final workaround setup for nouveau-kms pageflip bugs.

Rework this again. The timestamping workaround for nouveau-kms pageflip
completion event bugs in Linux 3.13-3.15 can be enabled via the
conserveVRAM setting.It will also get auto-enabled if a broken kernel
is detected, ie., a kernel with a version prior to the versions we know
to contain the fixes. This is easily done for 3.14 and 3.15. Linux 3.13
needs special treatment, depending if it is a longterm stable kernel, or
a Ubuntu distribution kernel based on a longterm 3.13 stable kernel.

Now we have Ubuntu specific detection logic in place to detect if we
are on a vanilla 3.13 kernel or Ubuntu one. And specific detection logic
to decide if the workaround is needed or not.

The current situation mid August 2014 is that the bug is fixed in all
upstream/mainline/vanilla stable kernels (3.13.11.5+, 3.14.12+, 3.15.5+),
and in all Linux 3.16+ kernels anyway since initial release.

The Ubuntu 14.04-LTS distribution kernel still isn't fixed, one month
after Ubuntu's kernel team fixed the 3.13.11.5+ stable longterm kernel
on which the 14.04-LTS kernels are based. This takes longer than i
expected, so we add this Ubuntu special case, which can automatically
decide about the status of the 14.04-LTS kernel and act appropriately.

Only source code updated, to allow cherry-picking into ptb 3.0.11.
Screen/Linux: Add PCI-Ids for AMD MULLINS DCE-8 type asic.
PsychtoolboxKernelDriver for OSX: Add PCI-Ids for AMD MULLINS DCE-8 type asic.
Add prototype implementation of stereo crosstalk reduction.

This adds a new, but so far hidden/undocumented PsychImaging
task 'StereoCrosstalkReduction', and associated demo code inside
ImagingStereoDemo.m.

Requesting ...

 PsychImaging('AddTask', 'LeftView', 'StereoCrosstalkReduction', reduceCrossTalk);
 PsychImaging('AddTask', 'RightView', 'StereoCrosstalkReduction', reduceCrossTalk);

...would load the new StereoCrosstalkReductionShader.frag.txt GLSL shader, set it
up with parameter 'reduceCrossTalk' (whatever that is) and attach it to a properly
configured imaging pipeline. It's purpose in life would be to somehow reduce
crosstalk in stereo images.

Currently the shader(s) get attached at the top of the per-view image processing
chains, one shader for left-eye, and one for right-eye. This way the input images
to the shaders are the (panel scaled/fitted and multisample anti-aliased) stimulus
images as drawn by usercode. We use one individual shader per eye, so each shader,
although containing the same code, can be parameterized differently for the two
eyes.

The shader must be a single-pass shader, as the content of the 2nd stereo channel
(the one whose ghost images shall be suppressed) can't be carried through multiple
pipeline slots or passes.

Also shader placement isn't yet optimal in case other operations like image flipping,
geometric undistortion etc. would be also part of the image processing chains. This
may need more work, once the basics are proven to be working, but as a starter it
should be good enough.

The shader itself is currently just a "here starts your task" implementation,
which doesn't do something meaningful, apart from demonstrating to Diederick how
to access the two input images and create an output image. Filling the shader with
some meaning is Diedericks task.

This commit also contains a properly compiled Screen mex file for 64-Bit Octave on
Linux to make this work.

Recompile for Screen mex files for other runtimes and os'es is pending for a
separate commit.
Screen for 64-Bit Matlab/Octave on OSX and 64-Bit Matlab on Windows rebuilt.

-> Incorporates the changes needed for stereo crosstalk reduction prototyping.
Merge pull request #204 from kleinerm/master

Pull current state into public master.

* Linux final nouveau-kms and msc fixes.
* AMD MULLINS support for Linux and PTBKD.
* Prototype implementation for stereo crosstalk reduction - just the support infrastructure.
* PsychtoolboxVersion supports NeuroDebian.
* Smallish cleanups.
Screen for 32-Bit Octave on Linux rebuilt and tested.

Checked new kms-pageflip workaround code against Linux 3.15.10.
Screen/Linux: Add test code for NVidia hw vblank counters.

-> Screen for 32-Bit Octave on Linux rebuilt.
-> hw-vblank counters seem to work as expected on NV-d0 display engines.
Screen for 64-Bit Octave on Linux rebuilt.

-> Hw vblank counters work on NV-50 display engine as expected.

-> Good to go for all NV50+ cards afaics :)
GStreamer: Prepare GStreamer-1.4 switch.

Add old GStreamer-0.10 support code in new files
PsychXXXSupportGStreamer010.c, use the PsychXXXSupportGStreamer.c files
for the new GStreamer-1.4+ support code instead.

#define PSYCH_USE_LEGACY_GSTREAMER will enable compilation of the old
0.10 support files, lack of the #define will instead the new 1.4+
support files.

We will unconditionally use the GStreamer-1.4+ support in the future on
OSX and Windows, and for all Linux distributions (late 2014). It’s not
yet decided for older Linux distros if we will provide back ports of
1.4, or if we will continue to build 0.10.x versions for those old
distros.

-> New backup files for 0.10.
-> Conditional compile defines.
-> Xcode project gets the legacy files added for code browsing.
GStreamer-0.10: Replace deprecated functions.

Compile with GST_DISABLE_DEPRECATED showed use of two deprecated
functions. Replaced by good ones and verified stuff still works.

Make makefile be able to build old and new GStreamer backends.
GStreamer-1.4: Make playback engine functional.

Playback engine works, all tests i could do quickly seem to work.

- Playback forward/reverse/different speeds, start/stop.
- Seeking in both directions.
- Pixelformats 3,4,5,6,7,8 [1/2 don’t work with my movies].
- Multi-Threaded video decoding on supported codecs.
- Various different movies, also network streaming.
- Gapless playback variant 1 and 2.
- LoadMovieIntoTextures.
- Looped playback.
- Some bugs are automagically gone.

-> Screen for 64-Bit Octave on OSX rebuilt and tested.
-> Vidcapengine compile-time disabled, as it is tbd.
-> Step 1, we can have so much fun…
GStreamer-1.4: Make video capture and video recording mostly work.

As tested on OSX with internal iSight and external Logitech USB Webcam,
video capture and recording mostly works now.

-> Missing piece: video capture device enumeration via GstDeviceMonitor.
-> A-V Sync is horrible on OSX so far.
-> Other than that, works pretty well.
-> VideoRecordingDemo.m adapted to new caps format x-raw-rgb —> x-raw,
format=RGBA etc.
-> Pure recording now uses an appsink with 1 buffer capacity +
drop-frame instead of a fakesink.
-> All codec setup, caps etc. needed to be adjusted.
GStreamer-1.4: Make movie writing work - Part I

The obviously correct stuff. This beast doesn’t want to work at all so
far.