Commit Graph

24 Commits

Author SHA1 Message Date
Michael Niedermayer
0eb7de1973 avcodec/jpeg2000: Change coord to 32bit to support larger than 32k width or height
Fixes: 03e0abe721b1174856d41a1eb5d6a896/signal_sigabrt_7ffff6ae7cc9_3813_e71bf3541abed3ccba031cd5ba0269a4.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-15 22:11:05 +01:00
Michael Niedermayer
317be53ca6 avcodec/jpeg2000: Support 32 decomposition levels
Fixes Ticket4680

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-28 03:16:06 +02:00
Michael Niedermayer
cd1a9908b5 avcodec/jpeg2000: support >32bit in ff_jpeg2000_ceildivpow2()
Fixes part of Ticket4680

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-28 02:31:26 +02:00
Michael Niedermayer
f01028bf58 avcodec/jpeg2000: Avoid one shift in ff_jpeg2000_ceildivpow2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-28 02:27:43 +02:00
Michael Niedermayer
c72a831931 avcodec/jpeg2000dec: Support progression order changes
Fixes Ticket4657

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-26 21:00:10 +02:00
Michael Niedermayer
f1e173049e avcodec/jpeg2000: Remove CBLK limit
This also reduces the amount of memory needed
Fixes Ticket4672

The new code seems slightly faster as well, probably due to better cache usage

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-26 01:00:17 +02:00
Michael Niedermayer
d7e224ec24 avcodec/jpeg2000: change flags array type to 16bit
reduce memory needed for flags

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-24 17:46:37 +02:00
Michael Niedermayer
d580255571 vcodec/jpeg2000: Increase cblk size limit to 128
Fixes Ticket4649

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-24 17:38:05 +02:00
Michael Niedermayer
4624656797 avcodec/j2kenc: Properly flush the end of the truncated AC stream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-17 20:39:03 +02:00
Michael Niedermayer
4ec14ce121 avcodec/jpeg2000dec: Improve readability of SOP check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-15 13:29:41 +02:00
Michael Niedermayer
dc73c7adc0 avcodec/jpeg2000dec: Fix Selective arithmetic coding bypass and Multiple codeword segments
These 2 are highly related so they are in the same commit
Fixes part of Ticket4605
Fixes p0_04.j2k

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 03:12:54 +02:00
Michael Niedermayer
b395fd3de7 avcodec/jpeg2000dec: add some sanity checking on newpasses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 02:02:38 +02:00
Michael Niedermayer
b0448e5123 Merge commit 'be3271009ef893fbed9640e8edbd771685fd957b'
* commit 'be3271009ef893fbed9640e8edbd771685fd957b':
  jpeg2000: Define the maximum decomposition levels

Conflicts:
	libavcodec/jpeg2000.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-03 12:02:11 +02:00
Luca Barbato
be3271009e jpeg2000: Define the maximum decomposition levels
And define the resolution levels according.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-02 20:05:43 +02:00
Michael Niedermayer
2c2a8f70f5 jpeg2000: Make nreslevel fields int
This prevents potential integer overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-05 18:34:07 +02:00
Michael Niedermayer
62d00aa22f jpeg2000/j2k: merge j2k/jpeg2000.c/h
Now only j2kdec / jpeg2000dec.c remain

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 14:57:58 +02:00
Michael Niedermayer
8bedbb82ce j2k/jpeg2000: split data pointer in int & float.
This fixes a TODO item and unifies both decoders structures
It also fixes undefined behavior due to aliasing violations

I choose 2 fields instead of a union because mistakely using the
wrong type with a union will lead to hard to debug "wrong output"
while with 2 fields mistakely using the wrong type will crash
with a null pointer derefernce which is much easier to debug

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 14:18:53 +02:00
Michael Niedermayer
fe7136ef82 j2k/jpeg2000: split stepsize in float & int variables
This is more clear and less prone to mistakes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 22:16:14 +02:00
Michael Niedermayer
f82e7330af jpeg2000: merge mant type from j2k
mant fits in 16bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 22:25:03 +02:00
Michael Niedermayer
8c2e201c4f j2k/jpeg2000: drop xi/yi0/1 from Jpeg2000Prec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 15:53:42 +02:00
Michael Niedermayer
3300b5f6ce j2k/jpeg2000 headers: Cblk/Prec cleanup & merge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 15:13:18 +02:00
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>
2013-05-26 22:29:11 +02:00
Michael Niedermayer
e2e9bee2da Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Bump minor for JPEG 2000 decoder
  JPEG 2000 decoder for DCinema

The mqc code is merged, the rest is added independent of
the existing jpeg2000 decoder and encoder.

Conflicts:
	Changelog
	doc/general.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/mqc.c
	libavcodec/mqc.h
	libavcodec/mqcdec.c
	libavcodec/version.h
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-22 20:00:54 +02:00
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>
2013-04-22 15:38:29 +02:00