avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()

Based on a patch by Clément Bœsch <ubitux@gmail.com>
audioconvert: make av_get_channel_layout accept composite names.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
avcodec: validate the channel layout vs. channel count for decoders

Set avctx->channel_layout to 0 if the channel count does not match
avctx->channels.
Add v408 codec regression test.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
avconv: only set SAR once on the decoded frame.

No point in repeating the assignment for each output stream.
avconv: remove OutputStream.picref.

It's only used inside transcode_video() and there's no point in
preserving it between subsequent calls. So use a local variable instead.
avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc()
avutil: use align == 0 for default alignment in audio sample buffer functions
avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()

Use default alignment in audio_get_buffer()
avconv: use default alignment for audio buffer
aacdec: update debug code to always print the processed data.

When decoding LATM, this function will not process extradata
but a different buffer.
It seems this was forgotten to update when LATM support
was added.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
RV20: try keeping aspect during resolution changes.

Resolution changes are usually only used to scale with
network bandwidth, the (full) resolution specified in the
RM header really is authoritative.
While I am not sure this is the best solution, it is a
conservative approach that still should fix the most
common cases.
In particular, it fixes aspect with the sample from trac
issue #785 (in MPlayer, ffplay seems to just ignore
sample aspect changes in mid-playback).

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
scale: fix slice rendering with conversion between pal/non-pal.

We can't use whether the input format is paletted to decide that
the output format has a palette in data[1], too, that makes no sense.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Mark GRAY8 format as pseudo-paletted.

This fixes that the GIF encoder crashes with it because
it has no palette.
And the arguments for the pseudopalette apply to gray8 as
much as to RGB8 etc.
In addition the changes required in lavfi should be needed anyway
when adding support for RGB8 etc.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
vf_scale: ensure the palette is set for output.

Since those are pseudo-palette formats, swscale does not write
into data[1], swscale must initialize the palette properly itself.
This lead to frames that actually decoded as all-gray before.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Add gif and xbm regression tests.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
exr: optimize exr_halflt2uint()

30% faster

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix gif regression test on big-endian.

Decode output must be converted to rgb24 to avoid CRC difference
due to palette being stored in machine endianness.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avconv: use default alignment for audio buffer
  avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()
  avutil: use align == 0 for default alignment in audio sample buffer functions
  avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc()
  avconv: remove OutputStream.picref.
  avconv: only set SAR once on the decoded frame.
  avcodec: validate the channel layout vs. channel count for decoders
  audioconvert: make av_get_channel_layout accept composite names.
  avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()

Conflicts:
	doc/APIchanges
	ffmpeg.c
	libavcodec/utils.c
	libavcodec/version.h
	libavutil/audioconvert.c
	libavutil/audioconvert.h
	libavutil/avutil.h
	libavutil/samplefmt.c
	libavutil/samplefmt.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
dynamic loading of shared faac library