summaryrefslogtreecommitdiff
path: root/libavcodec/libopenjpegenc.c
Commit message (Collapse)AuthorAge
* avcodec: deprecate Lossless and Intra Only encoder capabilitesJames Almer2020-05-21
| | | | | | | Both are codec properties and not encoder capabilities. The relevant AVCodecDescriptor.props flags exist for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/libopenjpeg: Support GRAY10, GRAY12 and GRAY14.Carl Eugen Hoyos2018-06-26
|
* avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* lavc: drop support for OpenJPEG 1.3-2.0Michael Bradshaw2017-10-20
| | | | | | 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-08
| | | | Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* Add support for LibOpenJPEG v2.2/gitReino172017-06-23
| | | | Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
* libavcodec/libopenjpegenc: enable lossless option, remove layer option, and ↵Aaron Boxer2017-03-09
| | | | | | | | | | | | 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-14
| | | | | | | | | | | | 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-14
| | | | | | | | 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-13
| | | | | | | | | | | | | 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-26
| | | | | | | | 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-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add OpenJPEG 2.x compatibilityMichael Bradshaw2015-12-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '2268db2cd052674fde55c7d48b7a5098ce89b4ba'Hendrik Leppkes2015-09-08
|\ | | | | | | | | | | | | * 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-07
| | | | | | | | | | | | 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-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27
| | | | | | | | | | | | | | | | 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-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | 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-02
| | | | | | | | | | | | | | | | 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-02
| |
* | Merge commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-14
| |
* | lavc/libopenjpegenc: move opj_create_compress, opj_cio_open and ↵Jean First2015-02-02
| | | | | | | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | 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-01
| |
* | lavc/libopenjpegenc: move opj_setup_encoder to libopenjpeg_encode_frameJean First2015-01-24
| | | | | | | | | | | | | | | | | | | | | | 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-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-04
| | | | | | | | | | | | | | 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-03
| | | | | | | | | | | | This gives a >50% speed up when encoding with libopenjpeg. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '8f45bd1433a1d8534d7b3997219c4ca31a669042'Michael Niedermayer2014-03-19
|\| | | | | | | | | | | | | | | | | | | | | * 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-18
| |
* | Merge commit '1ea9fa15c3f9074f6199f68bdd6258c5a2bb89e0'Michael Niedermayer2014-03-19
|\| | | | | | | | | | | | | | | | | | | | | * 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-18
| |
* | avcodec/libopenjpegenc: Replace av_frame_alloc() and av_frame_ref() by ↵Michael Niedermayer2014-01-24
| | | | | | | | | | | | | | | | 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-24
| | | | | | | | | | | | Fixes CID1163842 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/libopenjpegenc: check av_frame_alloc() failure.Nicolas George2013-12-30
| |
* | avcodec/libopenjpegenc: drop dependancy on sizeof(AVFrame)Michael Niedermayer2013-12-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'Michael Niedermayer2013-11-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-16
| |
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-03
| |
* | libopenjpeg: fix encoding of odd sized subsampled imagesMichael Bradshaw2013-09-28
| | | | | | | | | | 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-23
| | | | | | | | | | 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-23
| |
* | Rename "AVClass class" as "AVClass component_class" for external codecs.Sean McGovern2013-07-04
| | | | | | | | | | | | | | 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-03
| | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
* | libopenjpegenc: simplify switch statementMichael Bradshaw2013-01-31
| | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
* | libopenjpegenc: add support for pix fmt gbrp (8-16 bit)Michael Bradshaw2013-01-31
| | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>