Luca Barbato
1b709f23fb
jpeg2000: Refactor decode_packets
...
Move the packet-specific parsers in separate functions.
9 years ago
Luca Barbato
29b00f880f
jpeg2000: Templatize the frame writer
9 years ago
Luca Barbato
41bcc3d152
jpeg2000: Split codeblock decoding from the main tile decoding
...
That loop is completely stand-alone.
9 years ago
Luca Barbato
5788623d29
jpeg2000: Split codeblock decoding from the main tile decoding
...
That loop is completely stand-alone.
9 years ago
Luca Barbato
db53a2306f
jpeg2000: Do not warn about known and skippable markers
...
Matches the openjpeg behaviour.
9 years ago
Hendrik Leppkes
5d8e836d0e
Replace all remaining occurances of step/depth_minus1 and offset_plus1
9 years ago
Michael Niedermayer
a87ada53c3
avcodec/jpeg2000dec: Initialize ret to avoid warning and make the code more robust
...
"Fixes" CID1322361
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
9e70475551
avcodec/jpeg2000dec: Assert that step_x/y are valid
...
Fixes CID1322304, CID1322305
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Carl Eugen Hoyos
daf2c35f52
lavc: Remove newline from avpriv_request_sample() calls.
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Carl Eugen Hoyos
c239fcb948
lavc/jpeg2000: Signal lossless / bit-exact video stream.
9 years ago
Michael Niedermayer
d554715f67
avcodec/jpeg2000dec: Fix decoding of subsampled multi tile images
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Janne Grunau
007e27d363
avcodec: add missing CODEC_CAP_DR1 to codecs using get_buffer()
10 years ago
Michael Niedermayer
ecbd111768
avcodec/jpeg2000dec: Remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
96e73fa649
avcodec/jpeg2000dec: Merge i_stepsize/2 decoder special case into dequant
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5cccbc3b74
avcodec/jpeg2000dec: Check for mismatching per expected termination
...
not just at the end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8672c0a643
avcodec/jpeg2000dec: Limit poc end fields to whats available in jpeg2000_decode_packets()
...
Fixes: Ticket4677
Solution based on information from
https://code.google.com/p/openjpeg/issues/detail?id=80
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b75c0a72ed
avcodec/jpeg2000dec: Fix tp_index for POC
...
Fixes Ticket2586
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c56ba5c270
avcodec/jpeg2000dec: Print what is found in place of EPH if EPH is not found
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c72a831931
avcodec/jpeg2000dec: Support progression order changes
...
Fixes Ticket4657
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2ec0ba1e22
avcodec/jpeg2000dec: Parse POCs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7ca0cd5831
avcodec/jpeg2000dec: iterate in tile sample space for CPRL & RPCL
...
Thats what the spec says should be done
aka iterate in the wrong space and use special cases to patch that up.
It sometimes can result in different order
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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