lls/x86: use 3-operator vaddpd in ADDPD_MEM

Fixes build with yasm-1.1

Signed-off-by: Anton Khirnov <anton@khirnov.net>
oggdec: do not fall back on binary search in the generic code.

Binary search is already attempted in the format-specific seek function,
so the fallback is only reached if binary search failed already.
jpeg2000: Validate resolution levels

There are 32 maximum decomposition levels, thus 33 resolution levels.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check code-block size

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Define the maximum decomposition levels

And define the resolution levels according.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Clean up return paths and error messages

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Use bytestream2

Prevent a number of overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Validate SOT parsing

Avoid some overreads.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Validate SIZ parsing

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Validate block lengthinc

Currently we are using an array with a static data size.

Similar to a patch with the same purpose by Michael Niedermayer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check zero bit-plane validity

Prevent integer overflows.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check component number in get_coc() and get_qcc()

Avoid overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: check len before parsing header

Avoid overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Correctly calculate sgnd

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Drop unused and writeonly fields

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check that nreslevels2decode has been initialized before use

Avoid buffer overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Propagate error code from get_cox()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Remove unneeded returns

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check that there is a SOT before SOD

Avoid overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
jpeg2000: Check that we have enough components for MCT

Avoid overread.

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