Michael Niedermayer
89f472b3ee
j2kdec: merge JPEG2000_PGOD_CPRL code from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 03:10:07 +02:00
Michael Niedermayer
45c0e338fc
j2kdec: merge picture handling from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 03:10:07 +02:00
Michael Niedermayer
f471b5fa30
j2k: restructure bitstream decoding
...
This is based on jpeg2000 but differs because of
problems with the design from jpeg2000 with currently
supported files
More files can be decoded after this commit, though they
show heavy artifacts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 03:09:32 +02:00
Michael Niedermayer
cdb86136f7
j2k/jpeg2000: merge some of the tilepart related code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 02:22:11 +02:00
Michael Niedermayer
a5203d86b3
j2kdec: merge length==0 check from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 02:22:11 +02:00
Michael Niedermayer
f67f2681da
jpeg2000deci/j2kdec: fix sizeof types
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-31 02:22:10 +02:00
Michael Niedermayer
3f714d1ffd
jpeg2000/j2k: merge non functional changes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 18:38:04 +02:00
Michael Niedermayer
941a8efae2
j2k:decode_tile() pass picture as argument
...
Reduce diff to jpeg2000dec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 18:38:04 +02:00
Michael Niedermayer
7836583934
j2kdec: s/j2k_/jpeg2000_/
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 18:31:25 +02:00
Michael Niedermayer
310f9dd698
j2k/jpeg2000: merge pix_fmt setting code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 16:45:30 +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
ac025d6eca
j2kdec: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 19:57:03 +02:00
Michael Niedermayer
83fd377c94
j2k/jpeg2000: merge float DWT and related code
...
the float conditions are largely changed to check the DWT
instead of the bitexact flag, which previously was wrong
(DWT53 is always int)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 00:29:25 +02:00
Michael Niedermayer
a510abd5d1
j2kdec:merge mct_decode from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 23:49:11 +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
32475f56f3
j2kdec/jpeg2000dec: partially merge quantization code
...
The quantization code needs more work, not so much work
merging but more work investigating what is correct.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 19:02:00 +02:00
Michael Niedermayer
f0a2c8285a
j2kdec: Try to fix 8bps output case
...
Ive no test samples for which this makes a difference but it
matches the 16bit implementation.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 18:58:46 +02:00
Michael Niedermayer
05fa3f6802
j2kdec: random non functional changed from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 01:46:59 +02:00
Michael Niedermayer
d66de3801e
j2kdec: merge get_tlm() from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 01:11:30 +02:00
Michael Niedermayer
8cf57efdd7
j2k/jpeg2000: merge lowres code
...
This also fixes lowres use with ffplay
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-28 00:30:06 +02:00
Michael Niedermayer
d4a4661342
j2k/jpeg2000: merge j2k & jpeg2000 dwts, drop j2k dwt
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 21:54:07 +02:00
Michael Niedermayer
243cc38d94
j2k: change fixed point of stepsize to 16.16
...
This seems more natural and matches jpeg2000
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 17:58:06 +02:00
Michael Niedermayer
1b5cb6c00a
j2k/jpeg2000: Partially merge quantization code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 17:50:54 +02:00
Michael Niedermayer
81ccc31f75
j2kdec: merge decode_tile cblk handling from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 15:13:18 +02:00
Michael Niedermayer
2c5a5c5a62
j2kdec: cdxy != 1 does not work, print an error
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 15:13:18 +02:00
Michael Niedermayer
369422db0c
j2kdec: merge cblk restructuring from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 15:13:18 +02:00
Michael Niedermayer
53ec1c811e
j2k: merge cosmetics and non functional changes from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-27 02:27:56 +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
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>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
6e16321d66
j2kdec: add AVClass
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
df3e6e5e22
j2kdec: cosmetics from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
277691a130
j2kdec: merge copyright header with jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
a2daf929ed
j2kdec: profile code from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
726eac1df9
j2kdec: cosmetics from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
88d2dd00fe
avcodec/j2kdec: drop disabled debug code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
de90bd6c3f
j2k/jpeg2000: merge cosmetics and whitespace
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
bcf59b5d8f
j2kdec: merge jpeg2000_init_static_data() from jpeg2000
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
5d67dfd71c
j2kdec: move avctx init to decode_frame
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 20:15:50 +02:00
Michael Niedermayer
b4013899e2
j2k: s/ff_j2k_getsigctxno/ff_jpeg2000_getsigctxno/g
...
Also add a related comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 18:22:16 +02:00
Michael Niedermayer
e66faf71eb
j2k: merge ff_j2k_init_tier1_luts()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 18:07:48 +02:00
Michael Niedermayer
69b9773980
j2k: s/getnbctxno/getsigctxno/g
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 18:07:48 +02:00
Michael Niedermayer
5157ec89ef
j2k: redesign vert_causal_ctx_csty implementation
...
The old implementation was incomplete and could not have worked
This also fixes some warnings
New code is untested as i dont seem to have a sample file that uses this.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 18:07:48 +02:00
Michael Niedermayer
438c45c08a
j2kdec: fix used bytestream function
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 15:00:23 +02:00
Michael Niedermayer
d42106c3ac
j2k: rename a few inline functions and data tables to match jpeg2000
...
also inlcudes some other cosmetics
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 14:02:44 +02:00
Michael Niedermayer
c78f3e5571
j2kdec: prog_order reading from jpeg2000dec
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-26 13:57:56 +02:00
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>
2013-05-22 04:18:38 +02:00
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>
2013-05-22 03:18:55 +02:00
Michael Niedermayer
f399b33c2b
jpeg2000dec & j2kdec: Fix return type of get_sot()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-22 02:14:04 +02:00
Michael Niedermayer
8d9fa738f5
j2kdec: cosmetics from jpeg2000dec
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-22 01:25:52 +02:00