avstring: Add locale independent versions of some ctype.h functions

Signed-off-by: Martin Storsjö <martin@martin.st>
Use the avstring.h locale-independent character type functions

Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
Add missing error_resilience includes to files that use ER
build: Fix error_resilience code dependencies
mpegvideo: Conditionally build error_resilience bits

This breaks the dependency of mpegvideo on error_resilience allowing
compilation of components that depend on the former w/o the latter.
configure: Add missing h264chroma dependencies to vp5, vp6
build: cosmetics: Group hw accelerator Makefile entries together
configure: Add missing videodsp dependencies to some decoders
avstring: Fix isxdigit to not accept non-hex characters

Signed-off-by: Martin Storsjö <martin@martin.st>
mp3dec: Fix VBR bit rate parsing

When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavu: add support for atomic operations.

These could be used for reference counting, or for keeping track of
decoding progress in references in multithreaded decoders.

Support is provided by gcc/msvc/suncc intrinsics, with a fallback using
pthread mutexes.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavu: add a new API for reference-counted data buffers.
AVBuffer: add a new API for buffer pools
avpacket: use AVBuffer to allow refcounting the packets.

This will allow us to avoid copying the packets in many cases.

This breaks ABI.
pthread: avoid copying input packets when possible.
lavc: move AVFrame.hwaccel_picture_private to Picture.

This field is private and should not be present in a public struct. It
is only used in DXVA with mpegvideo-based decoders currently.
Move AVFrame from lavc to lavu.

Add AVBuffer-based reference counting API to it.
AVFrame: add side data.
lavfi: switch to AVFrame.

Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
mpegvideo_enc: drop support for reusing the input motion vectors.

This misfeature is most likely completely useless and conflicts with
removing the mpegvideo-specific fields from AVFrame. In the improbable
case it is actually useful, it should be reimplemented in a better way.