manpage: correct the definition of full range video
video: honor the video's colormatrix and color range flags

If either of them is not defined, the old behavior is used:
- the colormatrix is guessed based on resolution.
- the color range is assumed to be tv aka limited range.
Adjust ffmpeg/libav #includes to work with recent upstream changes

The <libavutil/avutil.h> stopped including <libavutil/common.h>
recursively in recent ffmpeg/libav git revisions. As a result, some
files no longer got needed definitions, causing a build failure.
Modify #include lines in various files to fix build with the latest
versions of ffmpeg/libav headers.
osd_libass: fix displaying empty text, fix API usage

If empty text is rendered, the bounding box is empty. Instead of
continuing with a bogus bounding box that would result in garbage
being rendered on screen, make the OSD image invisible.

This happened when playing demuxer SRT subtitles (e.g. SRT embedded in
MKV) with -no-ass at the moment a subtitle line disappeared.

Unrelated to this issue, fix libass API usage. Delete the event with
libass_flush_events(), instead of trying to reuse the previous event.

Based on a patch by uau.
Squashed commit of the following:

commit c56058daebd4a918c35ee82b129fdab9b9bf0616
Merge: 6ac1277 75693f4
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Tue Aug 21 18:44:28 2012 +0200

    Merge remote-tracking branch 'origin/master' into vf_dlopen

commit 6ac1277ff492d4c16481a53c01de6446f2a0f74e
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Tue Aug 21 18:42:22 2012 +0200

    uncrustify

commit 2b934dffd7e16d5839623a6ae5256daf91377075
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Tue Aug 21 18:32:58 2012 +0200

    vf_dlopen: bump version to 1.0; explain version use

commit 36d06dd4089700308346ebba744f262014d86095
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 18:30:02 2012 +0200

    make it 4 args for filters

commit 098f70881699d9524df6ff0fbfcee7a810c5e319
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 18:01:29 2012 +0200

    also detect a filter requesting too many outpics

commit 6170a026df228d8588508b6d012978c6f02e89ef
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 17:57:48 2012 +0200

    use a struct for outpic, to no longer require consecutive memory layout for outpics

commit d20f73234ce65fa67b9ac6e995b456040ced640c
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 17:21:35 2012 +0200

    remove dependency on mp_image memory layout

commit 148a049c95a3952b9ad56962d308efb55948880e
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 17:05:27 2012 +0200

    typo fix

commit d4bc02c714d5a17e39378c10d0a15687d3921156
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 17:04:09 2012 +0200

    make strides signed (for backwards encoded images)

commit 059b8ec290361d378cd386abc43cd597a22b7d77
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 16:53:29 2012 +0200

    document two important pixel formats

commit 2ec7e90371d6556e160204d303e984682f3a31e0
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 16:51:02 2012 +0200

    no longer use a query_format callback

commit 3743d183ab06fe6fe84cbb61a83947ef2744049f
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 16:26:07 2012 +0200

    block MPEG and MPEGPES too, we only want actual pixels

commit d290019e42585f2ef7f1217c752c82da5851c0c4
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 16:05:48 2012 +0200

    block hwaccel formats generally

commit 2a46e0405bb3796775d0a8fad5f9d653628a3adc
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 15:56:08 2012 +0200

    improve naming

commit e893b7644648647e9953e0a13d6558cd63eae118
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 15:51:48 2012 +0200

    filter interface: no longer assume contiguous inpic

commit 9179dd93349851e55b8fbba511f280b09d663490
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 15:03:23 2012 +0200

    version fields

commit 342098d315fff9cb37d55157ba54ef6a8f08ac23
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 12:29:26 2012 +0200

    document the example filters

commit e43a8f888f99810883c58927c54573511fce05f5
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 12:14:03 2012 +0200

    fix logic of outputting multiple images

commit 6e8373db213380401b61c5ac217475d2d3936bff
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 11:58:21 2012 +0200

    debug prints

commit f5d0d8cdab5916ca6a4825788cb8d20b67fcbe78
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 11:55:29 2012 +0200

    telecine example filter: output pts

commit e472b52db983ba61ce024f8e14948025c29770ad
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 11:40:47 2012 +0200

    fix typos :)

commit d81e49cde356a13ef031feca1e46ab9b4a54dee3
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 11:30:12 2012 +0200

    many fixes; not happy yet though

