Aaron Boxer
b6b4b0a65e
avcodec/j2kenc: Add attribution to OpenJPEG project:
...
http://ghostscript.com/~tor/gs-browse/gs/openjpeg/libopenjpeg/t1.c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Carl Eugen Hoyos
f253c34175
lavc/j2kenc: Remove experimental flag.
...
The encoder produces valid and - if requested - lossless files.
9 years ago
Michael Niedermayer
e36db49b7b
avcodec: Add a min size parameter to ff_alloc_packet2()
...
This parameter can be used to inform the allocation code about how much
downsizing might occur, and can be used to optimize how to allocate the
packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d759f7f1d0
avcodec/j2kenc: remove unused variable
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Carl Eugen Hoyos
97fa0f37fe
lavc/j2kenc: Enable yuv42x and yuv41x encoding.
...
Fixes ticket #535 .
Fixes ticket #4524 .
10 years ago
Michael Niedermayer
9f653e6d36
avcodec/j2kenc: Support user specified tile dimensions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
0f5b996531
lavc/j2kenc: Make jp2 output compatible with Kakadu.
...
Fixes ticket #4689 .
10 years ago
Michael Niedermayer
5c047f3ad4
avcodec/j2kenc: store libavcodec ident in a comment unless bitexact mode is used
...
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
7e2bdea764
avcodec/j2kenc: Use JP2 format by default
...
Without the JP2 fields its not possible to identify the colorspace
Fixes Ticket538
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9a2fc170b1
avcodec/j2kenc: Support writing JP2 encapsulation
...
The added option matches openjpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
bb3703a4c3
avcodec/j2kenc: YUV should not use the ICT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4624656797
avcodec/j2kenc: Properly flush the end of the truncated AC stream
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2580bae54a
avcodec/j2kenc: Use ret < 0 instead of ret != 0 for error checks
...
This is how most code in FFmpeg checks for failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Himangi Saraogi
b020a25df2
avcodec/j2kenc: Initialize variable to silence compiler warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2daf580284
avcodec/j2kenc: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8443b27072
avcodec/j2kenc: drop dependancy on sizeof(AVFrame)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
11 years ago
Michael Niedermayer
f57119b8e5
jpeg2000: fix overflow in dequantization
...
Fixes decoding of file generated with:
ffmpeg -f lavfi -i smptehdbars=hd720 -pix_fmt rgb48 /tmp/o.jp2
Reviewed-by: Nicolas BERTRAND <nicoinattendu@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas Bertrand
dd1382ac95
jpeg2000: Initialize only once mqc arrays
...
Increases encoding and decoding speed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9d56ccf5af
j2k/jpeg2000dec: merge
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
62d00aa22f
jpeg2000/j2k: merge j2k/jpeg2000.c/h
...
Now only j2kdec / jpeg2000dec.c remain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
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>
12 years ago
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>
12 years ago
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>
12 years ago
Michael Niedermayer
9c66da517f
j2kenc: Zero DWT struct on allocation
...
Should fix fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8cf57efdd7
j2k/jpeg2000: merge lowres code
...
This also fixes lowres use with ffplay
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d4a4661342
j2k/jpeg2000: merge j2k & jpeg2000 dwts, drop j2k dwt
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ee189701a6
j2kenc: Allow encoding with the 9/7 wavelet
...
Also add a fate test that tests 9/7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
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>
12 years ago
Michael Niedermayer
1b5cb6c00a
j2k/jpeg2000: Partially merge quantization code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c2e942099a
j2k: drop cblknx/y from Jpeg2000Band
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8c2e201c4f
j2k/jpeg2000: drop xi/yi0/1 from Jpeg2000Prec
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cbaa0871c2
j2kenc: switch to cblk in prec
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
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>
12 years ago
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>
12 years ago
Michael Niedermayer
e66faf71eb
j2k: merge ff_j2k_init_tier1_luts()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
69b9773980
j2k: s/getnbctxno/getsigctxno/g
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
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>
12 years ago
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>
12 years ago
Michael Niedermayer
78c7bff04a
avcodec/j2k: rename J2K_ constants to JPEG2000_
...
This should simplify merging the 2 decoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0ab0ed2b86
j2k: Rename structs to be more similar to jpeg2000dec
...
This should simplify merging
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c1c2b0b339
avcodec: rename jpeg2000 decoder to j2k
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7c2481f2d7
j2kenc: remove duplicate debug functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
151469db33
j2kenc: remove unneeded dereference
...
Fixes CID703723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
f06269dda5
cosmetics: align more codecs declarations
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Michael Niedermayer
03757d488f
j2kenc: Fix "function declaration isn’t a prototype" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
7f9b42ff9d
j2kenc: cosmetics: vertically align AVCodec members.
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
35dfeb871c
j2kenc: switch to ff_alloc_packet2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago