demux_mkv: support ALAC

Test sample was produced with ffmpeg. Extradata handling closely follows
libavformat/matroskadec.c.
video: use new method to get QP table

This only matters for those who want to use vf_pp. The old API is marked
as deprecated, and doesn't work on Libav. It was broken on FFmpeg, but
has recently started working again - the fields in question were not un-
deprecated though. Instead you're supposed to use a new API, which does
exactly the same thing (what...?).

Also don't pass the QP table with mp_image_copy_attributes() - it
probably does more harm than it's useful.

By the way, with -vf=dlopen=TOOLS/vf_dlopen/showqscale.so, it appears
the table as output by recent FFmpeg is offset by 1 macroblock in X
direction and 2 macroblocks in Y direction, which most likely will
interfere with normal vf_pp operation. However, this is not my problem.

The only real reason for this commit is that we can finally get rid of
all libav* related deprecation warnings. (Though they are constantly
deprecating APIs, so this will not last long.)
cocoa_common: fix regression when changing videos in fullscreen

I introuced this regression in 8fc0b618d5. The backend would go into
incosistent state caused by calling `vo_cocoa_fullscreen` where it wasn't
needed.

Fixes #44
vo_x11: use generic aspect ratio code, refactor

Instead of manually calculating aspect ratio etc., use
vo_get_src_dst_rects(). This has the advantage that we can drop some
special cases in aspect.c later.

Simplify the code, and move resizing the X images from draw_image() to a
new resize() function.

Do some other simplifications. The gXErrorFlag check was actually dead
code, even in mplayer-svn. Special-casing on WinID is not needed
anymore (we created an embedded window, and its size is updated by
x11_common.c).
vo_opengl_old: use generic aspect ratio code

Make sure scaled_osd still works. Although this is a completely
worthless feature for a deprecated VO.
vo_corevideo: use generic aspect ratio code

The rescaling is rather silly. vo_get_src_dst_rects() doesn't return an
uncropped image, so the texture coordinates have to be recalculated,
which looks more complicated, but is actually what the other OpenGL VOs
also do.

Tested and fixed by Stefano Pigozzi.
vo_x11: accept all swscale formats

There's no reason why there should be a separate vf_scale stage.
vo_xv: minor simplifications

The draw_osd change is a bit tricky: I guess originally, there was some
intention not to second-guess the generic aspect code, but the result is
the same and the code is more confusing.
video: simplify aspect calculation stuff

Remove lots of weird logic and dead code.

The only difference is that when specifying a monitor aspect ratio, it
will always upscale and never downscale.
video: remove aspect.h includes from files which don't need it
video: remove rounding of display size to multiples of 2

The code that is changed is responsible for scaling the video size to
display size, so that the resulting video rectangle is letter-boxed
inside the display window. This is before panscan calculations, which
can actually enlarge the video and make it larger than the display size
again. (src_dst_split_scaling() in vo.c takes cares of clipping the
video size to window size.)

I'm not sure why this rounding is done, as using panscan controls can
introduce odd sizes again. The rounding has been part of the code since
the initial commit. On the other hand, this rounding can slightly
influence the aspect ratio of the displayed image to the worse. It
forces the image to be scaled by an additional pixel, without actually
correcting the display size into the other direction.

Although video sizes are usually at least aligned on 2 (and often more),
odd sizes can still happen when playing e.g. anamorphic DVDs.

Remove the additional rounding.

(Note that we still round the _source_ image position and size when the
displayed image is larger than the screen, e.g. when panscan is used.
This is needed by some VOs so that the image source rectangle starts on
full chroma pixels. Maybe this rounding should be moved to the
respective VOs, which includes at least vo_direct3d.)
video: apply --no-keepaspect even on fullscreen

If that's what the user asked for, there's no reason to introduce
special cases to ignore it on fullscreen.

The old behavior is perhaps accidentally due to the fact that aspect
calculations used to be disabled in windowed mode, rather than a
deliberate decision.
video: enable panscan calculations even in windowed mode

This was probably enabled to guarantee that panscan is always reset in
windowed mode. However, the window size should be exactly the video size
in windowed mode, unless in cases where the user forcibly changed the
window size (e.g. --geometry). In the former case, panscan will have no
influence at all, and in the latter case we want it to have influence.
x11_common: remove assumption that video is always centered

The vo_x11_clearwindow_part() function assumed that the video is always
centered. Replace it with a new vo_x11_clear_background() function
instead, which essentially does the same as the old function. It takes
the video rectangle instead of just the video size, and doesn't have to
make the assumption that the video rectangle is centered.

Also make vo_x11 use it (seems advantageous).
Merge branch 'master' into osdbar_experiment
different way to align bar position with chapter marks
round properly

Not sure if this matters; the case I tested (--osd-border-size=0) this
didn't actually help, but it's more correct.
add options to control bar size, clamp bar border to reasonable sizes

--osd-bar-w/--osd-bar-h control the size of the bar. Maybe the value
ranges the option takes should be changed to something more intuitive.

The border size is still given by the --osd-border-size option, but it's
scaled with the bar height. I'm not sure if this better or worse than
before (IMHO worse), but there were voices saying this and that.

Clamp the border to experimentally retrieved reasonable min and max
values. If --osd-border-size=0 is used, the OSD bar has a solid color.
Merge branch 'osdbar_experiment' into osdbar_mouse
lower mouse pointer distance in which osd bar becomes visible