qdm2: check array index before use, fix out of array accesses

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

(cherry picked from commit a7ee6281f7ef1c29284e3a4cadfe0f227ffde1ed)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
vqavideo: check chunk sizes before reading chunks

Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bfa1e20127a16392a0b85a4aa4840889)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13093f9767b922661132a3c1f4b5ba2c7338b660)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
roqvideodec: check dimensions validity

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae610451170cd5a28b33950006ff0bd23036845)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fee26d352a52eb9f7fcd8d9167fb4a5ba015b612)

CC: libav-stable@libav.org

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
dsputil: convert remaining op_pixels_func

Convert to diffptr_t the line_size parameters still int.

Remove all the warnings in dsputil.c
libopencore-amrnb: cosmetics: Group all encoder-related code together

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libopencore-amr: Conditionally compile decoder and encoder bits

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libopencore-amrwb: Make AMR-WB ifdeffery more precise

The library might provide an encoder in the future, so it's better to
check for the presence of the decoder rather than just the library.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
build: The libopencore-amrnb encoder depends on audio_frame_queue

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
build: make audio_frame_queue a stand-alone component

Encoders requiring it have the dependency expressed in the
configure.
svq3: unbreak decoding

a7d2861d36756b913e85681b86ed3385274e8ced removed necessary braces.
Merge commit '488f87be873506abb01d67708a67c10a4dd29283'

* commit '488f87be873506abb01d67708a67c10a4dd29283':
  roqvideodec: check dimensions validity
  vqavideo: check chunk sizes before reading chunks
  qdm2: check array index before use, fix out of array accesses

Conflicts:
	libavcodec/qdm2.c
	libavcodec/roqvideodec.c
	libavcodec/vqavideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0b70fb1d518cbd796545fd6eef02772cd0d892c7'

* commit '0b70fb1d518cbd796545fd6eef02772cd0d892c7':
  dsputil: convert remaining op_pixels_func

No changes to the code as all these fixes already existed in FFmpeg.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '56632fef65c0cb6946ed3648ded3d7b82e5c5c17'

* commit '56632fef65c0cb6946ed3648ded3d7b82e5c5c17':
  libopencore-amrnb: cosmetics: Group all encoder-related code together

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e6bda9a9fd86505927a2e095e495eae104860701'

* commit 'e6bda9a9fd86505927a2e095e495eae104860701':
  libopencore-amr: Conditionally compile decoder and encoder bits

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '8837f4396a1a458a0efb07fe7daba7b847755a7a'

* commit '8837f4396a1a458a0efb07fe7daba7b847755a7a':
  libopencore-amrwb: Make AMR-WB ifdeffery more precise

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '870a0c669e536d56c6325d84f65e34c53792398e'

* commit '870a0c669e536d56c6325d84f65e34c53792398e':
  build: The libopencore-amrnb encoder depends on audio_frame_queue

Conflicts:
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'aa11cb79318baa3415d553424ba378f6c62e1f9b'

* commit 'aa11cb79318baa3415d553424ba378f6c62e1f9b':
  build: make audio_frame_queue a stand-alone component

Conflicts:
	configure
	libavcodec/Makefile

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

* qatar/master:
  svq3: unbreak decoding

No change to the code as this fix was already part of FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavf/showspectrum: add divVerent in the (c) for his recent work on the filter.
h264/svq3: stop using draw_edges.

Instead, only extend edges on-demand when the motion vector actually
crosses the visible decoded area using ff_emulated_edge_mc(). This
changes decoding time for cathedral from 8.722sec to 8.706sec, i.e.
0.2% faster overall. More generally (VP8 uses this also), low-motion
content gets significant speed improvements, whereas high-motion content
tends to decode in approximately the same time.

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