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>
avutil/log: add av_log_get_flags()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tiffdec: rename variables for consistency and fix variable shadowing

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
tiffdec: use correct data type for palette entries and set alpha to 0xFF
bytestream: add functions for accessing size of buffer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
bytestream: add bytestream2_copy_buffer() functions

This is basically an overread/overwrite-safe memcpy between a
GetByteContext and a PutByteContext.

CC:libav-stable@libav.org
tiffdec: use bytestream2 to simplify overread/overwrite protection

Based on a patch by Paul B Mahol <onemda@gmail.com>

CC:libav-stable@libav.org
tiffdec: use a single strip if RowsPerStrip is 0

The spec does not specify that 0 is an error condition, and there
are samples which use 0 when the whole image is in one strip.
tiff: use a better name and enum values for PhotometricInterpretation

Also add additional known values and log as missing features.
tiffdec: remove an unneeded variable
tiffdec: support predictor type 2 with RGB48 pixel format
Merge commit '617a1a98a6be3e59db6fbfc21afab2fb9a049c03'

* commit '617a1a98a6be3e59db6fbfc21afab2fb9a049c03':
  mp3enc: Properly write bitrate value in XING header

Conflicts:
	libavformat/mp3enc.c

See: 40176fc3149bc72c1309f93989a57aec2322e626
See: d62bf5d4e73250295c0a652e151498c5b19cbd63
See: various others
Merged-by: Michael Niedermayer <michaelni@gmx.at>
dcadec: Do not decode the XCh extension when downmixing to stereo

This is neither necessary nor currently supported.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
dcadec: Use correct channel count in stereo downmix check

s->prim_channels is greater than num_core_channels
when an XCh extension is present in the bitstream.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merge commit 'd4a8a86c6863ecea208fa2f774690b6df4b5bc71'

* commit 'd4a8a86c6863ecea208fa2f774690b6df4b5bc71':
  doc: Libavfilter English cleanup

Conflicts:
	doc/filters.texi
	doc/libavfilter.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'lukaszmluki/master'

* lukaszmluki/master:
  lavd/qtkit: add device category
  lavd/fbdev_enc: implement get_device_list
  lavd: no default device unless explicitly set

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