commit e2a731161de3e95ae544b0383c78186a1a62bdaf
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 10:12:32 2012 +0200

    prepare for having two filters in the same example file

commit f0c6e77f5e7e3e3c57e1a021f6278aa009f67d5b
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 10:11:03 2012 +0200

    finish the qp visualizer

commit 5cc9c44c72f0904c6396fcf3110f8429b3d93f7e
Merge: 4759312 e70b5ee
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 09:44:46 2012 +0200

    Merge remote-tracking branch 'origin/master' into vf_dlopen

commit 47593126bd2a2839a5be6352624d417944e2047b
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Mon Aug 20 09:44:01 2012 +0200

    fix useless use of struct keyword :)

commit 349fbffd59601b2f656ef4030acd414ca56679b7
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Sat Aug 18 12:20:50 2012 +0200

    fix another NULL

commit afefa4d43931efc04e4bc628c3301a4948694e80
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Sat Aug 18 12:19:59 2012 +0200

    fix NULL dereference in query_format usage

commit 0e021c9ce216bad5026a96be03e5ddf705f02710
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 19:20:06 2012 +0200

    use a const char * for the pixel formats

commit f4c54a1e5d267c2d00c42f3637dbb0e2c1408097
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 18:54:57 2012 +0200

    Revert "factor out image format defines"

    This reverts commit 4694e55b99fd92b7d71ce790cf98e22d5bc17b5c.

commit 74be4390bac276f1bab2d3cbab5779b825c34055
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 16:32:30 2012 +0200

    try supporting windows (not tested)

commit 10e76fe1ae37ee9c4d6b7d28630894a92c90dbf3
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 16:23:47 2012 +0200

    qp visualizer: only change V

commit ac5ba0f0b1945a51cd69b644b7937d6f89faa217
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 16:21:39 2012 +0200

    make the qp visualizer use YV12

commit 318e49dc6678634e4cc30e773afda1253b69cf02
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 15:53:13 2012 +0200

    expose qscale (read only) to dlopen filters

commit 4694e55b99fd92b7d71ce790cf98e22d5bc17b5c
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 15:31:32 2012 +0200

    factor out image format defines

commit 6b2afdda27cf6ac4f5b9c4ed67d62657e5c6e48a
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 13:50:25 2012 +0200

    avoid copying

commit 75b7069a34f011bda20691b9b601f6d815fe0013
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 13:30:41 2012 +0200

    update example filter to have stubs for all functions

commit 514d6b870983762ad055ea8a3050b78f165e6866
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 13:30:36 2012 +0200

    use query_format as name

commit 2b3cad8d9a6137bd5b6c223b1838a1610d07f1cc
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 13:25:36 2012 +0200

    add an incompatible filter API check

commit 4c79da4af5b12fbb27c360acfd74e26e96461fbd
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 13:17:33 2012 +0200

    make dlopen filter work; add example

commit 7099b755b515a618e8209f908c87597461dd7602
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 12:49:13 2012 +0200

    split up the header for the filters

commit 3b6e5b18fedfb546128f4088a41ea30c3c83ad58
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 12:47:23 2012 +0200

    make all filter functions except for put_image optional

commit 6458b163e51347f9ef9b8ed269594ab506292708
Author: Rudolf Polzer <divverent@xonotic.org>
Date:   Fri Aug 17 12:43:05 2012 +0200

    a "dlopen" filter that can load a filter library
move vf_dlopen_example to TOOLS

It's not strictly part of mplayer
temp: remove img_format changes

to re-add them as separate commit
img_format, m_option: make image format name list globally available

=========================================

- re-add the img format changes
- rename img format things
- add a mp_ prefix, it seems all newer global functions tend to have this
- not using typedef, they just obscure things

these changes don't have anything to do with vf_dlopen, they're merely preparation
so split them away with this commit
should be cherry-picked before squashing the rest
add vf_dlopen changes for renaming
remove dll handle typedef

was unused, HINSTANCE is void* anyway
new copyright header

this code obviously has not been written by michael niedermayer

even if another filter was used as template, there can be barely
anything left of it

the copyright header is what I started to use for new files in this
fork
clean up vf_dlopen code and its examples, change filter* macros to vf_dlopen* macros
vf_dlopen: fix endless loop in format comparing
use correct "line size" of picture for copying