matroska: do not set invalid default duration if frame rate is zero

If a video track specifies a zero frame rate (invalid but occurs),
this results in a division by zero and subsequent undefined conversion
to integer.  Setting the default duration from the frame rate only
if the latter is greater than zero avoids such problems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
mpegaudiodec: Do not discard mp_decode_frame() return value.

This fixes the warning:
libavcodec/mpegaudiodec.c:1704:14: warning: variable ‘out_size’ set but not used
ppc: drop unused function dct_quantize_altivec()

This also allows dropping some PPC-specific ugliness from dsputil.[ch].
nutdec: add malloc check and fix const to non-const conversion warnings

Signed-off-by: Mans Rullgard <mans@mansr.com>
avio: make AVIOContext.av_class pointer to const

Fix this warning:
libavformat/aviobuf.c:663:20: warning: assignment discards qualifiers from pointer target type

Although this is a public header, it should remain source and
binary compatible.

Signed-off-by: Mans Rullgard <mans@mansr.com>
avconv: check for an incompatible changing channel layout

The decoder can change the layout and channel count during decoding,
but currently we only validate that the two are compatible when opening
the codec. This checks for incompatibilities after each decoded frame.
configure: detect PGI compiler and set suitable flags

Signed-off-by: Mans Rullgard <mans@mansr.com>
x86inc: support AVX abstraction for 2-operand instructions

Add cvtdq2ps and cvtps2dq to the AVX instruction list.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
FATE: specify the input format when decoding in enc_dec_pcm()

The output format is not always the same as the file extension,
which is sometimes required for correct probing. We can avoid
probing by specifying the format since it is already known.
FATE: pass the decoded output format and audio source file to enc_dec_pcm

This will allow decoding to md5 and doing a diff comparison to a reference
checksum instead of a fuzzy stddev or oneoff comparison.

Signed-off-by: Mans Rullgard <mans@mansr.com>
dv: Replace some magic numbers by the appropriate #define.
dv: Initialize encoder tables during encoder init.
rv40dsp x86: MMX/MMX2/3DNow/SSE2/SSSE3 implementations of MC

Code mostly inspired by vp8's MC, however:
- its MMX2 horizontal filter is worse because it can't take advantage of
  the coefficient redundancy
- that same coefficient redundancy allows better code for non-SSSE3 versions

Benchmark (rounded to tens of unit):
        V8x8  H8x8  2D8x8  V16x16  H16x16  2D16x16
C       445    358   985    1785    1559    3280
MMX*    219    271   478     714     929    1443
SSE2    131    158   294     425     515     892
SSSE3   120    122   248     387     390     763

End result is overall around a 15% speedup for SSSE3 version (on 6 sequences);
all loop filter functions now take around 55% of decoding time, while luma MC
dsp functions are around 6%, chroma ones are 1.3% and biweight around 2.3%.
rv34dsp x86: implement MMX2 inverse transform

141 cycles down to 51.
rv34dsp: factorize a multiplication in the noround inverse transform
rv34dsp: rearrange parameters to loop filter strength functions.

This should allow simpler code for x86 SIMD implementations.
rv40dsp x86: start implementing loop filter strength functions

x86_32/64 cycle counts:
v: 66/57 -> 33/31 cycles
h: 60/47 -> 43/35 cycles
rv40dsp: distinguish non-edge/edge versions.

This allows more optimized DSP functions and better results for the inlining
of rv40_loop_filter_strength.

Timing of the older C functions:
      32  64
h:    60  47
v:    66  57
New timing:
h_ne: 45  36
h_e:  81  64
v_ne: 42  33
v_e:  74  53
rv40dsp x86: implement edge/non-edge versions of strength functions

Timing of the older MMX2 functions:
      32  64
h:    43  35
v:    33  31
New timing:
h_ne: 27  24
h_e:  35  31
v_ne: 28  27
v_e:  41  32
rv40dsp: always inline inloop filter

3% speedup on x86-64.