fate/gif: create meaningful gif encoding tests.
lavc/utils: merge side data after video encode.

This allows encoders to communicate side data to the muxers.
gif: use only one graphic control extension block per image.

The encoder now doesn't produce any extra graphic control extension
block anymore. Only the image is encoded, and the muxer writing
its own GCE containing notably the timing information now includes the
optional palette transmitted through packet side data.

This commit avoid setting clashes between the two GCE, and reduce the
size of the generated file with pal8 output.
lavf/gif: fix timing.

pkt->duration can not be used since the values are only based on frame
rate.
lavfi/afade: use AV_OPT_TYPE_DURATION

Signed-off-by: Paul B Mahol <onemda@gmail.com>
lavf/gif: correct the delay after the first frame.

To define accurately the delay between two frames, it is necessary to
have both available. Before this commit, the first frame had a delay of
0; while in practice the problem is not visible in most situation, it is
problematic with low frame rate and large scene change.

This commit notably fixes output generated with commands such as:

  ffmpeg -i big_buck_bunny_1080p_h264.mov
     -vf "select='gt(scene,0.4)',scale=320:-1,setpts=N/TB"
     -frames:v 5 -y out.gif

Also, to avoid odd loop delays, the N-1 delay is duplicated for the last
frame.
lavf/gif: avoid forward declaration.
lavc: add AV_CODEC_PROP_TEXT_SUB.

CC are not marked. Also allow potential mixed types later.
x86: sbrdsp: implement SSE2 hf_apply_noise

233 to 105 cycles on Arrandale and Win64.
Replacing the multiplication by s_m[m] by a pand and a pxor with
appropriate vectors is slower. Unrolling is a 15 cycles win.
A SSE version was 4 cycles slower.

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