summaryrefslogtreecommitdiffstats
path: root/libavcodec/libopenjpegenc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: drop support for OpenJPEG 1.3-2.0Michael Bradshaw2017-10-201-131/+25
| | | | | | We now require 2.1+ with pkg-config. Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* lavc: add support for OpenJPEG 2.3.0Michael Bradshaw2017-10-081-4/+6
| | | | Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* Add support for LibOpenJPEG v2.2/gitReino172017-06-231-4/+6
| | | | Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* libavcodec/libopenjpegenc: enable lossless option, remove layer option, and ↵Aaron Boxer2017-03-091-10/+7
| | | | | | | | | | | | improve defaults 1. limit to single layer, as there is no current support for setting distortion/quality of multiple layers 2. encoder mode should be kept at default setting (0) 3. remove fixed_alloc parameter from context : seldom if ever used, and no way of properly configuring at the moment 4. add irreversible setting, to allow for lossless encoding. Set to OpenJPEG default (enabled) 5. set numresolution max to 33, which is the maximum number of allowed resolutions according the J2K spec Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* libopenjpegenc: fix out-of-bounds reads when filling the edgesAndreas Cadhalpun2016-10-141-9/+9
| | | | | | | | | | | | The calculation of width/height should round up, not round down to prevent setting width or height to 0. Also image->comps[compno].w is unsigned (at least in openjpeg2), so the calculation could silently wrap around without the explicit cast to int. Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* libopenjpegenc: stop reusing image data buffer for openjpeg 2Andreas Cadhalpun2016-10-141-11/+30
| | | | | | | | openjpeg 2 sets the data pointers of the image components to NULL, causing segfaults if the image is reused. Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* configure: fix detection of libopenjpegAndreas Cadhalpun2016-10-131-2/+0
| | | | | | | | | | | | | Use check_lib2 to test the header together with the function. This is necessary, because '-DOPJ_STATIC' changes what the included header does. Also add '-DOPJ_STATIC' to CPPFLAGS, so that it isn't necessary to hardcode this in libavcodec/libopenjpeg{dec,enc}.c. Finally, check for non-static openjpeg 2.1, too. Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/libopenjpegenc: Set numresolutions by default to a value that is not ↵Michael Niedermayer2016-06-261-1/+7
| | | | | | | | too large Fixes issues with libopenjpeg 2.1 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libopenjpegenc: fix mixed declarations and codeJames Almer2016-03-251-1/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add OpenJPEG 2.x compatibilityMichael Bradshaw2015-12-251-40/+229
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba'Hendrik Leppkes2015-09-081-2/+2
|\ | | | | | | | | | | | | * commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba': lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fieldsVittorio Giovara2015-09-071-2/+2
| | | | | | | | | | | | The new fields can be accessed directly and are more intelligible. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer2015-07-271-1/+1
| | | | | | | | | | | | | | | | 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>
* | Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'Michael Niedermayer2015-07-201-8/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534': Gather all coded_frame allocations and free functions to a single place Conflicts: libavcodec/a64multienc.c libavcodec/asvenc.c libavcodec/cljrenc.c libavcodec/dpxenc.c libavcodec/dvenc.c libavcodec/gif.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libopenjpegenc.c libavcodec/libtheoraenc.c libavcodec/libvpxenc.c libavcodec/mpegvideo_enc.c libavcodec/nvenc.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/sunrastenc.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/v210enc.c libavcodec/v410enc.c libavcodec/xbmenc.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocating coded_frame is what most encoders do anyway, so it makes sense to always allocate and free it in a single place. Moreover a lot of encoders freed the frame with av_freep() instead of the correct API av_frame_free(). This bring uniformity to encoder behaviour and prevents applications from erroneusly accessing this field when not allocated. Additionally this helps isolating encoders that export information with coded_frame, and heavily simplifies its deprecation. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | libopenjpegenc: use variable instead of type for sizeofAndreas Cadhalpun2015-06-021-1/+1
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | libopenjpegenc: add NULL check for img before accessing itAndreas Cadhalpun2015-06-021-0/+3
| | | | | | | | | | | | | | | | If opj_image_create fails to allocate an image it returns NULL, which causes a segmentation fault at 'img->x0 = 0'. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec: use av_frame_free() for coded_frameClément Bœsch2015-03-021-2/+2
| |
* | Merge commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0'Michael Niedermayer2015-02-141-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0': avcodec: Don't anonymously typedef structs Conflicts: libavcodec/alac.c libavcodec/cinepak.c libavcodec/cscd.c libavcodec/dcadec.c libavcodec/g723_1.c libavcodec/gif.c libavcodec/iff.c libavcodec/kgv1dec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/ra288.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Don't anonymously typedef structsDiego Biurrun2015-02-141-1/+1
| |
* | lavc/libopenjpegenc: move opj_create_compress, opj_cio_open and ↵Jean First2015-02-021-22/+20
| | | | | | | | | | | | | | | | | | | | | | opj_set_event_mgr to libopenjpeg_encode_frame libopenjpegenc crashes with "pointer being freed was not allocated" when threading is enabled with: ffmpeg -i tests/vsynth1/01.pgm -vcodec libopenjpeg file.j2k this appears to be a bug in libopenjpeg Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/libopenjpegenc: factorize cinema parameters to it's own functionJean First2015-02-021-26/+38
| | | | | | | | | | Signed-off-by: Jean First <jeanfirst@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Support YA16 in jpeg 2000.Carl Eugen Hoyos2015-02-011-1/+3
| |
* | lavc/libopenjpegenc: move opj_setup_encoder to libopenjpeg_encode_frameJean First2015-01-241-11/+8
| | | | | | | | | | | | | | | | | | | | | | if the openjpeg parameter tcp_rates is not 0 ( using the ffmpeg compression_level option ) every 2nd image per thread is badly encoded. By moving the opj_setup_encoder function from libopenjpeg_encode_init to libopenjpeg_encode_frame this can be prevented. This fixes ticket #3754. Signed-off-by: Jean First <jeanfirst@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5'Michael Niedermayer2014-08-041-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5': avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/raw.c libavutil/pixdesc.c libavutil/pixfmt.h libavutil/version.h libswscale/swscale_internal.h libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8Vittorio Giovara2014-08-041-3/+3
| | | | | | | | | | | | | | The rationale is that you have a packed format in form <greyscale sample> <alpha sample> <greyscale sample> <alpha sample> and shortening greyscale to 'G' might make one thing about Greenscale instead. An alias pixel format and color space name are provided for compatibility.
* | avcodec/libopenjpegenc: Add frame-threading capabilityDave Rice2014-06-031-1/+1
| | | | | | | | | | | | This gives a >50% speed up when encoding with libopenjpeg. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '8f45bd1433a1d8534d7b3997219c4ca31a669042'Michael Niedermayer2014-03-191-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '8f45bd1433a1d8534d7b3997219c4ca31a669042': libopenjpeg: Support rgba64 encoding Conflicts: libavcodec/libopenjpegenc.c See: 36397ea1c7e27ab850149cc61394c2baa26dd532 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libopenjpeg: Support rgba64 encodingCarl Eugen Hoyos2014-03-181-0/+3
| |
* | Merge commit '1ea9fa15c3f9074f6199f68bdd6258c5a2bb89e0'Michael Niedermayer2014-03-191-13/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '1ea9fa15c3f9074f6199f68bdd6258c5a2bb89e0': libopenjpeg: K&R formatting cosmetics Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libopenjpeg: K&R formatting cosmeticsVittorio Giovara2014-03-181-15/+13
| |
* | avcodec/libopenjpegenc: Replace av_frame_alloc() and av_frame_ref() by ↵Michael Niedermayer2014-01-241-5/+1
| | | | | | | | | | | | | | | | av_frame_clone() Simplifies code Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/libopenjpegenc: Check the return code of av_frame_ref()Michael Niedermayer2014-01-241-1/+4
| | | | | | | | | | | | Fixes CID1163842 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/libopenjpegenc: check av_frame_alloc() failure.Nicolas George2013-12-301-0/+2
| |
* | avcodec/libopenjpegenc: drop dependancy on sizeof(AVFrame)Michael Niedermayer2013-12-171-10/+12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'Michael Niedermayer2013-11-161-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5b9c3b4505206143d85398c1410949319fa1180f': Replace all instances of avcodec_alloc_frame() with av_frame_alloc(). Conflicts: doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c libavcodec/alacenc.c libavcodec/libopenjpegenc.c libavcodec/libvpxenc.c libavcodec/pcm.c libavcodec/xbmenc.c libavcodec/xwdenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all instances of avcodec_alloc_frame() with av_frame_alloc().Anton Khirnov2013-11-161-1/+1
| |
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-1/+1
| |
* | libopenjpeg: fix encoding of odd sized subsampled imagesMichael Bradshaw2013-09-281-17/+62
| | | | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libopenjpeg: init and close properly; don't config during encodeMichael Bradshaw2013-09-231-32/+36
| | | | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/libopenjpegen: XYZ 12 bit support for libopenjpeg encoderclook2013-07-231-0/+37
| |
* | Rename "AVClass class" as "AVClass component_class" for external codecs.Sean McGovern2013-07-041-2/+2
| | | | | | | | | | | | | | The aix header math.h defines "extern int class()" for C. This fixes compilation on aix with external libraries enabled. Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
* | libopenjpegenc: make dci compliant j2cMichaël Cinquin2013-02-031-0/+29
| | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
* | libopenjpegenc: simplify switch statementMichael Bradshaw2013-01-311-10/+5
| | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
* | libopenjpegenc: add support for pix fmt gbrp (8-16 bit)Michael Bradshaw2013-01-311-0/+33
| | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
* | configure: consider using /usr/include/openjpeg-1.5 when searching for openjpegJohannes Nixdorf2012-12-221-1/+6
| | | | | | | | | | | | | | | | Beginning with version 1.5.1 openjpeg defaults to install its headers to /usr/include/openjpeg-${major}.${minor} instead of /usr/include without providing a compatibility symlink making the old test fail. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Support new transparency colour-spaces with libopenjpeg.Carl Eugen Hoyos2012-11-041-0/+21
| | | | | | | | Reviewed-by: Michael Bradshaw
* | Update my email addressMichael Bradshaw2012-10-271-1/+1
| | | | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud