Michael Niedermayer
f5822ea379
avcodec/jpeg2000dec: Add missing \n to av_log()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
50b77e364f
avcodec/jpeg2000dec: iterate over positions with the special cases from jpeg2000
...
The order in j2k is not the simple and logic one
Fixes Ticket4670
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6c4a2f11dd
avcodec/jpeg2000dec: Add coords to Jpeg2000Tile
...
These will be needed in subsequent commits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Michael Niedermayer
9ff5e7974a
avcodec/jpeg2000dec: Limit x/y step to 1<<30
...
Fixes infinite loop
Fixes Ticket4663
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2d8bf3d126
avcodec/jpeg2000dec: Check PPx / PPy values
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d580255571
vcodec/jpeg2000: Increase cblk size limit to 128
...
Fixes Ticket4649
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ffa1de8a3b
avcodec/jpeg2000dec: Use 32x32->64bit for 9/7i dequantization
...
Like the 5/3 case this is needed to avoid overflows and similarly for 16bpp
output pure 32bit operations are insufficient if high quality is wanted
Note, this code-path is only used in bitexact mode, so this should not
affect the speed of any real use-case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
05ef6324d1
avcodec/jpeg2000dec: Add 5/3 de-quantization special case for the lossless case
...
This avoids a multiplication and 64bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8ff09e9098
avcodec/jpeg2000dec: Use 32x32->64bit for 5/3 dequantization
...
This fixes overflows, using fewer bits would impact high bit depth quality
Fixes Ticket4654
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
bb9f4f94ac
avcodec/jpeg2000dec: Replace TPsot check by assert
...
The condition is impossible now.
the TPsot type is changed to unsigned int to prevent gcc from producing warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5ba9ec824a
avcodec/jpeg2000dec: Increase tile part limit to 256
...
This is the maximum that the syntax of jpeg2000 is capable to store
Fixes Ticket4639
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
08326e73a2
avcodec/jpeg2000dec: Continue decoding reslevels even when empty ones are encountered
...
Fixes Ticket4635
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2687a51a3f
avcodec/jpeg2000dec: Drop unneeded rlevel variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
20657e05bc
avcodec/jpeg2000dec: Improve end check
...
Fixes spurious end mismatch warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
36241c4055
avcodec/jpeg2000dec: Fix term_cnt check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
fefe04259a
avcodec/jpeg2000dec: increase tile part limit to 32
...
Fixes Ticket4629
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2819aeb0f3
avcodec/jpeg2000dec: Omit mqc reinit after the last pass
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
96bbbebaf9
avcodec/jpeg2000dec: Fix Vertically causal context formation
...
Fixes Ticket4626
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4ec14ce121
avcodec/jpeg2000dec: Improve readability of SOP check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9ba5fe7f3d
avcodec/jpeg2000dec: Remove redundant check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5b0f55aab9
avcodec/jpeg2000dec: Check reslevelno in RPCL
...
Fixes out of array read
Fixes Ticket4627
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a58f1bcc4c
avcodec/jpeg2000dec: Skip SOP
...
Fixes Ticket4625
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4bfdd967a6
avcodec/jpeg2000dec: Use <0 instead of != 0 for error checking
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5ef578d03a
avcodec/jpeg2000dec: Also include remaining length in "Block length" error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a206c13289
avcodec/jpeg2000: Change codeblock coords to same origin as bands
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6b08dc393b
avcodec/jpeg2000dec: Print warning if the mqc pointer mismatches at the end
...
If this occurs on valid and correctly decoded files it should be reduced to debug
level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
91c8025c44
avcodec/jpeg2000dec: Show the progression order at debug level for all variants
...
It was previously shown just for some, this makes it consistent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
742a26c489
avcodec/jpeg2000dec: Print error messages for more error conditions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ad072a134f
avcodec/jpeg2000dec: Handle format that has planes matching YUVA420P structure but seems not to be that
...
Outputs something for p0_05.j2k
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
132bf0bbb7
avcodec/jpeg2000dec: Print all cdx/cdy values not just the 2nd and 3rd
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4a3bc0d9a5
avcodec/jpeg2000dec: Implement "Reset context probabilities on coding pass boundaries"
...
No testcase with just this feature known
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
612f8cae06
avcodec/jpeg2000dec: Support RPCL
...
Fixes Ticket 2792
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c3517c377e
avcodec/jpeg2000dec: Support PCRL
...
Fixes Ticket4603
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Michael Niedermayer
0a3eb0422a
avcodec/jpeg2000dec: try to correct tile location in CPRL code
...
No testcase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7c244349fc
avcodec/jpeg2000dec: Factorize component out of CPRL loop
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
86efe83177
avcodec/jpeg2000dec: Fix x/y step TODO for CPRL
...
No testcase known
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Michael Niedermayer
5b2f9790e6
avcodec/jpeg2000dec: Fallback to yuv if no matching xyz format exists
...
Fixes Ticket4471
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
eaa8685033
avcodec/jpeg2000dec: Do not abort if prc is outside limits
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Michael Niedermayer
e7adb02d3b
avcodec/jpeg2000dec: Do not hardcode tile part usage
...
Fixes part of Ticket 4605
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Michael Niedermayer
4af9eb4f75
avcodec/jpeg2000dec: Remove unused variable and argument
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
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>
10 years ago
Michael Niedermayer
b395fd3de7
avcodec/jpeg2000dec: add some sanity checking on newpasses
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5ccca4eb8e
avcodec/jpeg2000dec: Add some additional checking on lengthinc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago