Michael Niedermayer
c3517c377e
avcodec/jpeg2000dec: Support PCRL
...
Fixes Ticket4603
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-13 13:56:49 +02:00
Michael Niedermayer
eb1beb9e1c
avcodec/jpeg2000dec: Try to fix remaining DCinema hardcoded TODOs in CPRL
...
Again, no testcase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-13 13:37:56 +02:00
Michael Niedermayer
0a3eb0422a
avcodec/jpeg2000dec: try to correct tile location in CPRL code
...
No testcase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-13 13:09:13 +02:00
Michael Niedermayer
7c244349fc
avcodec/jpeg2000dec: Factorize component out of CPRL loop
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-13 13:09:13 +02:00
Michael Niedermayer
86efe83177
avcodec/jpeg2000dec: Fix x/y step TODO for CPRL
...
No testcase known
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-13 13:09:13 +02:00
Michael Niedermayer
971b377960
avcodec/jpeg2000dec: Reduce verbosity of get_plt()
...
The existence of such element does not represent an error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 16:48:57 +02:00
Michael Niedermayer
5b2f9790e6
avcodec/jpeg2000dec: Fallback to yuv if no matching xyz format exists
...
Fixes Ticket4471
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 16:44:11 +02:00
Michael Niedermayer
eaa8685033
avcodec/jpeg2000dec: Do not abort if prc is outside limits
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 16:30:50 +02:00
Michael Niedermayer
3dea13e710
avcodec/jpeg2000dec: Assert that pixel format descriptor is not NULL
...
We only look up pixel formats from a fixed list so none should ever
fail to be found
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 14:33:53 +02:00
Michael Niedermayer
e7adb02d3b
avcodec/jpeg2000dec: Do not hardcode tile part usage
...
Fixes part of Ticket 4605
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 04:51:37 +02:00
Michael Niedermayer
1b3fbe41c5
avcodec/jpeg2000dec: Do not print a warning for RLCP
...
It seems to be working now
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 04:51:30 +02:00
Michael Niedermayer
4af9eb4f75
avcodec/jpeg2000dec: Remove unused variable and argument
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 03:33:31 +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
eea92133a1
avcodec/mqcdec: Support raw bypass and non reseting init
...
Some broken code that used the old mqc is removed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 03:02:09 +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
5ccca4eb8e
avcodec/jpeg2000dec: Add some additional checking on lengthinc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 01:13:55 +02:00
Michael Niedermayer
2f1dd4a3d1
avcodec/jpeg2000dec: Print warning for "Selective arithmetic coding bypass"
...
This is implemented but i suspect does not work correctly as no file using this
seems to decode correctly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 22:59:07 +02:00
Michael Niedermayer
9c8939216b
avcodec/jpeg2000dec: Implement progression order RLCP
...
This works with one of 2 RLCP samples i have, the other appears to also
use selective arithemtic coding bypass which may or may not be the reason why it does
not work
Sample: p0_16.j2k
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 21:38:10 +02:00
Michael Niedermayer
b58a3c8975
avcodec/jpeg2000dec: Print the correct variable in the component error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 04:50:40 +02:00
Michael Niedermayer
81471d8246
avcodec/jpeg2000dec: increase tile_parts to 6
...
Fixes Ticket4602
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 04:50:14 +02:00
Michael Niedermayer
213f2da46a
avcodec/jpeg2000dec: Fix shift for RGB(A)48/64
...
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 04:19:38 +02:00
Michael Niedermayer
0916938a8d
avcodec/jpeg2000dec: Fix gain regression with gray16
...
Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 20:26:38 +02:00
Michael Niedermayer
45db921806
avcodec/jpeg2000dec: Add placeholder for PLT parsing
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 15:16:46 +02:00
Michael Niedermayer
b6ee1912f9
avcodec/jpeg2000dec: Handle Psot = 0
...
Fixes Ticket2869
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 14:43:03 +02:00
Michael Niedermayer
7c9fcdfabd
avcodec/jpeg2000dec: Fix some 5/3 bitexactness issues
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 02:17:53 +02:00
Michael Niedermayer
074159ed70
avcodec/jpeg2000dec: Fix subsampled decoding
...
Fixes part of Ticket3619
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:02:05 +02:00
Michael Niedermayer
12ba1b2b4d
avcodec/jpeg2000dec: Check that coords match before applying ICT
...
This avoid potential out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:02:05 +02:00
Michael Niedermayer
028c59c17b
avcodec/jpeg2000dec: Fix high bit depth branch sample shift
...
Fix part of Ticket3619
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:01:01 +02:00
Michael Niedermayer
f8f155a18a
avcodec/jpeg2000dec: fix boolean operator
...
Fixes CID1271791 #7-6
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-13 15:15:55 +02:00
Carl Eugen Hoyos
f018b1f3a0
Support YA16 in jpeg 2000.
2015-02-01 16:18:39 +01:00
James Almer
c9f2ec8a34
jpeg2000: split off inverse MCT decoding as Jpeg2000DSP
...
This makes the addition of arch optimized functions easier.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-02 03:21:45 -03:00
Michael Niedermayer
f9cd317223
Merge commit 'fe4d5fe9361162f9033ff1bd84bfc1b2091ba785'
...
* commit 'fe4d5fe9361162f9033ff1bd84bfc1b2091ba785':
jpeg2000: Mark static data init functions as av_cold
Conflicts:
libavcodec/jpeg2000.c
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-17 20:42:10 +02:00
Diego Biurrun
fe4d5fe936
jpeg2000: Mark static data init functions as av_cold
2014-06-17 08:44:07 -07:00
Carl Eugen Hoyos
ced0d6c14d
Use correct msvc type specifiers for ptrdiff_t and size_t.
...
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472 .
Reviewed-by: Ronald Bultje
2014-04-24 18:01:30 +02:00
Michael Niedermayer
8d024c5107
Merge commit 'cc8163e1a3601a56f722a4720516e860bf1c6198'
...
* commit 'cc8163e1a3601a56f722a4720516e860bf1c6198':
avcodec: more correct printf specifiers
Conflicts:
libavcodec/4xm.c
libavcodec/alsdec.c
libavcodec/dfa.c
libavcodec/h264_ps.c
libavcodec/jpeg2000dec.c
libavcodec/lagarith.c
libavcodec/mpeg12dec.c
libavcodec/rv10.c
libavcodec/svq3.c
libavcodec/wmaprodec.c
libavcodec/xwddec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-22 18:43:40 +01:00
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
2014-03-22 14:08:20 +01:00
Lukasz Marek
aeb2905fb7
lavc/jpeg2000dec: silent warning discards qualifiers
...
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-08 02:54:37 +01:00
Michael Niedermayer
8001e9f7d1
avcodec/jpeg2000dec: fix error detection in pix_fmt_match()
...
Fixes out of array accesses with CODEC_FLAG_EMU_EDGE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 18:46:38 +01:00
Michael Niedermayer
723e7b86ea
avcodec/jpeg2000dec: calculate planar and pixelsize from pixel format descriptor
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-20 18:46:37 +01:00
Michael Niedermayer
55fa898969
avcodec/jpeg2000dec: zero Jpeg2000QuantStyle structure before use in get_qcd()
...
Fixes: msan_uninit-mem_7f50b84aac30_6823_mjp2.mov
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-28 22:08:49 +01:00
Michael Niedermayer
3d5a5e86be
avcodec/jpeg2000dec: Check precno before using it in JPEG2000_PGOD_CPRL
...
Fixes out of array reads
Fixes: asan_heap-oob_f0de57_6823_mjp2.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-24 04:02:24 +01:00
Michael Niedermayer
780669ef7c
avcodec/jpeg2000dec: non zero image offsets are not supported
...
Fixes out of array accesses
Fixes Ticket3080
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-26 02:19:13 +02:00
Michael Niedermayer
a1b9004b76
avcodec/jpeg2000dec: fix context consistency with too large lowres
...
Fixes out of array accesses
Fixes Ticket2898
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-15 14:30:17 +02:00
Michael Niedermayer
fe448cd28d
avcodec/jpeg2000dec: prevent out of array accesses in pixel addressing
...
Fixes Ticket2921
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 21:48:36 +02:00
Michael Niedermayer
ac3b01a9c0
avcodec/jpeg2000dec: check transform equality in MCT
...
Fixes null pointer dereference
Fixes Ticket2843
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-13 19:23:24 +02:00
Michael Niedermayer
e96c80154f
Merge commit '1018a92219a38a812cf97761c6b3a5e66a400f4b'
...
* commit '1018a92219a38a812cf97761c6b3a5e66a400f4b':
jpeg2000: Check block length
See: 914ab4cd1c
See: 582f53349e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 10:32:04 +02:00
Luca Barbato
1018a92219
jpeg2000: Check block length
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-09 22:25:19 +02:00
Michael Niedermayer
fcd19d6c8d
avcodec/jpeg2000dec: Zero code and quant style
...
This prevents future frames from using half initialized/inconsistent
structures
Fixes assertion failure
Fixes Ticket2897
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-03 19:03:56 +02:00
Michael Niedermayer
2dd38a1d48
avcodec/jpeg2000dec: move "missing SIZ" check up
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 10:04:43 +02:00
Michael Niedermayer
8ae14bf5ce
Merge commit '18a245a2aea31b92bc435f2962a71e060d83b5f7'
...
* commit '18a245a2aea31b92bc435f2962a71e060d83b5f7':
jpeg2000dec: Add more checks when parsing headers
The check cannot be true in FFmpeg, but does no harm.
I will move it in a subsequent commit so it can detect missing SIZ
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 10:03:35 +02:00