vf_rotate: fix for some obscure pixel formats

Repurpose the 3 byte case for any unhandled pixel width. Fixes rotation
with e.g. rgb48. Very inefficient, but works.
stream: remove unused new_ds_stream()
gl_video: use GL_SRGB only if it's really RGB

Use the proper RGB flag instead of !YUV. Currently, this doesn't change
anything, because only RGB and YUV formats are supported.
video: fix setting XYZ flag

Commit 9e0b68a didn't really do this correctly, failure at basic logic.
vo_opengl: XYZ input support

Useful for the j2k decoder.

Matrix taken from http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
(XYZ to sRGB, whitepoint D65)

Gamma conversion follows what libswscale does (2.6 in, 2.2 out).

If linear RGB is used internally for scaling, the gamma conversion
will be undone by setting the exponent to 1. Unfortunately, the two
gamma values don't compensate each others exactly (2.2 vs. 1/0.45=2.22...),
so output is a little bit incorrect in sRGB or color-managed mode. But
for now try hard to match libswscale output, which may or may not be
correct.
video: support YCgCo colorspace

YCgCo can be manually selected, but will also be used if the decoder
reports YCgCo. To make things more fun, files are sometimes marked
incorrectly, which will display such broken files incorrectly starting
with this commit.
vd_lavc: allow explicitly selecting vdpau hw decoders

This allows using the vdpau decoders with -vd without having to use
the -hwdec switch (basically like in mplayer).

Note that this way of selecting the hardware decoder is still
deprecated. libavcodec went away from adding special decoder entries
for hardware decoding, and instead makes use of the "hwaccel"
architecture, where hardware decoders use the same decoder names as
the software decoders. The old vdpau special decoders will probably
be deprecated and removed in the future.
video: add --hwdec-codecs option to whitelist codecs for hw decoding
manpage: fix option description
csputils: use AVCOL_SPC_YCOCG instead of AVCOL_SPC_YCGCO (fixes Libav build)

This one should probably be blamed on ffmpeg. Its headers contain:

     #define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG

Uh, ok...
core: don't report byte-based playback position with dvd

DVD playback uses a demuxer that signals to the frontend that timestamp
resets are possible. This made the frontend calculate the OSD playback
position based on the byte position and the total size of the stream.
This actually broke DVD playback position display. Since DVD reports a
a linear playback position, we don't have to rely on the demuxer
reported position, so disable this functionality in case of DVD
playback. This reverts the OSD behavior with DVD to the old behavior.
core: move demuxer time reporting to demuxer
stream: add start time reporting

Will be needed to override the demuxer's start time reporting. We could
be lazy and special-case it since the result is always 0 for the streams
that care, but doing it properly is better.
demux: report stream time info instead of demuxer info if possible

Needed for bluray and dvd. demux_mpg (used for dvd playback) did this
manually for the time length.
demux_lavf: set stream_pts

demux_mpg did the same, and doing this in demux_lavf fixes DVD playback
when using this demuxer.

Additionally this might make bluray work better in the future (but for
now, bluray playback doesn't change as it doesn't report stream PTS yet).
demux_lavf: fix DEMUXER_CTRL_RESYNC

This used the libavformat current position, instead of the mp stream
(which reflects current DVD/Bluray read position). This was broken,
because libavformat won't update its position by calling the user's
stream callbacks, negating the whole point of DEMUXER_CTRL_RESYNC.

Now DVD playback with libavformat seems to work relatively well.
demux: use demux_lavf instead of demux_mpg for DVD playback

With the commit "demux_lavf: fix DEMUXER_CTRL_RESYNC", DVD playback
seems to work nicely with demux_lavf, and maybe works even better than
with demux_mpg.

The old demuxer can be forced with: --demuxer=mpegps

If no regressions surface, demux_mpg.c will be deleted later.
demux_lavf: use demuxer ID for transport streams

Might help mapping tracks correctly to stream_bluray, fixing the
issue with the track language not being reported.
options: correctly handle things like: dvd://1-2/filename

The "/filename" part was silently dropped when a range of titles is
specified.
core: ignore backstep command if demuxer is not capable

Also, mark demuxer as not capable if DVD playback is done. The problem
with DVD is that playback time (stream_pts) is not reported frame-exact,
and the time is a "guess" at best.