vout: update format after filters
Here is an updated (and rebased) version of this patchset, as discussed during the workshop this week.
The vout is created first, based on the input format. Then filters (filter_t) could be added, possibly producing pictures in a different format.
input ---> filters ---> MISMATCH [I420] vout
I420 RGBA
To avoid a mismatch between the output of the last filter and the expected format of the vout input, a converter was added when necessary to compensate:
input ---> filters ---> converter ---> [I420] vout
I420 RGBA I420
But this was often a waste, and it caused problems for opaque formats.
Instead, request the vout to adapt itself to the actual format produced by the last filter. If it can, we can avoid an additional converter.
input ---> filters ---> MISMATCH [I420] vout
I420 RGBA
input ---> filters ------------------> [RGBA] vout
I420 RGBA
If the vout does not support the new format (or does not accept to update its format), a converter is still added like before.