Anton Khirnov
2c6811397b
lavc: add profiles to AVCodecDescriptor
...
The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations.
9 years ago
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
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
Janne Grunau
007e27d363
avcodec: add missing CODEC_CAP_DR1 to codecs using get_buffer()
10 years ago
James Almer
82f8eb5f77
jpeg2000: split off inverse MCT as Jpeg2000DSP
...
This makes the addition of arch optimized functions easier.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Vittorio Giovara
cbc808d726
jpeg2000: enable 4 component pixel formats
...
Bug-Id: 721
CC: libav-stable@libav.org
Sample-Id: 31230.mov
10 years ago
Diego Biurrun
fe4d5fe936
jpeg2000: Mark static data init functions as av_cold
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Luca Barbato
1018a92219
jpeg2000: Check block length
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Martin Storsjö
18a245a2ae
jpeg2000dec: Add more checks when parsing headers
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Nicolas Bertrand
f56fe04de3
jpeg2000: Initialize only once mqc arrays
...
Improves decoding speed.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
95a57d26d8
jpeg2000: Use the matching coding style struct for transform selection
...
Fixes a null pointer dereference.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
22e18ea39e
jpeg2000: Optimize output sample conversion
...
67935 -> 29984 kcycles
Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
f0552e63a6
jpeg2000: Reset s->numX/Ytiles on tile deallocation
...
Keep the structure fields more consistent after cleanup.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
e11099db20
jpeg2000: Optimize dequantization
...
Float: 4700 -> 2700 cycles
Integer: 4400 -> 2800 cycles
(sandybridge i7)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
c1dcbc590d
jpeg2000: Do not assume a single tile
...
In preparation of supporting multiple tiles.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
53d5d89c1b
jpeg2000: Speed up jpeg2000_decode_tile()
...
Skip processing bands with dimension set to 0.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
64f6570c6e
jpeg2000: Use EBCOT's CAUSAL and BYPASS mode in decode_cblk()
...
Speed it up a bit.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
d57c737ac3
jpeg2000: Simplify jpeg2000_decode_packets()
...
Raise PATCHWELCOME error in case of non-implemented progression order.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
09d5929f37
jpeg2000: Do not crash on NULL node in tag_tree_decode
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
aa16bbaf9b
jpeg2000: Refactor SOT marker parsing
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Luca Barbato
daeb4e3042
jpeg2000: Proper cleanup on failure in decode_frame()
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
589e5b52f6
jpeg2000: Use the correct sizeof in memset for T1 data
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
5b73916d34
jpeg2000: Simplify init_tile()
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
33e665a6ab
jpeg2000: Update pixel format support
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
5bf208f659
jpeg2000: Use separate fields for int and float codepaths
...
Split stepsize and data into int and float variants.
Eliminates a number of casts and simplifies spotting errors.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
a458b91cf4
jpeg2000: Split int/float codepaths depending on the DWT
...
DWT53 is always int, DWT97 is always float.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
f9581f1414
jpeg2000: Improve reduced resolution decoding
...
Correctly scale down the component coordinates and
clean up some redundant code.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
4e11b15534
jpeg2000: Calculate code-block coord in ff_jpeg2000_init_component()
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
cf04af2086
jpeg2000: Check that we have enough components for MCT
...
Avoid overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
b564784a20
jpeg2000: Check that there is a SOT before SOD
...
Avoid overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
2c3901b2c3
jpeg2000: Remove unneeded returns
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
ef35d6dbc6
jpeg2000: Propagate error code from get_cox()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
86a2602e16
jpeg2000: Drop unused and writeonly fields
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
ac921338a4
jpeg2000: Correctly calculate sgnd
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
fd54dd028b
jpeg2000: check len before parsing header
...
Avoid overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
eae63e3c15
jpeg2000: Check component number in get_coc() and get_qcc()
...
Avoid overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
17e5d614a8
jpeg2000: Check zero bit-plane validity
...
Prevent integer overflows.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Luca Barbato
7e201d575d
jpeg2000: Validate block lengthinc
...
Currently we are using an array with a static data size.
Similar to a patch with the same purpose by Michael Niedermayer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
278a923c51
jpeg2000: Validate SIZ parsing
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
d3cb302b88
jpeg2000: Validate SOT parsing
...
Avoid some overreads.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
1a3598aae7
jpeg2000: Use bytestream2
...
Prevent a number of overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Luca Barbato
5efadcb8cd
jpeg2000: Clean up return paths and error messages
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Luca Barbato
be3271009e
jpeg2000: Define the maximum decomposition levels
...
And define the resolution levels according.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
fbcc03db8f
jpeg2000: Check code-block size
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Nicolas Bertrand <nicoinattendu@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago