libavfilter: Add asettb filter for setting timebase for audio

Ported asettb (including the sr option for audio sample rate) from FFmpeg,
and copied/modified the existing settb documentation for asettb.

Signed-off-by: Katerina Barone-Adesi <katerinab+libav@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
mov: read hydrogenaudio replaygain information
libx265: Use x265_param_parse to set the SAR

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libx265: Use 16-bit SAR

The spec says it is 16 bits.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libx265: Only set the SAR if it is valid

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
mp2: Do not force a samplerate

The default should be not to resample.
DNxHD: K&R formatting cosmetics
DNxHD: make get_pixel_8x4_sym accept ptrdiff_t as stride
DNxHD: convert inline asm to yasm
resample: fix avresample_get_delay() return value

The correct "next" input sample is not the first sample of the
resampling buffer, but the center sample of the filter_length-sized
block at the beginning.

CC:libav-stable@libav.org
resample: split the nearest neighbour path into a separate function pointer
resample: reindent
resample: drop useless abs()

negative sample_index is handled in the block above.
resample: add initial padding explicitly

This simplifies the code, since we do not have to deal with a possibly
negative source index anymore.
resample: split linear into its own function
mp3enc: Properly write bitrate value in XING header

Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.

Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.

Bug-Id: https://bugs.debian.org/736088

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
doc: Libavfilter English cleanup

This aims to standardize the English used in the libavfilter
documentation, describing the same thing in the same way more often,
and significantly reduce the amount of outright errors, including
run-on sentences and sentence fragments.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
swscale: fix an implementation-defined unsigned-to-signed conversion
swscale: fix some undefined signed left shifts

Based on a patch by Michael Niedermayer <michaelni@gmx.at>
swscale: Set alpha to opaque for internal palettes.

Fixes conversion of pal8 to rgb formats with alpha.

Updated references for 2 FATE tests which previously encoded fully
transparent images.

Based on a patch by Baptiste Coudurier <baptiste.coudurier@gmail.com>