floatdsp: move scalarproduct_float from dsputil to avfloatdsp.

This makes the aac decoder and all voice codecs independent of dsputil.
floatdsp: move vector_fmul_add from dsputil to avfloatdsp.
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.

Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
floatdsp: move butterflies_float from dsputil to avfloatdsp.

This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
arm: Add some missing header #includes
sanm: check image dimensions before using them

Avoids integer overflows and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mlp_parser: cosmetics: re-indent.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
mlp: store the channel layout for each substream.

Also stop storing the channel arrangement in the header info, as it's unused outside of ff_mlp_read_major_sync.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
mlpdec: TrueHD: use Libav channel order.

Fixes bug 208.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
mlpdec: set the channel layout.

Fixes bug 401.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>

CC:libav-stable@libav.org
mlp_parser: account for AVCodecContext.request_channels when setting the channel layout.

Allows users to configure the output based on what's actually decoded, rather than the full native layout.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
mlp: implement support for AVCodecContext.request_channel_layout.

Also wrap usage of AVCodecContext.request_channels in FF_API_REQUEST_CHANNELS directives.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
sanm: remove "duplicate" for loop.

Fixes input buffer overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mvdec: use avpriv_set_pts_info() instead of directly setting tb.

Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mvdec: minor simplification, remove av_inv_q()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mvdec: check channel count.

Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vp3dsp: don't do aligned reads on input.

The input is not guaranteed to be aligned.
vorbisdsp: convert x86 simd functions from inline asm to yasm.
Drop DCTELEM typedef

It does not help as an abstraction and adds dsputil dependencies.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
dsputil: remove avg_no_rnd_pixels8.

This is never used.