Michael Niedermayer
14652c080d
j2k/jpeg2000: restructure cblk coord
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bd89b2b22a
j2k/jpeg2000: log2_prec size cleanup
...
This also changes the cblk size storage method to what jpeg2000 uses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cb39dfb870
j2k/jpeg2000: check cblk size
...
This is based on j2k FCD which is ambigous thus the limit
might be tighter.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
de90bd6c3f
j2k/jpeg2000: merge cosmetics and whitespace
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
914ab4cd1c
j2kdec & jpeg2000dec: check lengthinc against array size
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
17e66c9ff4
j2k & jpeg2000dec: reset numX/Ytiles if tiles failed allocation
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
53f0442464
avcodec/jpeg2000dec: Port tile size check from j2kdec
...
Fixes potential integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
73ffab4195
jpeg2000dec: check TPsot
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fec8783883
jpeg2000dec: read and check curtileno
...
Fixes out of array accesses
Code ported from j2kdec
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f399b33c2b
jpeg2000dec & j2kdec: Fix return type of get_sot()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4a9a6a1f35
vcodec/jpeg2000dec: fix av_log() type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0b42631641
avcodec/jpeg2000dec: merge bytestream2 reading from j2kdec
...
This fixes at least one out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c649ecb3b2
avcodec/jpeg2000dec: get_qcx, fix stack and heap overwrites
...
This is likely remotely exploitable
Fix ported from j2kdec
No uptodate FFmpeg release should be affected by this
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
069ede2981
jpeg2000dec: Check ncomponents and tile dimensions
...
Fixes various problems
Code ported from j2kdec
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
7c57a582a0
jpeg2000dec: don't use deprecated PIX_FMT values
12 years ago
Diego Biurrun
a349458e67
jpeg2000dec: Use correct printf length modifier for pointer differences
...
Also eliminate an unnecessary cast. Fixes the following warning:
jpeg2000dec.c:1200:20: warning: format ‘%lX’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘long long unsigned int’
12 years ago
Michael Niedermayer
974420a701
jpeg2000dec: fix memleaks in error cases in jpeg2000_decode_frame()
...
Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
70f9661542
jpeg2000dec: initialize static data just once
12 years ago
Janne Grunau
45a1694fde
jpeg2000dec: cleanup properly after decoding errors
...
Fixes memory leak in fate-redcode-demux.
12 years ago
Nicolas Bertrand
a06f0cef5b
jpeg2000: fix for uninitialized data errors in valgrind/memcheck
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas Bertrand
28816f9db8
jpeg2000: Fix uninitialized data errors pointed out by valgrind/memcheck
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Reimar Döffinger
d82729e5d9
Detect and skip mj2-style jp2c header.
...
This this fixes one of the issues with
http://blogs.bu.edu/mhirsch/files/2012/08/Rotate180CCW-checkerboard.mj2_.zip
and at least allows to demux the file properly instead
of failing during probing.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Nicolas Bertrand
2e2d24667a
jpeg2000: Add mutlti-threading support to decoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Janne Grunau
10f1a4d9bd
jpeg2kdec: output is native endian AV_PIX_FMT_XYZ12
12 years ago
Nicolas Bertrand
c81a706381
JPEG 2000 decoder for DCinema
...
Based on the 2007 GSoC project from Kamil Nowosad <k.nowosad@students.mimuw.edu.pl>
Updated to current programming standards, style and many more small
fixes by Diego Biurrun <diego@biurrun.de>.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago