summaryrefslogtreecommitdiff
path: root/libavcodec/metasound.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/metasound_data: Include data into metasound.c directlyAndreas Rheinhardt2022-10-281-13/+13
| | | | | | | | | | | It is only used by metasound.c, so this allows to make the data static. To do this, remove metasound_data.h, rename metasound_data.c into metasound_data.h (and add inclusion guards, remove ff_ prefixes etc.). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/metasound: Remove unnecessary headersAndreas Rheinhardt2022-10-211-4/+0
| | | | | | They are used in twinvq.c, not in metasound.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/metasound: Remove always-false checksAndreas Rheinhardt2022-10-211-5/+0
| | | | | | | | The number of channels that is checked here is automatically valid because it has just been set by us (based upon an entry in codec_props). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt2022-09-031-1/+1
| | | | | | | | 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-181-1/+1
| | | | | | | | | | | 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/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-051-1/+1
| | | | | | | | | | | 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: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-211-7/+7
| | | | | | | | | | | | | | | | 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-211-1/+1
| | | | | | | | | | 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>
* metasound: convert to new channel layout APIAnton Khirnov2022-03-151-14/+17
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/metasound, twinvqdec: Cleanup generically upon init failureAndreas Rheinhardt2022-02-111-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/metasound: Mark decoder as init-threadsafeAndreas Rheinhardt2021-05-121-0/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | | | | 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/metasound: Deduplicate dataAndreas Rheinhardt2021-01-081-9/+3
| | | | | | Saves about 13KB; also reduces the amount of relocations. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channelsHendrik Leppkes2020-12-101-1/+1
| | | | | | | | | | | | The decoders in this set either have a fixed channel count, or read it from the bitstream, and thus do not require the channel count as external information. Fixes various regressions since 81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel count for decoders which do not set this capability. Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
* avcodec/metasound: use init_get_bits8()Paul B Mahol2017-02-031-2/+3
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit 'b668662939de3a02454cfc9ba3e6d10b87527a40'Clément Bœsch2016-06-291-2/+3
|\ | | | | | | | | | | | | | | | | | | * commit 'b668662939de3a02454cfc9ba3e6d10b87527a40': get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes The merge commit also includes changes for libavcodec/interplayacm.c and libavcodec/truemotion2rt.c Merged-by: Clément Bœsch <clement@stupeflix.com>
| * get_bits: Move BITSTREAM_READER_LE definition before all relevant #includesDiego Biurrun2016-06-071-2/+3
| | | | | | | | | | | | | | This avoids the danger that get_bits.h might get indirectly #included before BITSTREAM_READER_LE is defined. Also sort headers into canonical order where appropriate.
* | 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>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-1/+1
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'cc8163e1a3601a56f722a4720516e860bf1c6198'Michael Niedermayer2014-03-221-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cc8163e1a3601a56f722a4720516e860bf1c6198': avcodec: more correct printf specifiers Conflicts: libavcodec/4xm.c libavcodec/alsdec.c libavcodec/dfa.c libavcodec/h264_ps.c libavcodec/jpeg2000dec.c libavcodec/lagarith.c libavcodec/mpeg12dec.c libavcodec/rv10.c libavcodec/svq3.c libavcodec/wmaprodec.c libavcodec/xwddec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: more correct printf specifiersDiego Biurrun2014-03-221-1/+2
| |
* | Merge commit '56d061ce9da954560892e3551513d5ecc0439846'Michael Niedermayer2013-11-261-1/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '56d061ce9da954560892e3551513d5ecc0439846': metasound: add last missing modes (8kHz @ 6kbps per channel) Conflicts: Changelog doc/general.texi Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * metasound: add last missing modes (8kHz @ 6kbps per channel)Kostya Shishkov2013-11-261-1/+8
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '1afa8a7568ba57ad0cd2923f6e641e10d32cded4'Michael Niedermayer2013-11-141-41/+55
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '1afa8a7568ba57ad0cd2923f6e641e10d32cded4': twinvq: support multiple frames per packet Conflicts: libavcodec/twinvq.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * twinvq: support multiple frames per packetKostya Shishkov2013-11-141-41/+55
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'ddb839e9286594ff7a862a956402106fca7055c9'Michael Niedermayer2013-11-141-0/+24
|\ \ | |/ | | | | | | | | | | * commit 'ddb839e9286594ff7a862a956402106fca7055c9': metasound: add missing modes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * metasound: add missing modesKostya Shishkov2013-11-141-0/+24
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '5462dde1947e0ecfcb2db99ae29ce9dee8933b45'Michael Niedermayer2013-11-081-1/+1
|\ \ | |/ | | | | | | | | | | * commit '5462dde1947e0ecfcb2db99ae29ce9dee8933b45': metasound: Fix error message argument Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * metasound: Fix error message argumentKostya Shishkov2013-11-081-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | metasound & twinvqdec: return the number of read bytes from read_bitstreamMichael Niedermayer2013-10-251-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9e7b62f0fb7462a902330fcc82cf596388f0187b'Michael Niedermayer2013-08-261-6/+3
|\ \ | |/ | | | | | | | | | | * commit '9e7b62f0fb7462a902330fcc82cf596388f0187b': twinvq: set block align for codecs and use it in size checks Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * twinvq: set block align for codecs and use it in size checksKostya Shishkov2013-08-261-6/+3
| | | | | | | | | | | | This both allows factoring out size check for both MetaSound and TwinVQ-VQF decoders and fixes the situation when there are several MetaSound frames stuffed together (that happens in 8kHz @ 8kbps MetaSound in ASF for example).
* | Merge commit '3e5898782dce60334ab294821ca00b19c648cf66'Michael Niedermayer2013-08-081-4/+4
|/ | | | | | | | | | | | * commit '3e5898782dce60334ab294821ca00b19c648cf66': Voxware MetaSound decoder Conflicts: Changelog libavcodec/Makefile libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Voxware MetaSound decoderKostya Shishkov2013-08-081-0/+346