summaryrefslogtreecommitdiff
path: root/libavcodec/libopenjpegdec.c
Commit message (Collapse)AuthorAge
* avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFEAndreas Rheinhardt2022-07-18
| | | | | | | This is in preparation of switching the default init-thread-safety to a codec being init-thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/decoders: Use const uint8_t* to access input packet dataAndreas Rheinhardt2022-07-04
| | | | | | | These packets need not be writable, so we must not modify them. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-05
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt2022-04-05
| | | | | | | | This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-21
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/thread: Don't use ThreadFrame when unnecessaryAndreas Rheinhardt2022-02-09
| | | | | | | | | | | | | | | | | | | | | | | The majority of frame-threaded decoders (mainly the intra-only) need exactly one part of ThreadFrame: The AVFrame. They don't need the owners nor the progress, yet they had to use it because ff_thread_(get|release)_buffer() requires it. This commit changes this and makes these functions work with ordinary AVFrames; the decoders that need the extra fields for progress use ff_thread_(get|release)_ext_buffer() which work exactly as ff_thread_(get|release)_buffer() used to do. This also avoids some unnecessary allocations of progress AVBuffers, namely for H.264 and HEVC film grain frames: These frames are not used for synchronization and therefore don't need a ThreadFrame. Also move the ThreadFrame structure as well as ff_thread_ref_frame() to threadframe.h, the header for frame-threaded decoders with inter-frame dependencies. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> 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>
* Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'Clément Bœsch2017-03-31
|\ | | | | | | | | | | | | * commit '67deba8a416d818f3d95aef0aa916589090396e2': Use avpriv_report_missing_feature() where appropriate Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-08
| |
* | avcodec/libopenjpegdec: Set key frame metadataMichael Bradshaw2016-12-28
| | | | | | | | | | Signed-off-by: Michael Bradshaw <mjbshaw@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | 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/libopenjpegdec: 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>
* | Replace all remaining occurances of step/depth_minus1 and offset_plus1Hendrik Leppkes2015-09-08
| |
* | 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>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/libopenjpegdec: Mark as experimental if <= 1.3Michael Niedermayer2015-06-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libopenjpegdec: register logging callback functionsAndreas Cadhalpun2015-06-02
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | libopenjpegdec: check existence of image component dataAndreas Cadhalpun2015-05-30
| | | | | | | | | | | | | | | | | | libopenjpeg can return images with components without data. This fixes segmentation faults. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | acvodec/lipopenjpeg: Fix pixel value shift for 12-bit pixel formatsVilius Grigaliūnas2015-03-03
| | | | | | | | | | | | | | | | | | | | | | This fixes pixel values not being properly shifted in libopenjpeg_copyto16 and libopenjpeg_copy_to_packed16 methods. Pixel formats like xyz12le need to be shifted by AVComponentDescriptor::shift to get the correct values. Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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
| |
* | Support YA16 in jpeg 2000.Carl Eugen Hoyos2015-02-01
| |
* | 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.
| * libopenjpeg: Support rgba64 decodingVittorio Giovara2014-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
| |
* | Fix decoding of some 8 < bpc < 16 signed j2k samples with libopenjpeg.Carl Eugen Hoyos2014-01-27
| | | | | | | | | | | | No testcase known. Reviewed-by: Michael Bradshaw
* | Cast signed libopenjpeg data values to unsigned before shifting.Carl Eugen Hoyos2014-01-11
| | | | | | | | | | | | This avoids undefined behaviour on left-shift. Reviewed-by: Michael Bradshaw
* | Fix libopenjpeg colour range adjust for 8<bpp<16.Carl Eugen Hoyos2014-01-10
| | | | | | | | | | | | Fixes ticket #3284. Reviewed-by: Michael Bradshaw
* | Support signed j2k images via libopenjpeg.Carl Eugen Hoyos2014-01-10
| | | | | | | | | | | | Fixes ticket #3283. Reviewed-by: Michael Bradshaw
* | Merge commit '967cd6fafbf2fdec9cbe011296ad34a70212427e'Michael Niedermayer2013-11-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '967cd6fafbf2fdec9cbe011296ad34a70212427e': libopenjpegdec: stop using deprecated avcodec_set_dimensions kgv1dec: stop using deprecated avcodec_set_dimensions ivi_common: stop using deprecated avcodec_set_dimensions indeo3: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/ivi_common.c libavcodec/kgv1dec.c libavcodec/libopenjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libopenjpegdec: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-31
| |
* | Merge commit '5c0a09839c707f10e5dba59460e219e989c1da93'Michael Niedermayer2013-10-30
|\| | | | | | | | | | | | | | | | | | | * commit '5c0a09839c707f10e5dba59460e219e989c1da93': libopenjpegdec: return meaningful error codes Conflicts: libavcodec/libopenjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libopenjpegdec: return meaningful error codesAnton Khirnov2013-10-30
| |
* | 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
| |
* | libopenjpegdec.c: Correctly scale gray16 output if precision < 16Michael Bradshaw2013-09-12
| | | | | | | | | | | | Fixes ticket #2943. Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
* | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-04-05
|\| | | | | | | | | | | | | | | | | | | * qatar/master: libopenjpeg: Add support for XYZ colorspace, found in DCINEMA frames Conflicts: libavcodec/libopenjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libopenjpeg: Add support for XYZ colorspace, found in DCINEMA framesNicolas Bertrand2013-04-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | lavc: factorize ff_{thread_,re,}get_buffer error messages.Clément Bœsch2013-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coccinelle profile used: @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_get_buffer(ctx, f, flags)) < 0) + return r; @@ expression r, ctx, f, loglevel, str; @@ -if ((r = ff_reget_buffer(ctx, f)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_reget_buffer(ctx, f)) < 0) + return r; @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) + return r; ...along with some manual patches for the remaining ones.