ffmpeg: move stream_copy flags handling after attachments.
ffmpeg: apply flags to attachments too.
lavf/matroskaenc: respect bitexact for attachments.

Use the first 64 bits of the SHA1 of the content as file UID
instead of a random number if the bitexact flag is set.
lavc/dvdsubenc: improve color distance function.

Consider the color space as an hypercone with apex alpha=0
and base alpha=1 instead of an hypercube.
Make the encoder consider very transparent colors more similar
even if the hue is very different.
This corresponds roughly to using the alpha as a weight for the
color difference.
Only 4 bits of alpha are used, because this is what dvdsub uses,
and it avoids overflows.

Fix trac ticket #2005.
ffmpeg: sub2video: set resample size.

Necessary after 04a530f.
fate: merge mapchan and options into ffmpeg.

They were two very short files that cover ffmpeg-specific features.
lavf: move force_codec_ids() up

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf: Fix codec id forcing with probed codecs

Fixes Ticket2088

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>