summaryrefslogtreecommitdiff
path: root/libavcodec/dcadec.c
Commit message (Collapse)AuthorAge
* avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt2022-09-03
| | | | | | | | It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Make init-threadsafety the defaultAndreas Rheinhardt2022-07-18
| | | | | | | | | | | and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dcadec: Treat the input packet's data as constAndreas Rheinhardt2022-07-04
| | | | | | | | A decoder's input packet need not be writable, so we must not modify the data. 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/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-21
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: drop temporary compat wrappers for channel layout API changeAnton Khirnov2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* dca: convert to new channel layout APIAnton Khirnov2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* all: Remove unnecessary libavcodec/internal.h inclusionsAndreas Rheinhardt2022-02-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dca*: Make decoder init-threadsafeAndreas Rheinhardt2021-05-02
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.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>
* avcodec/dca: require checked bitstream readerfoo862016-05-31
| | | | | | | | | | | Remove half-working attempt at supporting unchecked bitstream reader by always copying input data into intermediate buffer with large amount of padding at the end. Convert LBR decoder to checked bitstream reader. Convert dcadec_decode_frame() to parse input data directly if possible. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: simplify 'residual ok' flag trackingfoo862016-05-20
| | | | | | | | | | | | Move this from separate structure field to a packet flag. Behavior should be equivalent, except that residual flag is now properly cleared when packet has no core frame at all. Also print a message when forcing recovery mode due to invalid residual to make debugging easier. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: don't set initial sample_fmtfoo862016-05-20
| | | | | | Valid sample_fmt will be set by dcadec_decode_frame() based on stream type. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: print error message when no frame is found in packetfoo862016-05-14
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dca: add DTS Express (LBR) decoderfoo862016-05-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: convert to AVCRCfoo862016-05-03
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: move huffman data into separate object filefoo862016-05-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dca: add new decoder based on libdcadecfoo862016-01-31
|
* avcodec/dca: remove old decoderfoo862016-01-31
| | | | | Remove all files and functions which are not going to be reused, and disable all functions and FATE tests temporarily which will be.
* dca: adjust decoding of the XBR extension for integer core decodingHendrik Leppkes2016-01-02
|
* Merge commit '40d949677335a564f769823f4afdb7e7a3da8d6b'Hendrik Leppkes2016-01-02
|\ | | | | | | | | | | | | * commit '40d949677335a564f769823f4afdb7e7a3da8d6b': dca: use defines for subband related constants Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dca: use defines for subband related constantsAlexandra Hájková2015-12-31
| | | | | | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | Merge commit '2008f76054906e9ff6bf744800af0e5a5bfe61be'Hendrik Leppkes2016-01-02
|\| | | | | | | | | | | | | * commit '2008f76054906e9ff6bf744800af0e5a5bfe61be': dca: remove unused decode_hf function and quant_d tables Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dca: remove unused decode_hf function and quant_d tablesAlexandra Hájková2015-12-24
| | | | | | | | | | They were superseded with their integer equivalents. Rename integer decode_hf to decode_hf.
* | Merge commit 'aebf07075f4244caf591a3af71e5872fe314e87b'Hendrik Leppkes2016-01-02
|\| | | | | | | | | | | | | * commit 'aebf07075f4244caf591a3af71e5872fe314e87b': dca: change the core to work with integer coefficients. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dca: change the core to work with integer coefficients.Alexandra Hájková2015-12-23
| | | | | | | | | | | | | | | | | | | | | | | | The DCA core decoder converts integer coefficients read from the bitstream to floats just after reading them (along with dequantization). All the other steps of the audio reconstruction are done with floats which makes the output for the DTS lossless extension (XLL) actually lossy. This patch changes the DCA core to work with integer coefficients until QMF. At this point the integer coefficients are converted to floats. The coefficients for the LFE channel (lfe_data) are not touched. This is the first step for the really lossless XLL decoding.
* | Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'Hendrik Leppkes2016-01-01
|\| | | | | | | | | | | | | * commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6': lavc: add profiles to AVCodecDescriptor Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: add profiles to AVCodecDescriptorAnton Khirnov2015-12-12
| | | | | | | | | | The profiles are a property of the codec, so it makes sense to export them through AVCodecDescriptors, not just the codec implementations.
* | avcodec: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | Merge commit 'c12c085be7e86880924249e5cb3f898e45dee134'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit 'c12c085be7e86880924249e5cb3f898e45dee134': dcadec: Do not check for overreads in auxiliary data Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dcadec: Do not check for overreads in auxiliary dataTim Walker2015-11-23
| | | | | | | | | | | | | | | | The auxiliary data length field is not reliable, and incorrect overread errors could be returned for valid, real-world bitstreams. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '58b42345b38b46d11c32e11d9c57517f99d6a601'Hendrik Leppkes2015-10-10
|\| | | | | | | | | | | | | * commit '58b42345b38b46d11c32e11d9c57517f99d6a601': dcadec: reorganise context data Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dcadec: reorganise context dataAlexandra Khirnova2015-10-07
| | | | | | | | | | | | | | | | | | place primary audio coding header data into DCAAudioHeader structure to make DCAContext clearer and move channel related data to DCAChan structure to make them easier to use by extensions Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * dcadec: Always initialize return variableVittorio Giovara2015-10-04
| | | | | | | | Silence an uninitialized warning from clang.
* | Merge commit 'd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5'Hendrik Leppkes2015-10-03
|\| | | | | | | | | | | | | * commit 'd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5': dcadec: make a number of samples per subband per subsubframe a named constant Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dcadec: make a number of samples per subband per subsubframe a named constantAlexandra Khirnova2015-10-01
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/dcadec: fix a -Wsometimes-unitialized on clangGanesh Ajjanagadde2015-09-19
| | | | | | | | | | | | | | | | This fixes a genuine -Wsometimes-unitialized reported on clang, e.g http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '777885983533235ccda5145f96317fc8cd0a18ab'Hendrik Leppkes2015-09-17
|\| | | | | | | | | | | | | * commit '777885983533235ccda5145f96317fc8cd0a18ab': dcadec: set channel layout in a separate function Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dcadec: set channel layout in a separate functionAlexandra Hájková2015-09-16
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '971177f751a6e2931232accceab438bce277bde8'Hendrik Leppkes2015-09-17
|\| | | | | | | | | | | | | * commit '971177f751a6e2931232accceab438bce277bde8': dcadec: scan for extensions in a separate function Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * dcadec: scan for extensions in a separate functionAlexandra Hájková2015-09-16
| | | | | | | | | | | | to make dca_decode_frame more readable Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'dc70c19476e76f1118df73b5d97cc76f0e5f6f6c'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit 'dc70c19476e76f1118df73b5d97cc76f0e5f6f6c': lavc: Drop deprecated request_channels related functions Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: Drop deprecated request_channels related functionsVittorio Giovara2015-08-28
| | | | | | | | Deprecated in 04/2011.
* | 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>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/dcadec: silence request_channels deprecation warningsJames Almer2015-07-12
| | | | | | | | | | | | | | | | This also prevents an eventual compilation failure once request_channels is removed. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>